15 #include "physxBoxForceFieldShape.h" 16 #include "physxBoxForceFieldShapeDesc.h" 17 #include "physxManager.h" 19 TypeHandle PhysxBoxForceFieldShape::_type_handle;
26 void PhysxBoxForceFieldShape::
27 link(NxForceFieldShape *shapePtr) {
29 _ptr = shapePtr->isBox();
30 _ptr->userData =
this;
36 group->_shapes.add(
this);
44 void PhysxBoxForceFieldShape::
47 _ptr->userData = NULL;
48 _error_type = ET_released;
51 group->_shapes.remove(
this);
63 nassertv(_error_type == ET_ok);
64 _ptr->saveToDesc(shapeDesc._desc);
79 nassertv(_error_type == ET_ok);
void save_to_desc(PhysxBoxForceFieldShapeDesc &shapeDesc) const
Saves the state of the shape object to a descriptor.
void set_dimensions(const LVector3f &dimensions)
Sets the box dimensions.
static const LVector3f & zero()
Returns a zero-length vector.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
LVector3f get_dimensions() const
Retrieves the dimensions of the box.
void set_name(const char *name)
Sets a name string for this object.
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
static LVector3f nxVec3_to_vec3(const NxVec3 &v)
Converts from NxVec3 to LVector3f.
TypeHandle is the identifier used to differentiate C++ class types.
Descriptor for a box force field shape.