class DistanceJoint

Inherits: Joint

A joint that maintains an upper or lower (or both) bound on the distance between two bodies.

Public

Constructors

DistanceJoint

DistanceJoint(const HSceneObject &parent)

Methods

GetDistance

float GetDistance() const

Returns the current distance between the two joint bodies.

SetMinDistance

void SetMinDistance(float value)

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

float GetMinDistance() const

SetMaxDistance

void SetMaxDistance(float value)

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

float GetMaxDistance() const

SetTolerance

void SetTolerance(float value)

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

This value slightly extends the lower and upper limit.

GetTolerance

float GetTolerance() const

SetSpring

void SetSpring(const Spring &value)

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.

GetSpring

Spring GetSpring() const

SetFlag

void SetFlag(DistanceJointFlag flag, bool enabled)

Enables or disables a flag that controls joint behaviour.

HasFlag

bool HasFlag(DistanceJointFlag flag) const

Checks whether a certain joint flag is enabled.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const

Returns an interface you can use to access class' Run Time Type Information.

Internal

Methods

GetImplementation

IDistanceJointImplementation &GetImplementation() const

Returns the low level joint implementation.

Protected

Constructors

DistanceJoint

DistanceJoint()

Methods

CreateImplementation

UPtr<IJointImplementation> CreateImplementation() override

Creates the implementation the joint for use by the component.

Fields

mInformation