ReactPhysics3D  v0.10.2
C++ Physics engine library
Loading...
Searching...
No Matches
reactphysics3d::HingeJointInfo Struct Reference

This structure is used to gather the information needed to create a hinge joint. More...

#include <include/reactphysics3d/constraint/HingeJoint.h>

Inheritance diagram for reactphysics3d::HingeJointInfo:
reactphysics3d::JointInfo

Public Member Functions

 HingeJointInfo (RigidBody *rigidBody1, RigidBody *rigidBody2, const Vector3 &initAnchorPointWorldSpace, const Vector3 &initRotationAxisWorld)
 Constructor without limits and without motor with world-space anchor.
 
 HingeJointInfo (RigidBody *rigidBody1, RigidBody *rigidBody2, const Vector3 &initAnchorPointWorldSpace, const Vector3 &initRotationAxisWorld, decimal initMinAngleLimit, decimal initMaxAngleLimit)
 Constructor with limits but without motor with world-space anchor.
 
 HingeJointInfo (RigidBody *rigidBody1, RigidBody *rigidBody2, const Vector3 &initAnchorPointWorldSpace, const Vector3 &initRotationAxisWorld, decimal initMinAngleLimit, decimal initMaxAngleLimit, decimal initMotorSpeed, decimal initMaxMotorTorque)
 Constructor with limits and motor with world-space anchor.
 
 HingeJointInfo (RigidBody *rigidBody1, RigidBody *rigidBody2, const Vector3 &anchorPointBody1Local, const Vector3 &anchorPointBody2Local, const Vector3 &rotationBody1AxisLocal, const Vector3 &rotationBody2AxisLocal)
 Constructor without limits and without motor with local-space anchors.
 
 HingeJointInfo (RigidBody *rigidBody1, RigidBody *rigidBody2, const Vector3 &anchorPointBody1Local, const Vector3 &anchorPointBody2Local, const Vector3 &rotationBody1AxisLocal, const Vector3 &rotationBody2AxisLocal, decimal initMinAngleLimit, decimal initMaxAngleLimit)
 Constructor with limits but without motor with local-space anchors.
 
 HingeJointInfo (RigidBody *rigidBody1, RigidBody *rigidBody2, const Vector3 &anchorPointBody1Local, const Vector3 &anchorPointBody2Local, const Vector3 &rotationBody1AxisLocal, const Vector3 &rotationBody2AxisLocal, decimal initMinAngleLimit, decimal initMaxAngleLimit, decimal initMotorSpeed, decimal initMaxMotorTorque)
 Constructor with limits and motor with local-space anchors.
 
- Public Member Functions inherited from reactphysics3d::JointInfo
 JointInfo (JointType constraintType)
 Constructor.
 
 JointInfo (RigidBody *rigidBody1, RigidBody *rigidBody2, JointType constraintType)
 Constructor.
 
virtual ~JointInfo ()=default
 Destructor.
 

Public Attributes

bool isUsingLocalSpaceAnchors
 True if this object has been constructed using local-space anchors.
 
Vector3 anchorPointWorldSpace
 Anchor point (in world-space coordinates)
 
Vector3 anchorPointBody1LocalSpace
 Anchor point on body 1 (in local-space coordinates)
 
Vector3 anchorPointBody2LocalSpace
 Anchor point on body 2 (in local-space coordinates)
 
Vector3 rotationAxisWorld
 Hinge rotation axis (in world-space coordinates)
 
Vector3 rotationAxisBody1Local
 Hinge rotation axis of body 1 (in local-space coordinates)
 
Vector3 rotationAxisBody2Local
 Hinge rotation axis of body 2 (in local-space coordinates)
 
bool isLimitEnabled
 True if the hinge joint limits are enabled.
 
bool isMotorEnabled
 True if the hinge joint motor is enabled.
 
decimal minAngleLimit
 Minimum allowed rotation angle (in radian) if limits are enabled.
 
decimal maxAngleLimit
 Maximum allowed rotation angle (in radian) if limits are enabled.
 
decimal motorSpeed
 Motor speed (in radian/second)
 
decimal maxMotorTorque
 Maximum motor torque (in Newtons * meters) that can be applied to reach to desired motor speed.
 
- Public Attributes inherited from reactphysics3d::JointInfo
RigidBodybody1
 First rigid body of the joint.
 
RigidBodybody2
 Second rigid body of the joint.
 
JointType type
 Type of the joint.
 
JointsPositionCorrectionTechnique positionCorrectionTechnique
 Position correction technique used for the constraint (used for joints).
 
bool isCollisionEnabled
 True if the two bodies of the joint are allowed to collide with each other.
 

Detailed Description

This structure is used to gather the information needed to create a hinge joint.

This structure will be used to create the actual hinge joint.

Constructor & Destructor Documentation

◆ HingeJointInfo() [1/6]

reactphysics3d::HingeJointInfo::HingeJointInfo ( RigidBody rigidBody1,
RigidBody rigidBody2,
const Vector3 initAnchorPointWorldSpace,
const Vector3 initRotationAxisWorld 
)
inline

Constructor without limits and without motor with world-space anchor.

Parameters
rigidBody1The first body of the joint
rigidBody2The second body of the joint
initAnchorPointWorldSpaceThe initial anchor point in world-space coordinates
initRotationAxisWorldThe initial rotation axis in world-space coordinates

◆ HingeJointInfo() [2/6]

reactphysics3d::HingeJointInfo::HingeJointInfo ( RigidBody rigidBody1,
RigidBody rigidBody2,
const Vector3 initAnchorPointWorldSpace,
const Vector3 initRotationAxisWorld,
decimal  initMinAngleLimit,
decimal  initMaxAngleLimit 
)
inline

Constructor with limits but without motor with world-space anchor.

Parameters
rigidBody1The first body of the joint
rigidBody2The second body of the joint
initAnchorPointWorldSpaceThe initial anchor point in world-space coordinates
initRotationAxisWorldThe intial rotation axis in world-space coordinates
initMinAngleLimitThe initial minimum limit angle (in radian)
initMaxAngleLimitThe initial maximum limit angle (in radian)

◆ HingeJointInfo() [3/6]

reactphysics3d::HingeJointInfo::HingeJointInfo ( RigidBody rigidBody1,
RigidBody rigidBody2,
const Vector3 initAnchorPointWorldSpace,
const Vector3 initRotationAxisWorld,
decimal  initMinAngleLimit,
decimal  initMaxAngleLimit,
decimal  initMotorSpeed,
decimal  initMaxMotorTorque 
)
inline

Constructor with limits and motor with world-space anchor.

Parameters
rigidBody1The first body of the joint
rigidBody2The second body of the joint
initAnchorPointWorldSpaceThe initial anchor point in world-space
initRotationAxisWorldThe initial rotation axis in world-space
initMinAngleLimitThe initial minimum limit angle (in radian)
initMaxAngleLimitThe initial maximum limit angle (in radian)
initMotorSpeedThe initial motor speed of the joint (in radian per second)
initMaxMotorTorqueThe initial maximum motor torque (in Newtons)

◆ HingeJointInfo() [4/6]

reactphysics3d::HingeJointInfo::HingeJointInfo ( RigidBody rigidBody1,
RigidBody rigidBody2,
const Vector3 anchorPointBody1Local,
const Vector3 anchorPointBody2Local,
const Vector3 rotationBody1AxisLocal,
const Vector3 rotationBody2AxisLocal 
)
inline

Constructor without limits and without motor with local-space anchors.

Parameters
rigidBody1The first body of the joint
rigidBody2The second body of the joint
anchorPointBody1LocalThe initial anchor point on body 1 in local-space
anchorPointBody2LocalThe initial anchor point on body 2 in local-space
rotationBody1AxisLocalThe initial rotation axis on body 1 in local-space
rotationBody2AxisLocalThe initial rotation axis on body 2 in local-space

◆ HingeJointInfo() [5/6]

reactphysics3d::HingeJointInfo::HingeJointInfo ( RigidBody rigidBody1,
RigidBody rigidBody2,
const Vector3 anchorPointBody1Local,
const Vector3 anchorPointBody2Local,
const Vector3 rotationBody1AxisLocal,
const Vector3 rotationBody2AxisLocal,
decimal  initMinAngleLimit,
decimal  initMaxAngleLimit 
)
inline

Constructor with limits but without motor with local-space anchors.

Parameters
rigidBody1The first body of the joint
rigidBody2The second body of the joint
anchorPointBody1LocalThe initial anchor point on body 1 in local-space
anchorPointBody2LocalThe initial anchor point on body 2 in local-space
rotationBody1AxisLocalThe initial rotation axis on body 1 in local-space
rotationBody2AxisLocalThe initial rotation axis on body 2 in local-space
initMinAngleLimitThe initial minimum limit angle (in radian)
initMaxAngleLimitThe initial maximum limit angle (in radian)

◆ HingeJointInfo() [6/6]

reactphysics3d::HingeJointInfo::HingeJointInfo ( RigidBody rigidBody1,
RigidBody rigidBody2,
const Vector3 anchorPointBody1Local,
const Vector3 anchorPointBody2Local,
const Vector3 rotationBody1AxisLocal,
const Vector3 rotationBody2AxisLocal,
decimal  initMinAngleLimit,
decimal  initMaxAngleLimit,
decimal  initMotorSpeed,
decimal  initMaxMotorTorque 
)
inline

Constructor with limits and motor with local-space anchors.

Parameters
rigidBody1The first body of the joint
rigidBody2The second body of the joint
anchorPointBody1LocalThe initial anchor point on body 1 in local-space
anchorPointBody2LocalThe initial anchor point on body 2 in local-space
rotationBody1AxisLocalThe initial rotation axis on body 1 in local-space
rotationBody2AxisLocalThe initial rotation axis on body 2 in local-space
initMinAngleLimitThe initial minimum limit angle (in radian)
initMaxAngleLimitThe initial maximum limit angle (in radian)
initMotorSpeedThe initial motor speed of the joint (in radian per second)
initMaxMotorTorqueThe initial maximum motor torque (in Newtons)

Member Data Documentation

◆ maxAngleLimit

decimal reactphysics3d::HingeJointInfo::maxAngleLimit

Maximum allowed rotation angle (in radian) if limits are enabled.

The angle must be in the range [0, 2*pi]

◆ minAngleLimit

decimal reactphysics3d::HingeJointInfo::minAngleLimit

Minimum allowed rotation angle (in radian) if limits are enabled.

The angle must be in the range [-2*pi, 0]


The documentation for this struct was generated from the following file: