Interface IGetSetVerticesData
Hierarchy
- IGetSetVerticesData
Implemented by
Index
Methods
get IndicesSearch playground for getIndices
Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.
Parameters
Optional copyWhenShared: boolean
If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.
Optional forceCopy: boolean
defines a boolean indicating that the returned array must be cloned upon returning it
Returns Nullable<IndicesArray>
the indices array or an empty array if the mesh has no geometry
get Vertices DataSearch playground for getVerticesData
Gets a specific vertex data attached to this geometry. Float data is constructed if the vertex buffer data cannot be returned directly.
Parameters
kind: string
defines the data kind (Position, normal, etc...)
Optional copyWhenShared: boolean
defines if the returned array must be cloned upon returning it if the current geometry is shared between multiple meshes
Optional forceCopy: boolean
defines a boolean indicating that the returned array must be cloned upon returning it
Returns Nullable<FloatArray>
a float array containing vertex data
is Vertices Data PresentSearch playground for isVerticesDataPresent
Gets a boolean indicating if specific vertex data is present
Parameters
kind: string
defines the vertex data kind to use
Returns boolean
true is data kind is present
set IndicesSearch playground for setIndices
Creates a new index buffer
Parameters
indices: IndicesArray
defines the indices to store in the index buffer
totalVertices: Nullable<number>
defines the total number of vertices (could be null)
Optional updatable: boolean
defines if the index buffer must be flagged as updatable (false by default)
Returns void
set Vertices DataSearch playground for setVerticesData
Set specific vertex data
Parameters
kind: string
defines the data kind (Position, normal, etc...)
data: FloatArray
defines the vertex data to use
updatable: boolean
defines if the vertex must be flagged as updatable (false as default)
Returns void
update Vertices DataSearch playground for updateVerticesData
Update a specific associated vertex buffer
Parameters
kind: string
defines which buffer to write to (positions, indices, normals, etc). Possible
kind
values :- VertexBuffer.PositionKind
- VertexBuffer.UVKind
- VertexBuffer.UV2Kind
- VertexBuffer.UV3Kind
- VertexBuffer.UV4Kind
- VertexBuffer.UV5Kind
- VertexBuffer.UV6Kind
- VertexBuffer.ColorKind
- VertexBuffer.MatricesIndicesKind
- VertexBuffer.MatricesIndicesExtraKind
- VertexBuffer.MatricesWeightsKind
- VertexBuffer.MatricesWeightsExtraKind
data: FloatArray
defines the data source
Optional updateExtends: boolean
defines if extends info of the mesh must be updated (can be null). This is mostly useful for "position" kind
Optional makeItUnique: boolean
defines if the geometry associated with the mesh must be cloned to make the change only for this mesh (and not all meshes associated with the same geometry)
Returns void
Define an interface for all classes that will get and set the data on vertices