Function CreatePolygonVertexData
-
CreatePolygonVertexData(
polygon: Mesh,
sideOrientation: number,
fUV?: Vector4[],
fColors?: Color4[],
frontUVs?: Vector4,
backUVs?: Vector4,
wrp?: boolean,
): VertexDataParameters
- polygon: Mesh
a mesh built from polygonTriangulation.build()
- sideOrientation: number
takes the values Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
OptionalfUV: Vector4[]an array of Vector4 elements used to set different images to the top, rings and bottom respectively
OptionalfColors: Color4[]an array of Color3 elements used to set different colors to the top, rings and bottom respectively
OptionalfrontUVs: Vector4only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
OptionalbackUVs: Vector4only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optionalwrp: booleana boolean, default false, when true and fUVs used texture is wrapped around all sides, when false texture is applied side
Returns VertexData
the VertexData of the Polygon
- polygon: Mesh
Creates the VertexData for an irregular Polygon in the XoZ plane using a mesh built by polygonTriangulation.build() All parameters are provided by CreatePolygon as needed