17 TypeHandle PhysxCapsuleForceFieldShape::_type_handle;
22 void PhysxCapsuleForceFieldShape::
23 link(NxForceFieldShape *shapePtr) {
25 _ptr = shapePtr->isCapsule();
26 _ptr->userData =
this;
32 group->_shapes.add(
this);
38 void PhysxCapsuleForceFieldShape::
41 _ptr->userData =
nullptr;
42 _error_type = ET_released;
45 group->_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 nassertv(_error_type == ET_ok);
75 _ptr->setHeight(height);
84 nassertr(_error_type == ET_ok, 0.0f);
85 return _ptr->getRadius();
94 nassertr(_error_type == ET_ok, 0.0f);
95 return _ptr->getHeight();
float get_radius() const
Retrieves the radius of the capsule.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.