CreateDataMesh()

Syntax

Result = CreateDataMesh(#Mesh, Array.MeshVertex() [, Mode])
Description
Creates a new #Mesh from the specified 2 dimensional array of MeshVertex type. This command allows faster mesh creation than using CreateMesh() by preparing an array and submitting in one batch to the command.

Parameters

#Mesh The number to identify the new mesh. #PB_Any can be used to auto-generate this number.
Array A 2 dimensional array of type MeshVertex, which will be used to create the new mesh. The MeshVertex structure is defined as the following:
  Structure MeshVertex
    x.f
    y.f
    z.f
    NormalX.f
    NormalY.f
    NormalZ.f
    TangentX.f
    TangentY.f
    TangentZ.f
    u.f
    v.f
    Color.l
  EndStructure
Mode (optional) The way to link vertices. It can be one of the following value:
  #PB_Mesh_DiagonalRegular1      : diagonals are aligned in the same way
  #PB_Mesh_DiagonalRegular2      : diagonals are aligned in the other way
  #PB_Mesh_DiagonalAlternate     : diagonals are once in a way and once in the other way (alternate)
  #PB_Mesh_DiagonalShortestLength: diagonals are between the two closest vertices
  #PB_Mesh_DiagonalClosestNormal : diagonals are between the two closest normals (scalar product). Best mode but requires normals.

Remarks

If the #Mesh was already created, then it is freed and replaced by a new one.

Supported OS

All

<- CreateCylinder() - Mesh Index - CreateIcoSphere() ->