Libraries.Game.Graphics.Mesh Documentation
Inherits from: Libraries.Language.Object, Libraries.Game.Disposable
Actions Documentation
Bind(Libraries.Game.Graphics.Shaders.ShaderProgram program)
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.
Parameters
Bind(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Containers.Array<integer> locations)
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
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
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)
Dispose()
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)
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
- Libraries.Game.BoundingBox
- integer offset
- integer count
- Libraries.Compute.Matrix4
Return
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
- Libraries.Game.BoundingBox
- integer offset
- integer count
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()
GetIndexData()
GetIndicesCount()
Return
integer
GetMaxIndices()
Return
integer
GetMaxVertices()
Return
integer
GetVertexAttributes()
GetVertexData()
GetVerticesCount()
Return
integer
Load(Libraries.Game.Graphics.VertexData vertices, Libraries.Game.Graphics.IndexData indices)
Load(boolean isStatic, integer maxVertices, integer maxIndices, Libraries.Game.Graphics.VertexAttributes attributes)
Parameters
- boolean isStatic
- integer maxVertices
- integer maxIndices
- Libraries.Game.Graphics.VertexAttributes
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.
Render(Libraries.Game.Graphics.Shaders.ShaderProgram program, integer type, integer offset, integer count, boolean autoBind)
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
- Libraries.Game.Graphics.Shaders.ShaderProgram
- integer type
- integer offset
- integer count
- boolean autoBind
Render(Libraries.Game.Graphics.Shaders.ShaderProgram program, integer type, integer offset, integer count)
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.
Parameters
- Libraries.Game.Graphics.Shaders.ShaderProgram
- integer type
- integer offset
- integer count
SetIndices(Libraries.Containers.Integer32BitArray indices, integer offset, integer count)
Parameters
- Libraries.Containers.Integer32BitArray
- integer offset
- integer count
SetIndices(Libraries.Containers.Integer32BitArray indices)
Parameters
SetVertices(Libraries.Containers.Number32BitArray vertices)
Parameters
Unbind(Libraries.Game.Graphics.Shaders.ShaderProgram program)
Unbind(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Containers.Array<integer> locations)
UpdateVertices(integer targetOffset, Libraries.Containers.Number32BitArray source)
Parameters
- integer targetOffset
- Libraries.Containers.Number32BitArray
UpdateVertices(integer targetOffset, Libraries.Containers.Number32BitArray source, integer sourceOffset, integer count)
Parameters
- integer targetOffset
- Libraries.Containers.Number32BitArray
- integer sourceOffset
- integer count
On this page
Variables TableAction Documentation- Bind(Libraries.Game.Graphics.Shaders.ShaderProgram program)
- Bind(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Containers.Array
locations) - CalculateBoundingBox(Libraries.Game.BoundingBox box)
- CalculateBoundingBox()
- Compare(Libraries.Language.Object object)
- Dispose()
- Equals(Libraries.Language.Object object)
- ExtendBoundingBox(Libraries.Game.BoundingBox box, integer offset, integer count, Libraries.Compute.Matrix4 transform)
- ExtendBoundingBox(Libraries.Game.BoundingBox box, integer offset, integer count)
- GetHashCode()
- GetIndexData()
- GetIndicesCount()
- GetMaxIndices()
- GetMaxVertices()
- GetVertexAttributes()
- GetVertexData()
- GetVerticesCount()
- Load(Libraries.Game.Graphics.VertexData vertices, Libraries.Game.Graphics.IndexData indices)
- Load(boolean isStatic, integer maxVertices, integer maxIndices, Libraries.Game.Graphics.VertexAttributes attributes)
- Reload()
- Render(Libraries.Game.Graphics.Shaders.ShaderProgram program, integer type, integer offset, integer count, boolean autoBind)
- Render(Libraries.Game.Graphics.Shaders.ShaderProgram program, integer type, integer offset, integer count)
- SetIndices(Libraries.Containers.Integer32BitArray indices, integer offset, integer count)
- SetIndices(Libraries.Containers.Integer32BitArray indices)
- SetVertices(Libraries.Containers.Number32BitArray vertices)
- Unbind(Libraries.Game.Graphics.Shaders.ShaderProgram program)
- Unbind(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Containers.Array
locations) - UpdateVertices(integer targetOffset, Libraries.Containers.Number32BitArray source)
- UpdateVertices(integer targetOffset, Libraries.Containers.Number32BitArray source, integer sourceOffset, integer count)