15 #include "physxCapsuleForceFieldShape.h" 16 #include "physxCapsuleForceFieldShapeDesc.h" 18 TypeHandle PhysxCapsuleForceFieldShape::_type_handle;
25 void PhysxCapsuleForceFieldShape::
26 link(NxForceFieldShape *shapePtr) {
28 _ptr = shapePtr->isCapsule();
29 _ptr->userData =
this;
35 group->_shapes.add(
this);
43 void PhysxCapsuleForceFieldShape::
46 _ptr->userData = NULL;
47 _error_type = ET_released;
50 group->_shapes.remove(
this);
62 nassertv(_error_type == ET_ok);
63 _ptr->saveToDesc(shapeDesc._desc);
74 nassertv(_error_type == ET_ok);
75 _ptr->setRadius(radius);
86 nassertv(_error_type == ET_ok);
87 _ptr->setHeight(height);
98 nassertr(_error_type == ET_ok, 0.0f);
99 return _ptr->getRadius();
110 nassertr(_error_type == ET_ok, 0.0f);
111 return _ptr->getHeight();
float get_radius() const
Retrieves the radius of the capsule.
void save_to_desc(PhysxCapsuleForceFieldShapeDesc &shapeDesc) const
Saves the state of the shape object to a descriptor.
void set_name(const char *name)
Sets a name string for this object.
void set_height(float height)
Alters the height of the capsule.
float get_height() const
Retrieves the height of the capsule.
TypeHandle is the identifier used to differentiate C++ class types.
Descriptor for a capsule force field shape.
void set_radius(float radius)
Alters the radius of the capsule.