Mesh
Overview
Mesh is a class in Aspose.3D FOSS for TypeScript.
Inherits from: Geometry.
Mesh.constructor creates a new Mesh with optional name, height map, transform, and tri‑mesh flag.
This class declares 27 methods for Mesh objects in TypeScript programs.
Available methods include: addControlPoint, addElement, constructor, createElement, createElementUV, createPolygon, difference, doBoolean, findProperty, getBoundingBox, getElement, getEntityRendererKey, and 12 additional methods.
Public members are accessible to any TypeScript application after installing the Aspose.3D FOSS for TypeScript package.
Properties: castShadows, controlPoints, deformers, edges, excluded, name, and 9 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
edges | number[] | Read | Gets the edges. |
polygonCount | number | Read | Gets the polygon count. |
polygons | number[][] | Read | Gets the polygons. |
deformers | any[] | Read | Gets the deformers. |
visible | boolean | Read/Write | Gets the visible. |
castShadows | boolean | Read/Write | Gets the cast shadows. |
receiveShadows | boolean | Read/Write | Gets the receive shadows. |
vertexElements | VertexElement[] | Read | Gets the vertex elements. |
controlPoints | Vector4[] | Read/Write | Gets the control points. |
parentNodes | Node[] | Read | Gets the parent nodes. |
parentNode | Node | undefined | Read/Write | Gets the parent node. |
excluded | boolean | Read/Write | Gets the excluded. |
scene | Scene | null | Read/Write | Gets the scene. |
name | string | Read/Write | Gets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
constructor(name: string | null, _heightMap: any, _transform: any, _triMesh: boolean | null) | Creates a new Mesh with optional name, height map, transform, and tri‑mesh flag |
createPolygon() | Adds a new polygon to the mesh |
getPolygonSize(index: number) → number | Returns the number of vertices in the polygon at the given index |
toMesh() → Mesh | Returns a Mesh instance representing the current object (identity conversion) |
optimize(_vertexElements: boolean, _toleranceControlPoint: number, _toleranceNormal: number, _toleranceUV: number) → Mesh | Not implemented in the FOSS edition — throws at runtime. Reduces mesh complexity using vertex element flag and tolerance values for control points, normals, and UVs |
doBoolean(_op: any, _a: Mesh, _transformA: any, _b: Mesh, _transformB: any) → Mesh | Not implemented in the FOSS edition — throws at runtime. Performs a boolean operation defined by _op on meshes _a and _b with respective transforms |
isManifold() → boolean | Not implemented in the FOSS edition — throws at runtime. Returns true if manifold is set. |
union(_a: Mesh, _b: Mesh) → Mesh | Not implemented in the FOSS edition — throws at runtime. Returns a new Mesh that is the union of meshes _a and _b |
difference(_a: Mesh, _b: Mesh) → Mesh | Not implemented in the FOSS edition — throws at runtime. Returns a new Mesh that is the difference of mesh _a minus mesh _b |
intersect(_a: Mesh, _b: Mesh) → Mesh | Not implemented in the FOSS edition — throws at runtime. Calls intersect(_a, _b) on this Mesh instance. |
triangulate() → Mesh | Converts all polygons in the mesh to triangles and returns the mesh |
getBoundingBox() → any | Returns the bounding box. |
getEntityRendererKey() → any | Not implemented in the FOSS edition — throws at runtime. Returns the entity renderer key. |
constructor(name: string | null) | Calls constructor(name) on this Mesh instance. |
addControlPoint(point: Vector4) | Calls addControlPoint(point) on this Mesh instance. |
createElement(elementType: VertexElementType, mappingMode: MappingMode | null, referenceMode: ReferenceMode | null) → VertexElement | Calls createElement(elementType, mappingMode, referenceMode) on this Mesh instance. |
createElementUV(uvMapping: TextureMapping, mappingMode: MappingMode | null, referenceMode: ReferenceMode | null) → VertexElementUV | Calls createElementUV(uvMapping, mappingMode, referenceMode) on this Mesh instance. |
addElement(element: VertexElement) | Calls addElement(element) on this Mesh instance. |
getElement(elementType: VertexElementType) → VertexElement | null | Calls getElement(elementType) on this Mesh instance. |
getVertexElementOfUV(textureMapping: TextureMapping) → VertexElementUV | null | Calls getVertexElementOfUV(textureMapping) on this Mesh instance. |
removeProperty(_prop: Property | string) → boolean | Calls removeProperty(_prop) on this Mesh instance. |
getProperty(_property: string) → any | Calls getProperty(_property) on this Mesh instance. |
setProperty(_property: string, _value: any) | Sets the property value. |
findProperty(_property: string) → Property | null | Calls findProperty(_property) on this Mesh instance. |
constructor(name: string) | Calls constructor(name) on this Mesh instance. |
removeProperty(property: string | Property) → boolean | Calls removeProperty(property) on this Mesh instance. |
toString() → string | Calls toString on this Mesh instance. |