Package com.aspose.threed
Class Mesh
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Geometry
-
- com.aspose.threed.Mesh
-
- All Implemented Interfaces:
IMeshConvertible
,java.lang.Iterable<int[]>
public class Mesh extends Geometry implements java.lang.Iterable<int[]>, IMeshConvertible
A mesh is made of many n-sided polygons.
-
-
Method Summary
Modifier and Type Method Description void
createPolygon(int[] indices)
Creates a new polygon with all vertices defined inindices
.protected RenderableResource
createRenderableResource(Renderer renderer)
CreateRenderableResource
for renderingjava.util.List<java.lang.Integer>
getEdges()
Gets edges of the Mesh.int
getPolygonCount()
Gets the count of polygonsjava.util.List<int[]>
getPolygons()
Gets the polygons definition of the meshint
getPolygonSize(int index)
Gets the vertex count of the specified polygon.java.util.Iterator<int[]>
iterator()
Gets the enumerator for each inner polygons.Mesh
toMesh()
Gets the Mesh instance from current entity.-
Methods inherited from class com.aspose.threed.Geometry
addElement, createElement, createElement, createElementUV, createElementUV, getBoundingBox, getCastShadows, getControlPoints, getDeformers, getDeformers2, getElement, getReceiveShadows, getVertexElementOfUV, getVertexElements, getVisible, setCastShadows, setReceiveShadows, setVisible
-
Methods inherited from class com.aspose.threed.Entity
getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
-
-
-
-
Method Detail
-
getEdges
public java.util.List<java.lang.Integer> getEdges()
Gets edges of the Mesh. Edge is optional in mesh, so it can be empty.
-
getPolygonSize
public int getPolygonSize(int index)
Gets the vertex count of the specified polygon.- Parameters:
index
- Index.- Returns:
- The polygon size.
-
getPolygonCount
public int getPolygonCount()
Gets the count of polygons
-
getPolygons
public java.util.List<int[]> getPolygons()
Gets the polygons definition of the mesh
-
createPolygon
public void createPolygon(int[] indices)
Creates a new polygon with all vertices defined inindices
. To create polygon vertex by vertex, please usePolygonBuilder
.- Parameters:
indices
- Array of the polygon indices, each index points to a control point that forms the polygon.
-
createRenderableResource
protected RenderableResource createRenderableResource(Renderer renderer)
CreateRenderableResource
for rendering- Overrides:
createRenderableResource
in classEntity
- Parameters:
renderer
-
-
toMesh
public Mesh toMesh()
Gets the Mesh instance from current entity.- Specified by:
toMesh
in interfaceIMeshConvertible
- Returns:
- The mesh.
-
iterator
public java.util.Iterator<int[]> iterator()
Gets the enumerator for each inner polygons.- Specified by:
iterator
in interfacejava.lang.Iterable<int[]>
- Returns:
- The enumerator.
-
-