Panda3D

Loading...
Searching...
No Matches
physxJointDesc.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file physxJointDesc.h
10 * @author enn0x
11 * @date 2009-09-28
12 */
13
14#ifndef PHYSXJOINTDESC_H
15#define PHYSXJOINTDESC_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20#include "physxEnums.h"
21#include "physx_includes.h"
22
23 class PhysxActor;
24
25/**
26 * Abstract base class for joint descriptors.
27 */
28 class EXPCL_PANDAPHYSX PhysxJointDesc : public PhysxEnums {
29
30PUBLISHED:
31 virtual void set_to_default() = 0;
32 virtual bool is_valid() const = 0;
33
34 void set_name(const char *name);
35 void set_joint_flag(PhysxJointFlag flag, bool value);
36 void set_max_force(float force);
37 void set_max_torque(float torque);
38 void set_solver_extrapolation_factor(float factor);
39 void set_global_axis(const LVector3f &axis);
40 void set_global_anchor(const LPoint3f &anchor);
41 void set_local_normal(unsigned int idx, const LVector3f &normal);
42 void set_local_axis(unsigned int idx, const LVector3f &axis);
43 void set_local_anchor(unsigned int idx, const LPoint3f &anchor);
44 void set_actor(unsigned int idx, const PhysxActor &actor);
45
46 const char *get_name() const;
47 bool get_joint_flag(PhysxJointFlag flag) const;
48 float get_max_force() const;
49 float get_max_torque() const;
50 float get_solver_extrapolation_factor() const;
51 LVector3f get_local_normal(unsigned int idx) const;
52 LVector3f get_local_axis(unsigned int idx) const;
53 LPoint3f get_local_anchor(unsigned int idx) const;
54 PhysxActor *get_actor(unsigned int idx) const;
55
56 public:
57 virtual NxJointDesc *ptr() const = 0;
58
59 private:
60 std::string _name;
61
62 protected:
63 INLINE PhysxJointDesc();
64 INLINE ~PhysxJointDesc();
65};
66
67#include "physxJointDesc.I"
68
69#endif // PHYSXJOINTDESC_H
PhysxActor
Actors are the main simulation objects.
Definition physxActor.h:44
PhysxEnums
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition physxEnums.h:355
PhysxJointDesc::set_global_anchor
void set_global_anchor(const LPoint3f &anchor)
Set the anchor using a world space point.
Definition physxJointDesc.cxx:125
PhysxJointDesc::set_solver_extrapolation_factor
void set_solver_extrapolation_factor(float factor)
Set the extrapolation factor for solving joint constraints.
Definition physxJointDesc.cxx:50
PhysxJointDesc::set_local_normal
void set_local_normal(unsigned int idx, const LVector3f &normal)
Set the X axis of joint space, in actor[i]'s space, orthogonal to localAxis[i].
Definition physxJointDesc.cxx:70
PhysxJointDesc::set_local_anchor
void set_local_anchor(unsigned int idx, const LPoint3f &anchor)
Set the attachment point of joint in actor[i]'s space.
Definition physxJointDesc.cxx:92
PhysxJointDesc::set_global_axis
void set_global_axis(const LVector3f &axis)
Set the local axis/normal using a world space axis.
Definition physxJointDesc.cxx:116
PhysxJointDesc::set_name
void set_name(const char *name)
Sets a possible debug name.
Definition physxJointDesc.cxx:21
PhysxJointDesc::set_joint_flag
void set_joint_flag(PhysxJointFlag flag, bool value)
Set or clear a single JointFlag.
Definition physxJointDesc.cxx:102
PhysxJointDesc::set_local_axis
void set_local_axis(unsigned int idx, const LVector3f &axis)
Set the Z axis of joint space, in actor[i]'s space.
Definition physxJointDesc.cxx:81
PhysxJointDesc::set_max_force
void set_max_force(float force)
Set a possible debug name.
Definition physxJointDesc.cxx:31
PhysxJointDesc::set_actor
void set_actor(unsigned int idx, const PhysxActor &actor)
Set the two actors connected by the joint.
Definition physxJointDesc.cxx:59
PhysxJointDesc::set_max_torque
void set_max_torque(float torque)
Set the maximum angular force (torque) that the joint can withstand before breaking,...
Definition physxJointDesc.cxx:41
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxEnums.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxJointDesc.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physx_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.