22 void PhysxSphereShape::
23 link(NxShape *shapePtr) {
25 _ptr = shapePtr->isSphere();
26 _ptr->userData =
this;
32 actor->_shapes.add(
this);
38 void PhysxSphereShape::
41 _ptr->userData =
nullptr;
42 _error_type = ET_released;
45 actor->_shapes.remove(
this);
54 nassertv(_error_type == ET_ok);
55 _ptr->saveToDesc(shapeDesc._desc);
64 nassertv(_error_type == ET_ok);
65 _ptr->setRadius(radius);
74 nassertr(_error_type == ET_ok, 0.0f);
75 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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Actors are the main simulation objects.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_name(const char *name)
Sets a name string for this object.
TypeHandle is the identifier used to differentiate C++ class types.