Class BulletConeTwistJoint3D
The BulletConeTwistJoint3D is a base class for all 3D joints implemented by Bullet.
Inheritance
Inherited Members
Namespace: Evergine.Bullet
Assembly: Evergine.Bullet.dll
Syntax
public class BulletConeTwistJoint3D : BulletJoint3D<ConeTwistConstraint, ConeTwistJointDef3D>, IConeTwistJoint3D, IJoint3D, IDisposable
Constructors
BulletConeTwistJoint3D(BulletPhysicManager3D, ConeTwistJointDef3D)
Initializes a new instance of the BulletConeTwistJoint3D class.
Declaration
public BulletConeTwistJoint3D(BulletPhysicManager3D simulation, ConeTwistJointDef3D def)
Parameters
Type | Name | Description |
---|---|---|
BulletPhysicManager3D | simulation | The bullet simulation instance. |
ConeTwistJointDef3D | 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 |
Damping
Gets or sets the damping value.
Declaration
public float Damping { get; set; }
Property Value
Type | Description |
---|---|
float |
FixThresh
Gets or sets the fix thresh.
Declaration
public float FixThresh { get; set; }
Property Value
Type | Description |
---|---|
float |
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 |
IsMaxMotorImpulseNormalized
Gets a value indicating whether this motor impulse is normalized.
Declaration
public bool IsMaxMotorImpulseNormalized { get; }
Property Value
Type | Description |
---|---|
bool |
IsMotorEnabled
Gets or sets a value indicating whether this motor is enabled.
Declaration
public bool IsMotorEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsPastSwingLimit
Gets a value indicating whether the swing limit is past.
Declaration
public bool IsPastSwingLimit { get; }
Property Value
Type | Description |
---|---|
bool |
LimitSoftness
Gets the limit softness.
Declaration
public float LimitSoftness { 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 |
MotorTarget
Gets or sets the motor target.
Declaration
public Quaternion MotorTarget { get; set; }
Property Value
Type | Description |
---|---|
Quaternion |
RelaxationFactor
Gets the relaxation factor.
Declaration
public float RelaxationFactor { get; }
Property Value
Type | Description |
---|---|
float |
SolveSwingLimit
Gets the swing solve limit.
Declaration
public int SolveSwingLimit { get; }
Property Value
Type | Description |
---|---|
int |
SolveTwistLimit
Gets the twist solve limit.
Declaration
public int SolveTwistLimit { get; }
Property Value
Type | Description |
---|---|
int |
SwingSpan1
Gets the swing span 1.
Declaration
public float SwingSpan1 { get; }
Property Value
Type | Description |
---|---|
float |
SwingSpan2
Gets the swing span 2.
Declaration
public float SwingSpan2 { get; }
Property Value
Type | Description |
---|---|
float |
TwistLimitSign
Gets or sets sign of twist limit.
Declaration
public float TwistLimitSign { get; set; }
Property Value
Type | Description |
---|---|
float |
TwistSpan
Gets the twist span.
Declaration
public float TwistSpan { get; }
Property Value
Type | Description |
---|---|
float |
Methods
CreateJoint()
Instantiate joint.
Declaration
protected override ConeTwistConstraint CreateJoint()
Returns
Type | Description |
---|---|
ConeTwistConstraint | The new joint. |
Overrides
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, float)
Set limits.
Declaration
public void SetLimit(float swingSpan1, float swingSpan2, float twistSpan, float softness = 1, float biasFactor = 0.3, float relaxationFactor = 1)
Parameters
Type | Name | Description |
---|---|---|
float | swingSpan1 | The swing span 1. |
float | swingSpan2 | The swing span 2. |
float | twistSpan | The twist span. |
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. |
SetMaxMotorImpulseNormalized(float)
Sets the max motor impulse normalized.
Declaration
public void SetMaxMotorImpulseNormalized(float impulse)
Parameters
Type | Name | Description |
---|---|---|
float | impulse | The impulse. |
SetMotorTargetInConstraintSpace(Quaternion)
Set the motor target in constraint space.
Declaration
public void SetMotorTargetInConstraintSpace(Quaternion target)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | target | The target orientation. |