Mesh
Overview
Mesh is a class in Aspose.3D FOSS for Java.
Inherits from: Geometry, Iterable<int[]>.
Mesh.triangulate() returns a new Mesh instance where all polygons have been converted into triangles.
This class provides 57 methods for working with Mesh objects in Java programs.
Available methods include: Mesh, addControlPoint, addDeformer, addElement, clone, createElement, createElementUV, createPolygon, difference, doBoolean, findProperty, getBoundingBox, and 37 additional methods.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: boundingBox, castShadows, controlPoints, deformers, deformers2, edges, and 13 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
polygonCount | int | Read | Gets the polygon count. |
polygons | List<int[]> | Read | Gets the polygons. |
edges | List<Integer> | Read | Gets the edges. |
manifold | boolean | Read | Gets the manifold. |
visible | boolean | Read | Gets the visible. |
castShadows | boolean | Read | Gets the cast shadows. |
receiveShadows | boolean | Read | Gets the receive shadows. |
controlPoints | java.util.List<Vector4> | Read | Gets the control points. |
vertexElements | java.util.List<VertexElement> | Read | Gets the vertex elements. |
deformers | java.util.List<Deformer> | Read | Gets the deformers. |
deformers2 | java.util.Collection<T> | Read | Gets the deformers2. |
parentNode | Node | Read | Gets the parent node. |
parentNodes | ArrayList<Node> | Read | Gets the parent nodes. |
excluded | boolean | Read | Gets the excluded. |
boundingBox | BoundingBox | Read | Gets the bounding box. |
entityRendererKey | EntityRendererKey | Read | Gets the entity renderer key. |
scene | Scene | Read | Gets the scene. |
name | String | Read | Gets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
Mesh() | Creates an empty mesh with default name |
Mesh(name: String) | Calls Mesh(name) on this Mesh instance. |
addControlPoint(x: double, y: double, z: double) | Adds a weighted 4D control point |
addControlPoint(x: double, y: double, z: double, w: double) | Calls addControlPoint(x, y, z, w) on this Mesh instance. |
createPolygon(indices: int[]) | Creates a quadrilateral polygon from four vertex indices |
createPolygon(indices: int[], offset: int, length: int) | Calls createPolygon(indices, offset, length) on this Mesh instance. |
createPolygon(v1: int, v2: int, v3: int) | Calls createPolygon(v1, v2, v3) on this Mesh instance. |
createPolygon(v1: int, v2: int, v3: int, v4: int) | Calls createPolygon(v1, v2, v3, v4) on this Mesh instance. |
getPolygonCount() → int | Returns the polygon count. |
getPolygonSize(index: int) → int | Returns the number of vertices of the polygon at the given index |
getPolygons() → List<int[]> | Returns the polygons. |
getEdges() → List<Integer> | Returns the edges. |
isManifold() → boolean | Returns true if manifold is set. |
iterator() → Iterator<int[]> | Provides an iterator over polygon index arrays |
toMesh() → Mesh | Returns a copy of this mesh as a Mesh object |
clone() → Mesh | Creates a deep copy of the mesh |
triangulate() → Mesh | Returns a new Mesh instance where all polygons have been converted into triangles |
optimize(removeVertices: boolean) → Mesh | Simplifies geometry considering tolerance, threshold, and angle deviation |
optimize(removeVertices: boolean, tolerance: float) → Mesh | Calls optimize(removeVertices, tolerance) on this Mesh instance. |
optimize(removeVertices: boolean, tolerance: float, threshold: float) → Mesh | Calls optimize(removeVertices, tolerance, threshold) on this Mesh instance. |
optimize(removeVertices: boolean, tolerance: float, threshold: float, angleThreshold: float) → Mesh | Calls optimize(removeVertices, tolerance, threshold, angleThreshold) on this Mesh instance. |
optimize2(removeVertices: boolean) → Mesh | Performs an alternative optimization on the mesh |
union(a: Mesh, b: Mesh) → Mesh | Returns a mesh representing the union of two meshes |
difference(a: Mesh, b: Mesh) → Mesh | Calls difference(a, b) on this Mesh instance. |
intersect(a: Mesh, b: Mesh) → Mesh | Calls intersect(a, b) on this Mesh instance. |
doBoolean(operation: BooleanOperation, a: Mesh, ma: Matrix4, b: Mesh, mb: Matrix4) → Mesh | Performs the specified Boolean operation on two transformed meshes |
getVisible() → boolean | Returns the visible. |
setVisible(value: boolean) | Sets the visible value. |
getCastShadows() → boolean | Returns the cast shadows. |
setCastShadows(value: boolean) | Sets the cast shadows value. |
getReceiveShadows() → boolean | Returns the receive shadows. |
setReceiveShadows(value: boolean) | Sets the receive shadows value. |
getControlPoints() → java.util.List<Vector4> | Returns the control points. |
getVertexElements() → java.util.List<VertexElement> | Returns the vertex elements. |
getDeformers() → java.util.List<Deformer> | Returns the deformers. |
getElement(type: VertexElementType) → VertexElement | Calls getElement(type) on this Mesh instance. |
createElement(type: VertexElementType) → VertexElement | Calls createElement(type) on this Mesh instance. |
addElement(element: VertexElement) | Calls addElement(element) on this Mesh instance. |
addDeformer(deformer: Deformer) | Adds a deformer to this geometry and sets the owner reference. |
getVertexElementOfUV(mapping: TextureMapping) → VertexElementUV | Calls getVertexElementOfUV(mapping) on this Mesh instance. |
createElementUV(mapping: TextureMapping) → VertexElementUV | Calls createElementUV(mapping) on this Mesh instance. |
getDeformers2() → java.util.Collection<T> | Returns the deformers2. |
getParentNode() → Node | Returns the parent node. |
setParentNode(value: Node) | Sets the parent node value. |
getParentNodes() → ArrayList<Node> | Returns the parent nodes. |
getExcluded() → boolean | Returns the excluded. |
setExcluded(value: boolean) | Sets the excluded value. |
getBoundingBox() → BoundingBox | Returns the bounding box. |
getEntityRendererKey() → EntityRendererKey | Returns the entity renderer key. |
getScene() → Scene | Returns the scene. |
getName() → String | Returns the name. |
setName(name: String) | Sets the name value. |
getProperties() → PropertyCollection | Returns the properties. |
findProperty(name: String) → Property | Calls findProperty(name) on this Mesh instance. |
getProperty(name: String) → Object | Calls getProperty(name) on this Mesh instance. |
setProperty(name: String, value: Object) | Sets the property value. |
removeProperty(name: String) → boolean | Calls removeProperty(name) on this Mesh instance. |