28 void PhysxForceFieldShape::
31 nassertv(_error_type == ET_ok);
34 ptr()->getShapeGroup().releaseShape(*ptr());
41 factory(NxShapeType shapeType) {
51 case NX_SHAPE_CAPSULE:
58 physx_cat.error() <<
"Unknown shape type.\n";
69 nassertr(_error_type == ET_ok,
nullptr);
71 NxForceField *fieldPtr = ptr()->getForceField();
72 if (fieldPtr ==
nullptr) {
84 nassertr(_error_type == ET_ok,
nullptr);
95 nassertv(_error_type == ET_ok);
97 _name = name ? name :
"";
98 ptr()->setName(_name.c_str());
107 nassertr(_error_type == ET_ok,
"");
108 return ptr()->getName();
117 nassertv(_error_type == ET_ok);
128 nassertr(_error_type == ET_ok, LMatrix4f::zeros_mat());
139 nassertv(_error_type == ET_ok);
141 NxMat34 pose = ptr()->getPose();
143 ptr()->setPose(pose);
152 nassertr(_error_type == ET_ok, LPoint3f::zero());
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
LMatrix4f get_mat() const
Returns the force field shape's transform.
void set_mat(const LMatrix4f &mat)
Sets the force field shape's transform.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A convex shaped region used to define force field.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PhysxForceFieldShapeGroup * get_shape_group() const
Returns the owning force field shape group.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
const char * get_name() const
Returns the name string.
static NxMat34 mat4_to_nxMat34(const LMatrix4f &m)
Converts from LMatrix4f to NxMat34.
PhysxForceField * get_force_field() const
Returns the owning force field if this is a shape of an include group, else NULL will be returned.
void set_name(const char *name)
Sets a name string for this object.
Abstract base class for force field shapes.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_pos(const LPoint3f &pos)
Sets the force field shape's translation.
A box shaped region used to define a force field.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A spherical force field shape.
A capsule shaped region used to define a force field.
TypeHandle is the identifier used to differentiate C++ class types.
static LMatrix4f nxMat34_to_mat4(const NxMat34 &m)
Converts from NxMat34 to LMatrix4f.
LPoint3f get_pos() const
Returns the force field shape's translation.