Class D6Joint
Physics joint that is the most customizable type of joint. This joint type can be used to create all other built-in joint types, and to design your own custom ones, but is less intuitive to use. Allows a specification of a linear constraint (for example for a slider), twist constraint (rotating around X) and swing constraint (rotating around Y and Z). It also allows you to constrain limits to only specific axes or completely lock specific axes.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Physics/Joints/D6Joint.h
Syntax
public class D6Joint : public Joint
Methods
CreateJoint(const PhysicsJointDesc& desc)
Declaration
protected void* CreateJoint(const PhysicsJointDesc& desc) override
Parameters
PhysicsJointDesc
desc
|
Returns
void
|
Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
Deserializes object from the input stream.
Declaration
public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
Parameters
DeserializeStream
stream
The input stream. |
ISerializeModifier
modifier
The deserialization modifier object. Always valid. |
Overrides
GetCurrentSwingY()
Gets the current swing angle of the joint from the Y axis.
Declaration
public float GetCurrentSwingY() const
Returns
float
|
GetCurrentSwingZ()
Gets the current swing angle of the joint from the Z axis.
Declaration
public float GetCurrentSwingZ() const
Returns
float
|
GetCurrentTwist()
Gets the twist angle of the joint (in the range (-2Pi, 2Pi]).
Declaration
public float GetCurrentTwist() const
Returns
float
|
GetDrive(const D6JointDriveType index)
Gets the drive parameters for the specified drive type.
Declaration
public D6JointDrive GetDrive(const D6JointDriveType index) const
Parameters
D6JointDriveType
index
The type of drive being specified. |
Returns
D6JointDrive
The value. |
GetDriveAngularVelocity()
Gets the drive's target angular velocity.
Declaration
public Vector3 GetDriveAngularVelocity() const
Returns
Vector3
|
GetDriveLinearVelocity()
Gets the drive's target linear velocity.
Declaration
public Vector3 GetDriveLinearVelocity() const
Returns
Vector3
|
GetDrivePosition()
Gets the drive's target position relative to the joint's first body.
Declaration
public Vector3 GetDrivePosition() const
Returns
Vector3
|
GetDriveRotation()
Gets the drive's target rotation relative to the joint's first body.
Declaration
public Quaternion GetDriveRotation() const
Returns
Quaternion
|
GetLimitLinear()
Determines the linear limit used for constraining translation degrees of freedom.
Declaration
public LimitLinear GetLimitLinear() const
Returns
LimitLinear
|
GetLimitSwing()
Determines the cone limit used for constraining the swing (rotation around Y and Z) degree of freedom.
Declaration
public LimitConeRange GetLimitSwing() const
Returns
LimitConeRange
|
GetLimitTwist()
Determines the angular limit used for constraining the twist (rotation around X) degree of freedom.
Declaration
public LimitAngularRange GetLimitTwist() const
Returns
LimitAngularRange
|
GetMotion(const D6JointAxis axis)
Gets the motion type around the specified axis.
Each axis may independently specify that the degree of freedom is locked (blocking relative movement along or around this axis), limited by the corresponding limit, or free.
Declaration
public D6JointMotion GetMotion(const D6JointAxis axis) const
Parameters
D6JointAxis
axis
The axis the degree of freedom around which the motion type is specified. |
Returns
D6JointMotion
The value. |
OnDebugDrawSelected()
Draws debug shapes for the selected actor and all child scripts.
Declaration
public virtual void OnDebugDrawSelected() override
Overrides
Serialize(SerializeStream& stream, const void* otherObj)
Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.
Declaration
public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
Parameters
SerializeStream
stream
The output stream. |
void
otherObj
The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties. |
Overrides
SetDrive(const D6JointDriveType index, const D6JointDrive& value)
Sets the drive parameters for the specified drive type.
Declaration
public void SetDrive(const D6JointDriveType index, const D6JointDrive& value)
Parameters
D6JointDriveType
index
The type of drive being specified. |
D6JointDrive
value
The value. |
SetDriveAngularVelocity(const Vector3& value)
Sets the drive's target angular velocity.
Declaration
public void SetDriveAngularVelocity(const Vector3& value)
Parameters
Vector3
value
|
SetDriveLinearVelocity(const Vector3& value)
Sets the drive's target linear velocity.
Declaration
public void SetDriveLinearVelocity(const Vector3& value)
Parameters
Vector3
value
|
SetDrivePosition(const Vector3& value)
Sets the drive's target position relative to the joint's first body.
Declaration
public void SetDrivePosition(const Vector3& value)
Parameters
Vector3
value
|
SetDriveRotation(const Quaternion& value)
Sets the drive's target rotation relative to the joint's first body.
Declaration
public void SetDriveRotation(const Quaternion& value)
Parameters
Quaternion
value
|
SetLimitLinear(const LimitLinear& value)
Determines the linear limit used for constraining translation degrees of freedom.
Declaration
public void SetLimitLinear(const LimitLinear& value)
Parameters
LimitLinear
value
|
SetLimitSwing(const LimitConeRange& value)
Determines the cone limit used for constraining the swing (rotation around Y and Z) degree of freedom.
Declaration
public void SetLimitSwing(const LimitConeRange& value)
Parameters
LimitConeRange
value
|
SetLimitTwist(const LimitAngularRange& value)
Determines the angular limit used for constraining the twist (rotation around X) degree of freedom.
Declaration
public void SetLimitTwist(const LimitAngularRange& value)
Parameters
LimitAngularRange
value
|
SetMotion(const D6JointAxis axis, const D6JointMotion value)
Sets the motion type around the specified axis.
Each axis may independently specify that the degree of freedom is locked (blocking relative movement along or around this axis), limited by the corresponding limit, or free.
Declaration
public void SetMotion(const D6JointAxis axis, const D6JointMotion value)
Parameters
D6JointAxis
axis
The axis the degree of freedom around which the motion type is specified. |
D6JointMotion
value
The value. |