Class DistanceJoint
Physics joint that maintains an upper or lower (or both) bound on the distance between two bodies.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Physics/Joints/DistanceJoint.h
Syntax
public class DistanceJoint : 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
GetCurrentDistance()
Gets the current distance of the joint.
Declaration
public float GetCurrentDistance() const
Returns
float
|
GetFlags()
Gets the joint mode flags. Controls joint behaviour.
Declaration
public DistanceJointFlag GetFlags() const
Returns
DistanceJointFlag
|
GetMaxDistance()
Gets the allowed maximum distance for the joint.
Used only when DistanceJointFlag.MaxDistance flag is set. The maximum distance must be no less than the minimum distance. Default: 0, Range: [0, float.MaxValue].
Declaration
public float GetMaxDistance() const
Returns
float
|
GetMinDistance()
Gets the allowed minimum distance for the joint.
Used only when DistanceJointFlag.MinDistance flag is set. The minimum distance must be no more than the maximum distance. Default: 0, Range: [0, float.MaxValue].
Declaration
public float GetMinDistance() const
Returns
float
|
GetSpringParameters()
Gets the spring parameters.
Declaration
public SpringParameters GetSpringParameters() const
Returns
SpringParameters
|
GetTolerance()
Gets the error tolerance of the joint.
The distance beyond the joint's [min, max] range before the joint becomes active. Default: 25, Range: [0.1, float.MaxValue].
Declaration
public float GetTolerance() const
Returns
float
|
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
SetFlags(DistanceJointFlag value)
Sets the joint mode flags. Controls joint behaviour.
Declaration
public void SetFlags(DistanceJointFlag value)
Parameters
DistanceJointFlag
value
|
SetMaxDistance(float value)
Sets the allowed maximum distance for the joint.
Used only when DistanceJointFlag.MaxDistance flag is set. The maximum distance must be no less than the minimum distance. Default: 0, Range: [0, float.MaxValue].
Declaration
public void SetMaxDistance(float value)
Parameters
float
value
|
SetMinDistance(float value)
Sets the allowed minimum distance for the joint.
Used only when DistanceJointFlag.MinDistance flag is set. The minimum distance must be no more than the maximum distance. Default: 0, Range: [0, float.MaxValue].
Declaration
public void SetMinDistance(float value)
Parameters
float
value
|
SetSpringParameters(const SpringParameters& value)
Sets the spring parameters.
Declaration
public void SetSpringParameters(const SpringParameters& value)
Parameters
SpringParameters
value
|
SetTolerance(float value)
Sets the error tolerance of the joint.
The distance beyond the joint's [min, max] range before the joint becomes active. Default: 25, Range: [0.1, float.MaxValue].
Declaration
public void SetTolerance(float value)
Parameters
float
value
|