Libraries.Game.Graphics.Mesh Documentation

Inherits from: Libraries.Language.Object, Libraries.Game.Disposable

Summary

Actions Summary Table

ActionsDescription
CalculateBoundingBox(Libraries.Game.BoundingBox box)This action will calculate the bounds of this Mesh's vertices, and store it inside the given BoundingBox.
CalculateBoundingBox()This action will create a new BoundingBox object that will contain all of the vertices stored in this Mesh.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Dispose()
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
ExtendBoundingBox(Libraries.Game.BoundingBox box, integer offset, integer count, Libraries.Compute.Matrix4 transform)This action will extend the given BoundingBox to include the vertices of this Mesh.
ExtendBoundingBox(Libraries.Game.BoundingBox box, integer offset, integer count)This action will extend the given BoundingBox to include the vertices of this Mesh.
GetHashCode()This action gets the hash code for an object.
GetIndexData()
GetIndicesCount()
GetMaxIndices()
GetMaxVertices()
GetVertexAttributes()
GetVertexData()
GetVerticesCount()
Load(Libraries.Game.Graphics.VertexData vertices, Libraries.Game.Graphics.IndexData indices, boolean isVertexArray)
Load(boolean isStatic, integer maxVertices, integer maxIndices, Libraries.Game.Graphics.VertexAttributes attributes)
Load(boolean isStatic, integer maxVertices, integer maxIndices, Libraries.Game.Graphics.VertexAttributes attributes, boolean isArray)
Reload()This action forcibly reloads the Mesh's IndexData and VertexData.
SetIndices(Libraries.Containers.Array<number> indices, integer offset, integer count)
SetIndices(Libraries.Containers.Array<number> indices)
SetVertices(Libraries.Containers.Array<number> vertices)if SupportsGL30() return new VertexBufferObjectWithVAO e
SetVertices(Libraries.Containers.Array<number> vertices, integer offset, integer count)
UpdateVertices(integer targetOffset, Libraries.Containers.Array<number> source, integer sourceOffset, integer count)
UpdateVertices(integer targetOffset, Libraries.Containers.Array<number> source)

Actions Documentation

CalculateBoundingBox(Libraries.Game.BoundingBox box)

This action will calculate the bounds of this Mesh's vertices, and store it inside the given BoundingBox. This will overwrite any data in the provided BoundingBox. If no vertices have been defined yet for this Mesh, the action will alert an error.

Parameters

Return

Libraries.Game.BoundingBox:

CalculateBoundingBox()

This action will create a new BoundingBox object that will contain all of the vertices stored in this Mesh. If no vertices have been defined yet, this will alert an error.

Return

Libraries.Game.BoundingBox:

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.

Dispose()

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.

ExtendBoundingBox(Libraries.Game.BoundingBox box, integer offset, integer count, Libraries.Compute.Matrix4 transform)

This action will extend the given BoundingBox to include the vertices of this Mesh. If this Mesh has no vertices defined, this action will alert an error.

Parameters

Return

Libraries.Game.BoundingBox:

ExtendBoundingBox(Libraries.Game.BoundingBox box, integer offset, integer count)

This action will extend the given BoundingBox to include the vertices of this Mesh. If this Mesh has no vertices defined, this action will alert an error.

Parameters

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.

GetIndexData()

Return

Libraries.Game.Graphics.IndexData

GetIndicesCount()

Return

integer

GetMaxIndices()

Return

integer

GetMaxVertices()

Return

integer

GetVertexAttributes()

Return

Libraries.Game.Graphics.VertexAttributes

GetVertexData()

Return

Libraries.Game.Graphics.VertexData

GetVerticesCount()

Return

integer

Load(Libraries.Game.Graphics.VertexData vertices, Libraries.Game.Graphics.IndexData indices, boolean isVertexArray)

Parameters

Load(boolean isStatic, integer maxVertices, integer maxIndices, Libraries.Game.Graphics.VertexAttributes attributes)

Parameters

Load(boolean isStatic, integer maxVertices, integer maxIndices, Libraries.Game.Graphics.VertexAttributes attributes, boolean isArray)

Parameters

Reload()

This action forcibly reloads the Mesh's IndexData and VertexData. This is necessary after the OpenGL context is lost. This is automatically performed by the engine, so it shouldn't be necessary for users to call this directly.

SetIndices(Libraries.Containers.Array<number> indices, integer offset, integer count)

Parameters

SetIndices(Libraries.Containers.Array<number> indices)

Parameters

SetVertices(Libraries.Containers.Array<number> vertices)

if SupportsGL30() return new VertexBufferObjectWithVAO e

Parameters

SetVertices(Libraries.Containers.Array<number> vertices, integer offset, integer count)

Parameters

UpdateVertices(integer targetOffset, Libraries.Containers.Array<number> source, integer sourceOffset, integer count)

Parameters

UpdateVertices(integer targetOffset, Libraries.Containers.Array<number> source)

Parameters