public class Mesh extends Geometry implements Iterable<int[]>, IMeshConvertible
Constructor and Description |
---|
Mesh()
Initializes a new instance of the
Mesh class. |
Mesh(String name)
Initializes a new instance of the
Mesh class. |
Modifier and Type | Method and Description |
---|---|
void |
createPolygon(int[] indices)
Creates a new polygon with all vertices defined in
indices . |
List<Integer> |
getEdges()
Gets edges of the Mesh.
|
int |
getPolygonCount()
Gets the count of polygons
|
List<int[]> |
getPolygons()
Gets the polygons definition of the mesh
|
int |
getPolygonSize(int index)
Gets the vertex count of the specified polygon.
|
Iterator<int[]> |
iterator()
Gets the enumerator for each inner polygons.
|
Mesh |
toMesh()
Gets the Mesh instance from current entity.
|
addElement, createElement, createElement, createElementUV, createElementUV, getBoundingBox, getCastShadows, getControlPoints, getDeformers, getDeformers2, getElement, getReceiveShadows, getVertexElementOfUV, getVertexElements, getVisible, setCastShadows, setReceiveShadows, setVisible
getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public Mesh()
Mesh
class.public List<Integer> getEdges()
public int getPolygonSize(int index)
index
- Index.public int getPolygonCount()
public List<int[]> getPolygons()
public void createPolygon(int[] indices)
indices
.
To create polygon vertex by vertex, please use PolygonBuilder
.indices
- Array of the polygon indices, each index points to a control point that forms the polygon.public Mesh toMesh()
toMesh
in interface IMeshConvertible
Copyright © 2019. All rights reserved.