Class: AxDeviceIndependentMesh

AxDeviceIndependentMesh()

new AxDeviceIndependentMesh()

Creates a new graphics device mesh. This constructor shouldn't be called explicity, but instead the graphics device should create its respective mesh
Source:

Methods

CreateIndexBuffer(numIndices) → {Boolean}

Creates an index buffer for the mesh
Parameters:
Name Type Description
numIndices Integer The number of indices for the index buffer to hold
Source:
Returns:
True if the index buffer was created successfully
Type
Boolean

CreateVertexBuffer(numVertices) → {Boolean}

Creates a vertex buffer for the mesh
Parameters:
Name Type Description
numVertices Integer The number of vertices for the vertex buffer to hold
Source:
Returns:
True if the vertex buffer was created successfully
Type
Boolean

DeleteIndexBuffer() → {Boolean}

Deletes the index buffer, freeing the resources it allocates
Source:
Returns:
True if the index buffer was deleted successfully
Type
Boolean

DeleteVertexBuffer() → {Boolean}

Deletes the vertex buffer, freeing the resources it allocates
Source:
Returns:
True if the vertex buffer was deleted successfully
Type
Boolean

GetIndex(index) → {Integer}

Gets the value of an index in the mesh.
Parameters:
Name Type Description
index Integer The index of the vertex to set bone data to
Source:
Returns:
The value of an index in the mesh.
Type
Integer

GetIndexCount() → {Integer}

Gets the number of indices in the mesh
Source:
Returns:
The number of indices in the mesh
Type
Integer

GetPrimitiveCount() → {Integer}

Gets the number of primitives in the mesh. For example, for triangle primitives, that would be the number of indices / 3
Source:
Returns:
The number of primitives in the mesh
Type
Integer

GetVertexBones(index, boneIndices, boneWeights)

Gets the bone data of a given vertex
Parameters:
Name Type Description
index Integer The index of the vertex to get bone data from
boneIndices AxVector4 The vector in which to copy the indices of the bones affecting the given vertex
boneWeights AxVector4 The vector in which to copy the weights of the bones affecting the given vertex
Source:

GetVertexCount() → {Integer}

Gets the number of vertices in the mesh
Source:
Returns:
The number of vertices in the mesh
Type
Integer

GetVertexNormal(index, result)

Gets the normal of a given vertex into a vector
Parameters:
Name Type Description
index Integer The index of the vertex to copy
result AxVector3 The vector to copy the normal to
Source:

GetVertexPosition(index, result)

Gets the position of a given vertex into a vector
Parameters:
Name Type Description
index Integer The index of the vertex to copy
result AxVector3 The vector to copy the position to
Source:

GetVertexTangents(index, tangent, biTangent)

Gets the tangent vectors of a given vertex. The tangent vectors represent the mapped texture's base axes in model space, tangent to the model's surface
Parameters:
Name Type Description
index Integer The index of the vertex for which to get tangent vector
tangent AxVector3 The vector in which to copy the tangent vector of the vertex. Corresponds to the texture's X axis, which is the absciss
biTangent AxVector3 The vector in which to copy the biTangent vector of the vertex. Corresponds to the texture's Y axis, which is the ordinate
Source:

GetVertexTexCoords(index, result)

Gets the texture coordinates of a given vertex into a vector
Parameters:
Name Type Description
index Integer The index of the vertex to copy
result AxVector2 The vector to copy the texture coordinates to
Source:

SetIndex(index, value)

Sets the value of an index in the mesh.
Parameters:
Name Type Description
index Integer The index of the vertex to set bone data to
value Integer The new value for the index
Source:

SetVertexBones(index, boneIndices, boneWeights)

Sets the bone data of a given vertex
Parameters:
Name Type Description
index Integer The index of the vertex to set bone data to
boneIndices AxVector4 The vector which holds the new indices of the bones to affect the given vertex
boneWeights AxVector4 The vector which holds the new weights of the bones to affect the given vertex
Source:

SetVertexNormal(index, value)

Sets the normal of a given vertex
Parameters:
Name Type Description
index Integer The index of the vertex to set
value AxVector3 The vector with the new normal value to set
Source:

SetVertexPosition(index, value)

Sets the position of a given vertex
Parameters:
Name Type Description
index Integer The index of the vertex to set
value AxVector3 The vector with the new position value to set
Source:

SetVertexTangents(index, tangent, biTangent)

Sets the tangent vectors of a given vertex. The tangent vectors represent the mapped texture's base axes in model space, tangent to the model's surface
Parameters:
Name Type Description
index Integer The index of the vertex for which to set tangent vector
tangent AxVector3 The value of the tangent vector to set. Corresponds to the texture's X axis, which is the absciss
biTangent AxVector3 The value of the bitangent vector to set. Corresponds to the texture's Y axis, which is the ordinate
Source:

SetVertexTexCoords(index, value)

Sets the texture coordinates of a given vertex
Parameters:
Name Type Description
index Integer The index of the vertex to set
value AxVector2 The vector with the new texture coordinates to set
Source:

UpdateIndices(offset, count) → {Boolean}

Updates the indices of the graphics device. This method needs to be called when the mesh's indices have been changed and the graphics device has to be updated with the changes
Parameters:
Name Type Description
offset Integer The number of the index to start the update from
count Integer The number of indices to update
Source:
Returns:
True if the indices were successfully updated on the graphics device
Type
Boolean

UpdateVertices(offset, count) → {Boolean}

Updates the vertices of the graphics device. This method needs to be called when the mesh's vertices have been changed and the graphics device has to be updated with the changes
Parameters:
Name Type Description
offset Integer The number of the vertex to start the update from
count Integer The number of vertices to update
Source:
Returns:
True if the vertices were successfully updated on the graphics device
Type
Boolean

Documentation generated by JSDoc 3.5.3 on Mon Feb 19 2018 20:39:26 GMT+0200 (FLE Standard Time)