class IDistanceJointImplementation

Low-level interface for a joint used by the DistanceJoint component.

Should be implemented by the physics plugin to provide joint functionality.

Public

Methods

GetDistance

virtual float GetDistance() const = 0

Returns the current distance between the two joint bodies.

SetMinDistance

virtual void SetMinDistance(float value) = 0

Determines the minimum distance the bodies are allowed to be at, they will get no closer.

You must enable min distance flag in order for this limit to be applied.

GetMinDistance

virtual float GetMinDistance() const = 0

SetMaxDistance

virtual void SetMaxDistance(float value) = 0

Determines the maximum distance the bodies are allowed to be at, they will get no further.

You must enable max distance flag in order for this limit to be applied.

GetMaxDistance

virtual float GetMaxDistance() const = 0

GetTolerance

virtual float GetTolerance() const = 0

SetTolerance

virtual void SetTolerance(float value) = 0

Determines the error tolerance of the joint at which the joint becomes active.

This value slightly extends the lower and upper limit.

GetSpring

virtual Spring GetSpring() const = 0

SetSpring

virtual void SetSpring(const Spring &value) = 0

Determines a spring that controls how the joint responds when a limit is reached.

You must enable the spring flag on the joint in order for this to be recognized.

SetFlag

virtual void SetFlag(DistanceJointFlag flag, bool enabled) = 0

Enables or disables a flag that controls joint behaviour.

HasFlag

virtual bool HasFlag(DistanceJointFlag flag) const = 0

Checks whether a certain joint flag is enabled.