15 #include "physxSphereShape.h" 16 #include "physxSphereShapeDesc.h" 25 void PhysxSphereShape::
26 link(NxShape *shapePtr) {
28 _ptr = shapePtr->isSphere();
29 _ptr->userData =
this;
35 actor->_shapes.add(
this);
43 void PhysxSphereShape::
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 nassertr(_error_type == ET_ok, 0.0f);
87 return _ptr->getRadius();
Descriptor class for PhysxSphereShape.
void save_to_desc(PhysxSphereShapeDesc &shapeDesc) const
Saves the state of the shape object to a descriptor.
float get_radius() const
Returns the radius of the sphere.
void set_radius(float radius)
Sets the sphere radius.
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.