SetMeshData()

Syntax

SetMeshData(#Mesh, Type, Data, DataLength)
Description
Set a specific data to a #Mesh. 'Data' is the memory address of the data to be set in the #Mesh. 'DataLength' is the length its data, depending of its type. This command is mainly used in combination with CreateMesh().

'Type' can be one of the following values:
  #PB_Mesh_Vertex       : 'Data' is an array of vertices, 'DataLength' is the number of elements
  #PB_Mesh_Face         : 'Data' is an array of triangles, each triangle vertex is an index of the vertices array. The array 
need to be of 'word' type (.w). 'DataLength' is the number of elements #PB_Mesh_UVCoordinate : 'Data' is an array of UVCoordinates, 'DataLength' is the number of elements #PB_Mesh_Normal : 'Data' is an array of Normals, 'DataLength' is the number of elements #PB_Mesh_Color : 'Data' is an array of Colors, 'DataLength' is the number of elements

Supported OS

Windows, Linux

<- MeshID() - Mesh Index