Class BulletHingeJoint3D
The BulletJoint3D is a base class for all 3D joints implemented by Bullet.
Inherited Members
Namespace: Evergine.Bullet
Assembly: Evergine.Bullet.dll
Syntax
public class BulletHingeJoint3D : BulletJoint3D<HingeConstraint, HingeJointDef3D>, IHingeJoint3D, IJoint3D
Constructors
BulletHingeJoint3D(BulletPhysicManager3D, HingeJointDef3D)
Initializes a new instance of the BulletHingeJoint3D class.
Declaration
public BulletHingeJoint3D(BulletPhysicManager3D simulation, HingeJointDef3D def)
Parameters
Type | Name | Description |
---|---|---|
BulletPhysicManager3D | simulation | The bullet simulation instance. |
HingeJointDef3D | def | The definition. |
Properties
AFrame
Gets the Reference frame on Body A.
Declaration
public Matrix4x4 AFrame { get; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
AngularOnly
Gets or sets a value indicating whether only affects angular movement to the joint.
Declaration
public bool AngularOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
BFrame
Gets the Reference frame on Body B.
Declaration
public Matrix4x4 BFrame { get; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
EnableMotor
Gets or sets a value indicating whether the motor is enabled.
Declaration
public bool EnableMotor { get; set; }
Property Value
Type | Description |
---|---|
bool |
Flags
Gets the hinge flags.
Declaration
public int Flags { get; }
Property Value
Type | Description |
---|---|
int |
FrameOffsetA
Gets the frame offset for body A.
Declaration
public Matrix4x4 FrameOffsetA { get; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
FrameOffsetB
Gets the frame offset for body B.
Declaration
public Matrix4x4 FrameOffsetB { get; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
HasLimit
Gets a value indicating whether this joint has limits.
Declaration
public bool HasLimit { get; }
Property Value
Type | Description |
---|---|
bool |
HingeAngle
Gets the angle of the joint.
Declaration
public float HingeAngle { get; }
Property Value
Type | Description |
---|---|
float |
LimitBiasFactor
Gets the Limit bias factor.
Declaration
public float LimitBiasFactor { get; }
Property Value
Type | Description |
---|---|
float |
LimitRelaxationFactor
Gets the limit relaxation factor.
Declaration
public float LimitRelaxationFactor { get; }
Property Value
Type | Description |
---|---|
float |
LimitSign
Gets the limit sign.
Declaration
public float LimitSign { get; }
Property Value
Type | Description |
---|---|
float |
LimitSoftness
Gets the limit softness.
Declaration
public float LimitSoftness { get; }
Property Value
Type | Description |
---|---|
float |
LowerLimit
Gets the lower limit.
Declaration
public float LowerLimit { get; }
Property Value
Type | Description |
---|---|
float |
MaxMotorImpulse
Gets or sets and sets maximum motor impulse.
Declaration
public float MaxMotorImpulse { get; set; }
Property Value
Type | Description |
---|---|
float |
MotorTargetVelocity
Gets the max motor target velocity.
Declaration
public float MotorTargetVelocity { get; }
Property Value
Type | Description |
---|---|
float |
SolveLimit
Gets the solve limit.
Declaration
public int SolveLimit { get; }
Property Value
Type | Description |
---|---|
int |
UpperLimit
Gets the upper limit.
Declaration
public float UpperLimit { get; }
Property Value
Type | Description |
---|---|
float |
UseFrameOffset
Gets or sets a value indicating whether the frame offsets are enabled.
Declaration
public bool UseFrameOffset { get; set; }
Property Value
Type | Description |
---|---|
bool |
UseReferenceFrameA
Gets or sets a value indicating whether the joint use A as a Frame reference.
Declaration
public bool UseReferenceFrameA { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
CreateJoint()
Instantiate joint.
Declaration
protected override HingeConstraint CreateJoint()
Returns
Type | Description |
---|---|
HingeConstraint | The new joint. |
Overrides
EnableAngularMotor(bool, float, float)
Enable angular motor.
Declaration
public void EnableAngularMotor(bool motorEnabled, float targetVelocity, float maxMotorImpulse)
Parameters
Type | Name | Description |
---|---|---|
bool | motorEnabled | Motor enabled. |
float | targetVelocity | Target velocity. |
float | maxMotorImpulse | Max motor impulse. |
SetAxis(Vector3)
Set axis.
Declaration
public void SetAxis(Vector3 axis)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | axis | The axis. |
SetFrames(Matrix4x4, Matrix4x4)
Set frames.
Declaration
public void SetFrames(Matrix4x4 frameA, Matrix4x4 frameB)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | frameA | The frame A. |
Matrix4x4 | frameB | The frame B. |
SetLimit(float, float, float, float, float)
Set limits.
Declaration
public void SetLimit(float low, float high, float softness, float biasFactor, float relaxationFactor)
Parameters
Type | Name | Description |
---|---|---|
float | low | The low limit. |
float | high | The high limit. |
float | softness | How much the hinge rotates for a given force. |
float | biasFactor | offset for the relaxed rotation of the hinge. |
float | relaxationFactor | How much force is applied internally to bring the hinge in its central rotation. |
SetMotorTarget(Quaternion, float)
Set motor target.
Declaration
public void SetMotorTarget(Quaternion qAinB, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | qAinB | Quaternion of A in B. |
float | deltaTime | The delta time. |
SetMotorTarget(float, float)
Set motor target.
Declaration
public void SetMotorTarget(float targetAngle, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
float | targetAngle | The target angle. |
float | deltaTime | The delta time. |