MeshDirectAdd()

Syntax

MeshDirectAdd(#Mesh, MeshVertexArray(), MeshFaceArray(), Type, MaterialID)
Description
Add a new submesh to the specified #Mesh. A mesh can have any number of submeshes. A submesh position is relative to the mesh position.

Parameters

MeshVertexArray() The array containing the submesh vertex data. It has to be an array of type "MeshVertex".
MeshFaceArray() The array containing the submesh face data. It has to be an array of type "MeshFace".
Type The type of the new submesh. It can be one of the following value:
  #PB_Mesh_TriangleList : the submesh will be composed of a list of triangles (default).
  #PB_Mesh_TriangleStrip: the submesh will be composed of a list of connected triangles (vertices are shared).
  #PB_Mesh_TriangleFan  : the submesh will be composed of a list of triangles sharing the same central vertex point.
  #PB_Mesh_PointList    : the submesh will be composed of a list of points.
  #PB_Mesh_LineList     : the submesh will be composed of a list of lines.
  #PB_Mesh_LineStrip    : the submesh will be composed of a list of connected lines (vertices are shared).
MaterialID The default material to use for the submesh. To get a valid 'MaterialID', use MaterialID().

Return value

None.

See Also

FreeMesh(), CreateMesh(), LoadMesh()

Supported OS

All

<- LoadMesh() - Mesh Index - MeshFace() ->