15 #include "physxCapsuleShape.h" 16 #include "physxCapsuleShapeDesc.h" 25 void PhysxCapsuleShape::
26 link(NxShape *shapePtr) {
28 _ptr = shapePtr->isCapsule();
29 _ptr->userData =
this;
35 actor->_shapes.add(
this);
43 void PhysxCapsuleShape::
46 _ptr->userData = NULL;
47 _error_type = ET_released;
50 actor->_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();
void save_to_desc(PhysxCapsuleShapeDesc &shapeDesc) const
Saves the state of the shape object to a descriptor.
void set_height(float height)
Alters the height of the capsule.
void set_radius(float radius)
Alters the radius of the capsule.
Descriptor class for PhysxCapsuleShape.
float get_height() const
Retrieves the height of the capsule.
Actors are the main simulation objects.
void set_name(const char *name)
Sets a name string for this object.
TypeHandle is the identifier used to differentiate C++ class types.
float get_radius() const
Retrieves the radius of the capsule.