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

NameTypeAccessDescription
edgesnumber[]ReadGets the edges.
polygonCountnumberReadGets the polygon count.
polygonsnumber[][]ReadGets the polygons.
deformersany[]ReadGets the deformers.
visiblebooleanRead/WriteGets the visible.
castShadowsbooleanRead/WriteGets the cast shadows.
receiveShadowsbooleanRead/WriteGets the receive shadows.
vertexElementsVertexElement[]ReadGets the vertex elements.
controlPointsVector4[]Read/WriteGets the control points.
parentNodesNode[]ReadGets the parent nodes.
parentNodeNode | undefinedRead/WriteGets the parent node.
excludedbooleanRead/WriteGets the excluded.
sceneScene | nullRead/WriteGets the scene.
namestringRead/WriteGets the name.
propertiesPropertyCollectionReadGets the properties.

Methods

SignatureDescription
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)numberReturns the number of vertices in the polygon at the given index
toMesh()MeshReturns a Mesh instance representing the current object (identity conversion)
optimize(_vertexElements: boolean, _toleranceControlPoint: number, _toleranceNormal: number, _toleranceUV: number)MeshNot 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)MeshNot implemented in the FOSS edition — throws at runtime. Performs a boolean operation defined by _op on meshes _a and _b with respective transforms
isManifold()booleanNot implemented in the FOSS edition — throws at runtime. Returns true if manifold is set.
union(_a: Mesh, _b: Mesh)MeshNot 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)MeshNot 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)MeshNot implemented in the FOSS edition — throws at runtime. Calls intersect(_a, _b) on this Mesh instance.
triangulate()MeshConverts all polygons in the mesh to triangles and returns the mesh
getBoundingBox()anyReturns the bounding box.
getEntityRendererKey()anyNot 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)VertexElementCalls createElement(elementType, mappingMode, referenceMode) on this Mesh instance.
createElementUV(uvMapping: TextureMapping, mappingMode: MappingMode | null, referenceMode: ReferenceMode | null)VertexElementUVCalls createElementUV(uvMapping, mappingMode, referenceMode) on this Mesh instance.
addElement(element: VertexElement)Calls addElement(element) on this Mesh instance.
getElement(elementType: VertexElementType)VertexElement | nullCalls getElement(elementType) on this Mesh instance.
getVertexElementOfUV(textureMapping: TextureMapping)VertexElementUV | nullCalls getVertexElementOfUV(textureMapping) on this Mesh instance.
removeProperty(_prop: Property | string)booleanCalls removeProperty(_prop) on this Mesh instance.
getProperty(_property: string)anyCalls getProperty(_property) on this Mesh instance.
setProperty(_property: string, _value: any)Sets the property value.
findProperty(_property: string)Property | nullCalls findProperty(_property) on this Mesh instance.
constructor(name: string)Calls constructor(name) on this Mesh instance.
removeProperty(property: string | Property)booleanCalls removeProperty(property) on this Mesh instance.
toString()stringCalls toString on this Mesh instance.

See Also

 English