32class EXPCL_PANDAPHYSX PhysxJoint :
public PhysxObject,
public PhysxEnums {
49 void add_limit_plane(
const LVector3f &normal,
const LPoint3f &pointInPlane,
float restitution=0.0f);
57 INLINE
void ls()
const;
58 INLINE
void ls(std::ostream &out,
int indent_level=0)
const;
61 static PhysxJoint *factory(NxJointType shapeType);
63 virtual NxJoint *ptr()
const = 0;
65 virtual void link(NxJoint *shapePtr) = 0;
66 virtual void unlink() = 0;
78 static void init_type() {
79 PhysxObject::init_type();
81 PhysxObject::get_class_type());
84 return get_class_type();
88 return get_class_type();
Actors are the main simulation objects.
This class exists just to provide scoping for the enums shared by PhysX classes.
PhysxActor * get_actor(unsigned int idx) const
Retrieves the actor which this joint is associated with.
void add_limit_plane(const LVector3f &normal, const LPoint3f &pointInPlane, float restitution=0.0f)
Adds a limit plane.
const char * get_name() const
Returns the name string.
float get_solver_extrapolation_factor() const
Retrieves the solver extrapolation factor.
void purge_limit_planes()
Deletes all limit planes added to the joint.
PhysxScene * get_scene() const
Retrieves the scene which this joint is associated with.
void set_limit_point(const LPoint3f &pos, bool isOnActor2=true)
Sets the limit point.
void set_name(const char *name)
Sets a name string for this object.
void set_use_acceleration_spring(bool value)
Switch between acceleration and force based spring.
void set_global_anchor(const LPoint3f &anchor)
Sets the point where the two actors are attached, specified in global coordinates.
void set_breakable(float maxForce, float maxTorque)
Sets the maximum force magnitude that the joint is able to withstand without breaking.
void set_global_axis(const LVector3f &axis)
Sets the direction of the joint's primary axis, specified in global coordinates.
void set_solver_extrapolation_factor(float factor)
Sets the solver extrapolation factor.
LPoint3f get_global_anchor() const
Retrieves the joint anchor.
LVector3f get_global_axis() const
Retrieves the joint axis.
bool get_use_acceleration_spring() const
Checks whether acceleration spring is used.
A scene is a collection of bodies, constraints, and effectors which can interact.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...