Libraries.Game.Physics.SolverItem3D Documentation

This class is a temporary storage location for the properties of a 3D item so that the actions inside CollisionSolver3D can run a little quicker.

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetAngularFactor()This action returns the angular factor.
GetAngularVelocity()This action returns the angular velocity stored inside this SolverItem3D class.
GetCenterOfMassPosition()This action returns where the center of the 3D object is.
GetFriction()This action returns the friction stored inside this SolverItem3D class.
GetHashCode()This action gets the hash code for an object.
GetInverseMass()This action returns the 1/mass value stored inside this SolverItem3D class.
GetLinearVelocity()This action returns the linear velocity stored inside this SolverItem3D class.
GetOriginalItem()This action returns which 3D object is attached to this SolverItem3D.
GetPushVelocity()This action returns the push velocity.
GetTurnVelocity()This action returns the turn velocity.
GetVelocityInLocalPoint(Libraries.Compute.Vector3 relativePosition, Libraries.Compute.Vector3 velocity)This action lets you know the linear velocity of a point "Vector3 relativePosition" on this 3D object.
InternalApplyImpulse(Libraries.Compute.Vector3 linearComponent, Libraries.Compute.Vector3 angularComponent, number impulseMagnitude)This action allows you to add linear velocity, "Vector3 linearComponent," and add angular velocity, "Vector3 angularComponent," both scaled by "number impulseMagnitude" to the current linear velocity and angular velocity of this 3D object.
InternalApplyPushImpulse(Libraries.Compute.Vector3 linearComponent, Libraries.Compute.Vector3 angularComponent, number impulseMagnitude)This action allows you to add linear velocity, "Vector3 linearComponent," and add angular velocity, "Vector3 angularComponent," both scaled by "number impulseMagnitude" to the current push linear velocity and push angular velocity of this 3D object.
ReadVelocity()This action stores the linear and angular velocities of the 3D item that is attached to this SolverItem3D inside this SolverItem3D so that if we need the same linear and angular velocities again, we don't have to as the Item3D class to give us these velocities, which will make our program quicker.
SetAngularFactor(number factor)This action sets the angular factor.
SetAngularVelocity(Libraries.Compute.Vector3 velocity)This action sets the angular velocity stored inside this SolverItem3D class.
SetCenterOfMassPosition(Libraries.Compute.Vector3 position)This action sets where the center of the 3D object is.
SetFriction(number friction)This action sets the friction stored inside this SolverItem3D class.
SetInverseMass(number inverseMass)This action sets the 1/mass value stored inside this SolverItem3D class.
SetLinearVelocity(Libraries.Compute.Vector3 velocity)This action sets the linear velocity stored inside this SolverItem3D class.
SetOriginalItem(Libraries.Interface.Item3D item)This action sets which 3D object is attached to this SolverItem3D.
SetPushVelocity(Libraries.Compute.Vector3 velocity)This action sets the push velocity.
SetTurnVelocity(Libraries.Compute.Vector3 velocity)This action sets the turn velocity.
WriteBackVelocity(number timeStep)This action updates the angular and linear velocities in the 3D object that is attached to this SolverItem3D using a predicted angular and linear velocities.
WriteBackVelocity()This action updates the angular and linear velocities in the 3D object that is attached to this SolverItem3D.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Parameters

Return

integer: 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.

GetAngularFactor()

This action returns the angular factor.

Return

number: the angular factor.

GetAngularVelocity()

This action returns the angular velocity stored inside this SolverItem3D class.

Return

Libraries.Compute.Vector3: the angular velocity stored inside this SolverItem3D class.

GetCenterOfMassPosition()

This action returns where the center of the 3D object is.

Return

Libraries.Compute.Vector3: the center of the 3D object.

GetFriction()

This action returns the friction stored inside this SolverItem3D class.

Return

number: the coefficient of friction.

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.

GetInverseMass()

This action returns the 1/mass value stored inside this SolverItem3D class.

Return

number: the 1/mass value stored inside this SolverItem3D class.

GetLinearVelocity()

This action returns the linear velocity stored inside this SolverItem3D class.

Return

Libraries.Compute.Vector3: the linear velocity of the 3D object.

GetOriginalItem()

This action returns which 3D object is attached to this SolverItem3D.

Return

Libraries.Interface.Item3D: the 3D object is attached to this SolverItem3D.

GetPushVelocity()

This action returns the push velocity.

Return

Libraries.Compute.Vector3: the push velocity.

GetTurnVelocity()

This action returns the turn velocity.

Return

Libraries.Compute.Vector3: the turn velocity.

GetVelocityInLocalPoint(Libraries.Compute.Vector3 relativePosition, Libraries.Compute.Vector3 velocity)

This action lets you know the linear velocity of a point "Vector3 relativePosition" on this 3D object.

Parameters

InternalApplyImpulse(Libraries.Compute.Vector3 linearComponent, Libraries.Compute.Vector3 angularComponent, number impulseMagnitude)

This action allows you to add linear velocity, "Vector3 linearComponent," and add angular velocity, "Vector3 angularComponent," both scaled by "number impulseMagnitude" to the current linear velocity and angular velocity of this 3D object.

Parameters

InternalApplyPushImpulse(Libraries.Compute.Vector3 linearComponent, Libraries.Compute.Vector3 angularComponent, number impulseMagnitude)

This action allows you to add linear velocity, "Vector3 linearComponent," and add angular velocity, "Vector3 angularComponent," both scaled by "number impulseMagnitude" to the current push linear velocity and push angular velocity of this 3D object.

Parameters

ReadVelocity()

This action stores the linear and angular velocities of the 3D item that is attached to this SolverItem3D inside this SolverItem3D so that if we need the same linear and angular velocities again, we don't have to as the Item3D class to give us these velocities, which will make our program quicker.

SetAngularFactor(number factor)

This action sets the angular factor.

Parameters

SetAngularVelocity(Libraries.Compute.Vector3 velocity)

This action sets the angular velocity stored inside this SolverItem3D class.

Parameters

SetCenterOfMassPosition(Libraries.Compute.Vector3 position)

This action sets where the center of the 3D object is.

Parameters

SetFriction(number friction)

This action sets the friction stored inside this SolverItem3D class.

Parameters

SetInverseMass(number inverseMass)

This action sets the 1/mass value stored inside this SolverItem3D class.

Parameters

SetLinearVelocity(Libraries.Compute.Vector3 velocity)

This action sets the linear velocity stored inside this SolverItem3D class.

Parameters

SetOriginalItem(Libraries.Interface.Item3D item)

This action sets which 3D object is attached to this SolverItem3D.

Parameters

SetPushVelocity(Libraries.Compute.Vector3 velocity)

This action sets the push velocity.

Parameters

SetTurnVelocity(Libraries.Compute.Vector3 velocity)

This action sets the turn velocity.

Parameters

WriteBackVelocity(number timeStep)

This action updates the angular and linear velocities in the 3D object that is attached to this SolverItem3D using a predicted angular and linear velocities. This also updates that 3D object's position with a predicted position.

Parameters

WriteBackVelocity()

This action updates the angular and linear velocities in the 3D object that is attached to this SolverItem3D.