Libraries.Game.Physics.Joints.TranslationalLimitMotor3D Documentation

This class stores information of how much a 3D joint (so that the body can slide along an axis and also rotate around this axis) can slide and rotate.

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetAccumulatedImpulse()This action returns how much impulse has been applied to the object because of this joint.
GetCurrentLinearDiff()This action returns how far you are from the range of the positions that the slider can be in.
GetDamping()This action returns how fast you want the slider to stop oscillating when the slider is trying to reach the target position.
GetHashCode()This action gets the hash code for an object.
GetLimitSoftness()This action returns how much you care about if the slider goes out of the range of the position limit.
GetLowerLimit()This action returns the minimum position that the sliding object can be at.
GetRestitution()This action returns a number that tells you how fast you would want the slider to correct its velocity.
GetUpperLimit()This action returns the maximum position that the sliding object can be at.
IsLimited(integer limitIndex)This action lets you know if any of the sliding has been limited.
NeedApplyForces(integer index)This action tells you whether you need to apply forces to the objects that is constrained by this joint.
Set(Libraries.Game.Physics.Joints.TranslationalLimitMotor3D other)This action sets the values inside this TranslationalLimitMotor3D using another TranslationalLimitMotor3D.
SetAccumulatedImpulse(number x, number y, number z)This action sets the total amount of impulse that is applied to the objects to make sure that this joint stays intact.
SetCurrentLinearDiff(Libraries.Compute.Vector3 diff)This action sets how far you are from the range of the positions that the slider can be in.
SetLowerLimit(Libraries.Compute.Vector3 limit)This action sets the minimum position that the sliding object can be at.
SetUpperLimit(Libraries.Compute.Vector3 limit)This action sets the maximum position that the sliding object can be at.
SolveLinearAxis(number timeStep, number jacDiagABInv, Libraries.Interface.Item3D body1, Libraries.Compute.Vector3 pointInA, Libraries.Interface.Item3D body2, Libraries.Compute.Vector3 pointInB, integer limitIndex, Libraries.Compute.Vector3 axisNormalOnA, Libraries.Compute.Vector3 anchorPos)This action makes sure that the bodies joined together by this TranslationalLimitMotor is at where they are supposed to be.
TestLimitValue(integer limitIndex, number testValue)This action tests whether the current position of the object is within the limit of the range of how much that object can slide.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetAccumulatedImpulse()

This action returns how much impulse has been applied to the object because of this joint.

Return

Libraries.Compute.Vector3: how much impulse has been applied to the object because of this joint.

GetCurrentLinearDiff()

This action returns how far you are from the range of the positions that the slider can be in.

Return

Libraries.Compute.Vector3: the position error.

GetDamping()

This action returns how fast you want the slider to stop oscillating when the slider is trying to reach the target position. A number that is closer to 1 means that you don't want the slider to ever oscillate. A number that is closer to 0 means that you are allowing the slider to oscillate forever in the extreme case.

Return

number: the damping value.

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetLimitSoftness()

This action returns how much you care about if the slider goes out of the range of the position limit. A number that is closer to 1 means that you really don't want the slider to go out of the range. A number that is closer to 0 means that you don't care if the slider goes out of the position limit.

Return

number: the limit softness value.

GetLowerLimit()

This action returns the minimum position that the sliding object can be at.

Return

Libraries.Compute.Vector3: the minimum position that the sliding object can be at.

GetRestitution()

This action returns a number that tells you how fast you would want the slider to correct its velocity. 0 means that you will ignore the velocity error between the slider and our desired velocity for the slider to go, 1 means that you want to correct the velocity right away.

Return

number: how fast you would want the slider to correct its velocity.

GetUpperLimit()

This action returns the maximum position that the sliding object can be at.

Return

Libraries.Compute.Vector3: the maximum position that the sliding object can be at.

IsLimited(integer limitIndex)

This action lets you know if any of the sliding has been limited.

Parameters

Return

boolean:

NeedApplyForces(integer index)

This action tells you whether you need to apply forces to the objects that is constrained by this joint.

Parameters

Return

boolean: 0 for you don't need to apply forces on the axis that you check, 1 you do need to apply forces.

Set(Libraries.Game.Physics.Joints.TranslationalLimitMotor3D other)

This action sets the values inside this TranslationalLimitMotor3D using another TranslationalLimitMotor3D.

Parameters

SetAccumulatedImpulse(number x, number y, number z)

This action sets the total amount of impulse that is applied to the objects to make sure that this joint stays intact.

Parameters

SetCurrentLinearDiff(Libraries.Compute.Vector3 diff)

This action sets how far you are from the range of the positions that the slider can be in.

Parameters

SetLowerLimit(Libraries.Compute.Vector3 limit)

This action sets the minimum position that the sliding object can be at.

Parameters

SetUpperLimit(Libraries.Compute.Vector3 limit)

This action sets the maximum position that the sliding object can be at.

Parameters

SolveLinearAxis(number timeStep, number jacDiagABInv, Libraries.Interface.Item3D body1, Libraries.Compute.Vector3 pointInA, Libraries.Interface.Item3D body2, Libraries.Compute.Vector3 pointInB, integer limitIndex, Libraries.Compute.Vector3 axisNormalOnA, Libraries.Compute.Vector3 anchorPos)

This action makes sure that the bodies joined together by this TranslationalLimitMotor is at where they are supposed to be.

Parameters

Return

number: the velocity that you want to add to the current velocity to make sure that the slider is within the position range that we want it to be.

TestLimitValue(integer limitIndex, number testValue)

This action tests whether the current position of the object is within the limit of the range of how much that object can slide.

Parameters

Return

integer: 0 if the limits aren't set in the first place or test value is within limit, 1 if test value is lower than the lowest limit, 2 if the test value is higher than the highest limit.