Libraries.Game.Collision.CollisionPoint3D Documentation
This class stores one of the points of contact during a collision. This class is used by LocalCollisionPoints3D.
Inherits from: Libraries.Language.Object
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.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
GetAppliedImpulse()
This action returns the amount of linear impulse that is applied to this CollisionPoint3D.
Return
number: the amount of linear impulse that is applied to this CollisionPoint3D.
GetAppliedImpulseLateralA()
This action returns the impulse that is applied to simulate friction at this CollisionPoint3D to object A.
Return
number: the impulse that is applied to simulate friction to object A.
GetAppliedImpulseLateralB()
This action returns the impulse that is applied to simulate friction at this CollisionPoint3D to object B.
Return
number: the impulse that is applied to simulate friction to object B.
GetCombinedFriction()
This action returns the friction between the surfaces of objects A and B.
Return
number: the friction between the surfaces of objects A and B.
GetCombinedRestitution()
This action returns the restitution between the surfaces of objects A and B.
Return
number: the restitution between the surfaces of objects A and B.s
GetDistance()
This action gets the distance between objects A and B.
Return
number: the distance between objects A and B.
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetIndexA()
This action returns a number that is not 0 if object A is also getting split into triangle shapes. The number that this action returns identifies which triangle of object A we are referring to.
Return
integer: the index of object A.
GetIndexB()
This action returns a number that is not 0 if object B is also getting split into triangle shapes. The number that this action returns identifies which triangle of object B we are referring to.
Return
integer: the index of object B.
GetLateralFrictionDirectionA()
This action returns which direction the friction impulse is applied to object A.
Return
Libraries.Compute.Vector3: which direction the friction impulse is applied to object A.
GetLateralFrictionDirectionB()
This action returns which direction the friction impulse is applied to object B.
Return
Libraries.Compute.Vector3: which direction the friction impulse is applied to object B.
GetLifeTime()
This action returns how many physics simulation iterations that this CollisionPoint3D has been in.
Return
integer: number of iterations.
GetLocalPointA()
This action returns the contact point on object A in local coordinates to A.
Return
Libraries.Compute.Vector3: the contact point on object A in local coordinates to A.
GetLocalPointB()
This action returns the contact point on object B in local coordinates to B.
Return
Libraries.Compute.Vector3: the contact point on object B in local coordinates to B.
GetPartIDA()
This action returns a number that is not 0 if object A is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker. The number that is action returns would be used to identify which convex piece of object A we are referring to.
Return
integer: id of object A
GetPartIDB()
This action returns a number that is not 0 if object B is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker. The number that is action returns would be used to identify which convex piece of object B we are referring to.
Return
integer: id of object B.
GetPersistentData()
This action returns a data holder, which is the class CollisionPersistentData, that records all of the forces, impulses, friction, penetration, and other information about this CollisionPoint3D.
Return
Libraries.Game.Physics.CollisionPersistentData: a data holder.
GetPositionWorldOnA(Libraries.Compute.Vector3 out)
This action returns the contact point on object A in world coordinates.
Parameters
- Libraries.Compute.Vector3: The contact point on object A in world coordinates will be stored inside here as well.
Return
Libraries.Compute.Vector3: the contact point on object A in world coordinates.
GetPositionWorldOnB(Libraries.Compute.Vector3 out)
This action returns the contact point on object B in world coordinates.
Parameters
- Libraries.Compute.Vector3: The contact point on object B in world coordinates will be stored inside here as well.
Return
Libraries.Compute.Vector3: the contact point on object B in world coordinates.
GetWorldNormalOnB()
This action returns the normal vector from B to A that an impulse will be applied to to resolve the collision.
Return
Libraries.Compute.Vector3: the normal vector from B to A.
GetWorldPositionOnA()
This action returns the contact point on object A in world coordinates but also allows you to change the contact point on object A in world coordinates stored in this class is you used actions such as SetX() on the returned point.
Return
Libraries.Compute.Vector3: the contact point on object A in world coordinates.
GetWorldPositionOnB()
This action returns the contact point on object B in world coordinates but also allows you to change the contact point on object B in world coordinates stored in this class is you used actions such as SetX() on the returned point.
Return
Libraries.Compute.Vector3: the contact point on object B in world coordinates.
Initialize(Libraries.Compute.Vector3 pointA, Libraries.Compute.Vector3 pointB, Libraries.Compute.Vector3 normal, number distance)
This action changes the values stored inside this CollisionPoint3D class using the points passed in.
Parameters
- Libraries.Compute.Vector3: The point of collision on the first object.
- Libraries.Compute.Vector3: The point of collision on the second object.
- Libraries.Compute.Vector3: The direction from collision point on B to collision point on A.
- number distance: The shortest distance between the two objects.
IsLateralFrictionInitialized()
This action returns true if the friction at this CollisionPoint3D is set. This action is used in the CollisionSolver3D class.
Return
boolean: true if the friction at this CollisionPoint3D is set
Set(Libraries.Game.Collision.CollisionPoint3D point)
This action sets the current CollisionPoint3D using another CollisionPoint3D.
Parameters
- Libraries.Game.Collision.CollisionPoint3D: The other CollisionPoint3D.
SetAppliedImpulse(number impulse)
This action sets the amount of linear impulse that is applied to this CollisionPoint3D.
Parameters
- number impulse: The amount of linear impulse that is applied to this CollisionPoint3D.
SetAppliedImpulseLateralA(number lateral)
This action sets the impulse that is applied to simulate friction at this CollisionPoint3D to object A.
Parameters
- number lateral: The impulse that is applied to simulate friction to object A.
SetAppliedImpulseLateralB(number lateral)
This action sets the impulse that is applied to simulate friction at this CollisionPoint3D to object B.
Parameters
- number lateral: The impulse that is applied to simulate friction to object B.
SetCombinedFriction(number friction)
This action sets the friction between the surfaces of objects A and B.
Parameters
- number friction: The friction between the surfaces of objects A and B.
SetCombinedRestitution(number restitution)
This action sets the restitution between the surfaces of objects A and B.
Parameters
- number restitution: The restitution between the surfaces of objects A and B.
SetDistance(number distance)
This action sets the distance between objects A and B.
Parameters
- number distance: The distance between objects A and B.
SetIndexA(integer index)
This action sets a number that is not 0 if object A is also getting split into triangle shapes.
Parameters
- integer index: The index of object A.
SetIndexB(integer index)
This action returns a number that is not 0 if object B is also getting split into triangle shapes.
Parameters
- integer index: The index of object B.
SetLateralFrictionDirectionA(Libraries.Compute.Vector3 direction)
This action sets which direction the friction impulse is applied to object A.
Parameters
- Libraries.Compute.Vector3: The direction that the friction impulse is applied to object A.
SetLateralFrictionDirectionB(Libraries.Compute.Vector3 direction)
This action sets which direction the friction impulse is applied to object B.
Parameters
- Libraries.Compute.Vector3: The direction that the friction impulse is applied to object B.
SetLateralFrictionInitialized(boolean flag)
This action either turns on or off the friction at this CollisionPoint3D.
Parameters
- boolean flag: Sets whether you want to turn on or off the friction.
SetLifeTime(integer lifeTime)
This action sets how many physics simulation iterations that this CollisionPoint3D has been in. When this CollisionPoint3D is no longer a collision point between objects A and B, its life time will degrade to 0. This action is used by the action "RefreshCollisionPoints" inside the LocalCollisionPoints3D class.
Parameters
- integer lifeTime: The number of iterations.
SetLocalPointA(Libraries.Compute.Vector3 point)
This action sets the contact point on object A in local coordinates to A.
Parameters
- Libraries.Compute.Vector3: The contact point on object A in local coordinates to A.
SetLocalPointB(Libraries.Compute.Vector3 point)
This action sets the contact point on object B in local coordinates to B.
Parameters
- Libraries.Compute.Vector3: The contact point on object B in local coordinates to B.
SetPartIDA(integer id)
This action sets a number that is not 0 if object A is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker.
Parameters
- integer id: The id of object A.
SetPartIDB(integer id)
This action sets a number that is not 0 if object B is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker.
Parameters
- integer id: The id of object B.
SetPersistentData(Libraries.Game.Physics.CollisionPersistentData data)
This action sets a data holder, which is the class CollisionPersistentData.
Parameters
- Libraries.Game.Physics.CollisionPersistentData: The data holder.
SetWorldNormalOnB(Libraries.Compute.Vector3 normal)
This action sets the normal vector from B to A that an impulse will be applied to to resolve the collision.
Parameters
- Libraries.Compute.Vector3: The normal vector from B to A.
SetWorldPositionOnA(Libraries.Compute.Vector3 position)
This action sets the contact point on object A in world coordinates.
Parameters
- Libraries.Compute.Vector3: The the contact point on object A in world coordinates
SetWorldPositionOnB(Libraries.Compute.Vector3 position)
This action sets the contact point on object B in world coordinates.
Parameters
- Libraries.Compute.Vector3: The contact point on object B in world coordinates.
On this page
Variables TableAction Documentation- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetAppliedImpulse()
- GetAppliedImpulseLateralA()
- GetAppliedImpulseLateralB()
- GetCombinedFriction()
- GetCombinedRestitution()
- GetDistance()
- GetHashCode()
- GetIndexA()
- GetIndexB()
- GetLateralFrictionDirectionA()
- GetLateralFrictionDirectionB()
- GetLifeTime()
- GetLocalPointA()
- GetLocalPointB()
- GetPartIDA()
- GetPartIDB()
- GetPersistentData()
- GetPositionWorldOnA(Libraries.Compute.Vector3 out)
- GetPositionWorldOnB(Libraries.Compute.Vector3 out)
- GetWorldNormalOnB()
- GetWorldPositionOnA()
- GetWorldPositionOnB()
- Initialize(Libraries.Compute.Vector3 pointA, Libraries.Compute.Vector3 pointB, Libraries.Compute.Vector3 normal, number distance)
- IsLateralFrictionInitialized()
- Set(Libraries.Game.Collision.CollisionPoint3D point)
- SetAppliedImpulse(number impulse)
- SetAppliedImpulseLateralA(number lateral)
- SetAppliedImpulseLateralB(number lateral)
- SetCombinedFriction(number friction)
- SetCombinedRestitution(num