ReactPhysics3D: reactphysics3d::HingeJointInfo Struct Reference

| ReactPhysics3D v0.10.2 C++ Physics engine library

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
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:

## 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
RigidBody * | body1
| First rigid body of the joint.
RigidBody * | body2
| 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

  rigidBody1 | The first body of the joint
  rigidBody2 | The second body of the joint
  initAnchorPointWorldSpace | The initial anchor point in world-space coordinates
  initRotationAxisWorld | The 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

  rigidBody1 | The first body of the joint
  rigidBody2 | The second body of the joint
  initAnchorPointWorldSpace | The initial anchor point in world-space coordinates
  initRotationAxisWorld | The intial rotation axis in world-space coordinates
  initMinAngleLimit | The initial minimum limit angle (in radian)
  initMaxAngleLimit | The 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

  rigidBody1 | The first body of the joint
  rigidBody2 | The second body of the joint
  initAnchorPointWorldSpace | The initial anchor point in world-space
  initRotationAxisWorld | The initial rotation axis in world-space
  initMinAngleLimit | The initial minimum limit angle (in radian)
  initMaxAngleLimit | The initial maximum limit angle (in radian)
  initMotorSpeed | The initial motor speed of the joint (in radian per second)
  initMaxMotorTorque | The 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

  rigidBody1 | The first body of the joint
  rigidBody2 | The second body of the joint
  anchorPointBody1Local | The initial anchor point on body 1 in local-space
  anchorPointBody2Local | The initial anchor point on body 2 in local-space
  rotationBody1AxisLocal | The initial rotation axis on body 1 in local-space
  rotationBody2AxisLocal | The 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

  rigidBody1 | The first body of the joint
  rigidBody2 | The second body of the joint
  anchorPointBody1Local | The initial anchor point on body 1 in local-space
  anchorPointBody2Local | The initial anchor point on body 2 in local-space
  rotationBody1AxisLocal | The initial rotation axis on body 1 in local-space
  rotationBody2AxisLocal | The initial rotation axis on body 2 in local-space
  initMinAngleLimit | The initial minimum limit angle (in radian)
  initMaxAngleLimit | The 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

  rigidBody1 | The first body of the joint
  rigidBody2 | The second body of the joint
  anchorPointBody1Local | The initial anchor point on body 1 in local-space
  anchorPointBody2Local | The initial anchor point on body 2 in local-space
  rotationBody1AxisLocal | The initial rotation axis on body 1 in local-space
  rotationBody2AxisLocal | The initial rotation axis on body 2 in local-space
  initMinAngleLimit | The initial minimum limit angle (in radian)
  initMaxAngleLimit | The initial maximum limit angle (in radian)
  initMotorSpeed | The initial motor speed of the joint (in radian per second)
  initMaxMotorTorque | The 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:

- include/reactphysics3d/constraint/HingeJoint.h