Libraries.Game.Collision.Shapes.CollisionShape3D Documentation

This class is used by Box, Cylinder, and Sphere classes to record some of the properties that Box, Cylinder, and Sphere have in common.

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
integer MAX_PREFERRED_PENETRATION_DIRECTIONS
integer CYLINDER
integer SPHERE
integer BOX

Actions Summary Table

ActionsDescription
CalculateLocalInertia(number mass, Libraries.Compute.Vector3 intertia)
CalculateTemporalBoundingBox(Libraries.Game.Collision.PhysicsPosition3D currentTransform, Libraries.Compute.Vector3 linearVelocity, Libraries.Compute.Vector3 angularVelocity, number timeStep, Libraries.Game.BoundingBox temporalBoundingBox)This action calculates the rectangular cube that will contain both the object in its position currently and also contain the object in a position after "timeStep" seconds from now.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
ComputeBoundingBox(Libraries.Game.BoundingBox boundingBox, Libraries.Game.Collision.PhysicsPosition3D transform)
Copy()
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetAngularMotionDisc()This calculates the maximum distance between any point to the center of the 3D object.
GetBoundingSphere(Libraries.Compute.Vector3 center)This action finds the center (relative to the object's local origin) and the radius of a sphere that would bound the object that is at its current position.
GetChildCount()
GetHashCode()This action gets the hash code for an object.
GetLocalScaling(Libraries.Compute.Vector3 out)This action returns how the 3D object has been scaled to the shape that it has right now.
GetMargin()This action returns the offset of the box that will bound the object to prevent objects going through each other graphically.
GetNumberPreferredPenetrationDirections()
GetPreferredPenetrationDirection(integer index, Libraries.Compute.Vector3 penetrationVector)
GetType()This action returns what type of 3D object the 3D object is.
LocalGetSupportingVertex(Libraries.Compute.Vector3 vector)
LocalGetSupportingVertexWithoutMargin(Libraries.Compute.Vector3 vector)
Scale(Libraries.Compute.Vector3 scale)This action sets how big the 3D object is, scaling from the current size of the 3D object.
SetLocalScaling(Libraries.Compute.Vector3 scaling)This action sets how big the 3D object is, scaling from the default size of the 3D object.
SetMargin(number margin)This action sets the offset of the box that will bound the object to prevent objects going through each other graphically.
SetType(integer type)This action sets what type of 3D object this 3D object is.

Actions Documentation

CalculateLocalInertia(number mass, Libraries.Compute.Vector3 intertia)

Parameters

CalculateTemporalBoundingBox(Libraries.Game.Collision.PhysicsPosition3D currentTransform, Libraries.Compute.Vector3 linearVelocity, Libraries.Compute.Vector3 angularVelocity, number timeStep, Libraries.Game.BoundingBox temporalBoundingBox)

This action calculates the rectangular cube that will contain both the object in its position currently and also contain the object in a position after "timeStep" seconds from now.

Parameters

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.

ComputeBoundingBox(Libraries.Game.BoundingBox boundingBox, Libraries.Game.Collision.PhysicsPosition3D transform)

Parameters

Copy()

Return

Libraries.Game.Collision.Shapes.CollisionShape3D

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.

GetAngularMotionDisc()

This calculates the maximum distance between any point to the center of the 3D object.

Return

number:

GetBoundingSphere(Libraries.Compute.Vector3 center)

This action finds the center (relative to the object's local origin) and the radius of a sphere that would bound the object that is at its current position.

Parameters

Return

number:

GetChildCount()

Return

integer

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.

GetLocalScaling(Libraries.Compute.Vector3 out)

This action returns how the 3D object has been scaled to the shape that it has right now.

Parameters

Return

Libraries.Compute.Vector3:

GetMargin()

This action returns the offset of the box that will bound the object to prevent objects going through each other graphically.

Return

number:

GetNumberPreferredPenetrationDirections()

Return

integer

GetPreferredPenetrationDirection(integer index, Libraries.Compute.Vector3 penetrationVector)

Parameters

GetType()

This action returns what type of 3D object the 3D object is.

Return

integer:

LocalGetSupportingVertex(Libraries.Compute.Vector3 vector)

Parameters

Return

Libraries.Compute.Vector3

LocalGetSupportingVertexWithoutMargin(Libraries.Compute.Vector3 vector)

Parameters

Return

Libraries.Compute.Vector3

Scale(Libraries.Compute.Vector3 scale)

This action sets how big the 3D object is, scaling from the current size of the 3D object.

Parameters

SetLocalScaling(Libraries.Compute.Vector3 scaling)

This action sets how big the 3D object is, scaling from the default size of the 3D object.

Parameters

SetMargin(number margin)

This action sets the offset of the box that will bound the object to prevent objects going through each other graphically.

Parameters

SetType(integer type)

This action sets what type of 3D object this 3D object is.

Parameters