24 _desc.shapes.push_back(desc.ptr());
33 _name = name ? name :
"";
34 _desc.name = _name.c_str();
44 _desc.density = density;
77 q.set_hpr(LVector3f(h, p, r));
78 q.extract_to_matrix(rot);
90 _desc.body = &(desc._desc);
119 return _desc.density;
LMatrix4f get_global_mat() const
Returns the actor's transform in global space.
void set_density(float density)
Set the density used during mass/intertia computation.
void set_body(PhysxBodyDesc &desc)
Sets the body descriptor for this actor.
void set_global_mat(const LMatrix4f &mat)
Set the position and orientation of the actor in global space.
void set_name(const char *name)
Sets the optional debug name for the actor.
LPoint3f get_global_pos() const
Returns the actor's position in global space.
const char * get_name() const
Returns the optional debug name for this actor.
void set_global_pos(const LPoint3f &pos)
Set the position of the actor in global space.
float get_density() const
Returns the actor's density.
PhysxBodyDesc get_body() const
Gets the body descriptor for this actor.
void add_shape(PhysxShapeDesc &desc)
Adds a shape to the list of collision shapes composing this actor.
void set_global_hpr(float h, float p, float r)
Sets the orientation of the actor in global space by providing angles for heading,...
Descriptor for the optional rigid body dynamic state of PhysxActor.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
static NxMat34 mat4_to_nxMat34(const LMatrix4f &m)
Converts from LMatrix4f to NxMat34.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.
static NxMat33 mat3_to_nxMat33(const LMatrix3f &m)
Converts from LMatrix3f to NxMat33.
static LMatrix4f nxMat34_to_mat4(const NxMat34 &m)
Converts from NxMat34 to LMatrix4f.
Abstract base class for shape descriptors.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.