PolygonModifier
Inheritance: java.lang.Object
public class PolygonModifier
Utilities to modify polygons
Methods
Method | Description |
---|---|
buildTangentBinormal(Mesh mesh) | This will create tangent and binormal on the mesh Normal is required, if normal is not existing on the mesh, it will also create the normal data from position. |
buildTangentBinormal(Scene scene) | This will create tangent and binormal on all meshes of the scene Normal is required, if normal is not existing on the mesh, it will also create the normal data from position. |
equals(Object arg0) | |
generateNormal(Mesh mesh) | Generate normal data from Mesh definition |
generateUV(Mesh mesh) | Generate UV data from the given input mesh |
generateUV(Mesh mesh, VertexElementNormal normals) | Generate UV data from the given input mesh and specified normal data. |
getClass() | |
hashCode() | |
mergeMesh(Node node) | Convert a whole node to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet |
mergeMesh(Scene scene) | Convert a whole scene to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet |
mergeMesh(List | Convert a whole node to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet |
notify() | |
notifyAll() | |
scale(Node node, Vector3 scale) | Scale all geometries(Scale the control points not the transformation matrix) in this node |
scale(Scene scene, Vector3 scale) | Scale all geometries(Scale the control points not the transformation matrix) in this scene |
splitMesh(Mesh mesh, SplitMeshPolicy policy) | Split mesh into sub-meshes by VertexElementMaterial. |
splitMesh(Node node, SplitMeshPolicy policy) | Split mesh into sub-meshes by VertexElementMaterial. |
splitMesh(Node node, SplitMeshPolicy policy, boolean createChildNodes) | Split mesh into sub-meshes by VertexElementMaterial. |
splitMesh(Node node, SplitMeshPolicy policy, boolean createChildNodes, boolean removeOldMesh) | Split mesh into sub-meshes by VertexElementMaterial. |
splitMesh(Scene scene, SplitMeshPolicy policy) | Split mesh into sub-meshes by VertexElementMaterial. |
splitMesh(Scene scene, SplitMeshPolicy policy, boolean removeOldMesh) | Split mesh into sub-meshes by VertexElementMaterial. |
toString() | |
triangulate(Mesh mesh) | Convert a polygon-based mesh into full triangle mesh |
triangulate(Scene scene) | Convert all polygon-based meshes into full triangle mesh |
triangulate(List | Convert a polygon into triangles, the order of the polygon is defined by the controlPoints |
triangulate(List | Convert a polygon into triangles |
triangulate(List | Convert a polygon-based mesh into triangles |
triangulate(List | Convert a polygon-based mesh into full triangle mesh |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
buildTangentBinormal(Mesh mesh)
public static void buildTangentBinormal(Mesh mesh)
This will create tangent and binormal on the mesh Normal is required, if normal is not existing on the mesh, it will also create the normal data from position. UV is also required, an exception will be raised if no UV found.
Parameters:
Parameter | Type | Description |
---|---|---|
mesh | Mesh |
buildTangentBinormal(Scene scene)
public static void buildTangentBinormal(Scene scene)
This will create tangent and binormal on all meshes of the scene Normal is required, if normal is not existing on the mesh, it will also create the normal data from position. UV is also required, the mesh will be ignored if no UV is defined.
Parameters:
Parameter | Type | Description |
---|---|---|
scene | Scene |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
generateNormal(Mesh mesh)
public static VertexElementNormal generateNormal(Mesh mesh)
Generate normal data from Mesh definition
Parameters:
Parameter | Type | Description |
---|---|---|
mesh | Mesh |
Returns: VertexElementNormal
generateUV(Mesh mesh)
public static VertexElementUV generateUV(Mesh mesh)
Generate UV data from the given input mesh
Parameters:
Parameter | Type | Description |
---|---|---|
mesh | Mesh | The input mesh |
Returns: VertexElementUV - Generated UV data
generateUV(Mesh mesh, VertexElementNormal normals)
public static VertexElementUV generateUV(Mesh mesh, VertexElementNormal normals)
Generate UV data from the given input mesh and specified normal data.
Parameters:
Parameter | Type | Description |
---|---|---|
mesh | Mesh | The input mesh |
normals | VertexElementNormal | The normal data |
Returns: VertexElementUV - Generated UV data
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
hashCode()
public native int hashCode()
Returns: int
mergeMesh(Node node)
public static Mesh mergeMesh(Node node)
Convert a whole node to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet
Parameters:
Parameter | Type | Description |
---|---|---|
node | Node | The node to merge |
Returns: Mesh - Merged mesh
mergeMesh(Scene scene)
public static Mesh mergeMesh(Scene scene)
Convert a whole scene to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet
Parameters:
Parameter | Type | Description |
---|---|---|
scene | Scene | The scene to merge |
Returns: Mesh - The merged mesh
mergeMesh(List nodes)
public static Mesh mergeMesh(List<Node> nodes)
Convert a whole node to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet
Parameters:
Parameter | Type | Description |
---|---|---|
nodes | java.util.List<com.aspose.threed.Node> | The nodes to merge |
Returns: Mesh - Merged mesh
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
scale(Node node, Vector3 scale)
public static void scale(Node node, Vector3 scale)
Scale all geometries(Scale the control points not the transformation matrix) in this node
Parameters:
Parameter | Type | Description |
---|---|---|
node | Node | The node to scale |
scale | Vector3 | The scale factor |
scale(Scene scene, Vector3 scale)
public static Scene scale(Scene scene, Vector3 scale)
Scale all geometries(Scale the control points not the transformation matrix) in this scene
Parameters:
Parameter | Type | Description |
---|---|---|
scene | Scene | The scene to scale |
scale | Vector3 | The scale factor |
Returns: Scene
splitMesh(Mesh mesh, SplitMeshPolicy policy)
public static Mesh[] splitMesh(Mesh mesh, SplitMeshPolicy policy)
Split mesh into sub-meshes by VertexElementMaterial. Each sub-mesh will use only one material. The original mesh will not get changed.
Parameters:
Parameter | Type | Description |
---|---|---|
mesh | Mesh | |
policy | SplitMeshPolicy |
Returns: com.aspose.threed.Mesh[]
splitMesh(Node node, SplitMeshPolicy policy)
public static void splitMesh(Node node, SplitMeshPolicy policy)
Split mesh into sub-meshes by VertexElementMaterial. Each sub-mesh will use only one material. Perform mesh splitting on a node
Parameters:
Parameter | Type | Description |
---|---|---|
node | Node | |
policy | SplitMeshPolicy |
splitMesh(Node node, SplitMeshPolicy policy, boolean createChildNodes)
public static void splitMesh(Node node, SplitMeshPolicy policy, boolean createChildNodes)
Split mesh into sub-meshes by VertexElementMaterial. Each sub-mesh will use only one material. Perform mesh splitting on a node
Parameters:
Parameter | Type | Description |
---|---|---|
node | Node | |
policy | SplitMeshPolicy | |
createChildNodes | boolean | Create child nodes for each sub-mesh. |
splitMesh(Node node, SplitMeshPolicy policy, boolean createChildNodes, boolean removeOldMesh)
public static void splitMesh(Node node, SplitMeshPolicy policy, boolean createChildNodes, boolean removeOldMesh)
Split mesh into sub-meshes by VertexElementMaterial. Each sub-mesh will use only one material. Perform mesh splitting on a node
Parameters:
Parameter | Type | Description |
---|---|---|
node | Node | |
policy | SplitMeshPolicy | |
createChildNodes | boolean | Create child nodes for each sub-mesh. |
removeOldMesh | boolean | Remove the old mesh after split, if this parameter is false, the old and new meshes will co-exists. |
splitMesh(Scene scene, SplitMeshPolicy policy)
public static void splitMesh(Scene scene, SplitMeshPolicy policy)
Split mesh into sub-meshes by VertexElementMaterial. Each sub-mesh will use only one material. Perform mesh splitting on all nodes of the scene.
Parameters:
Parameter | Type | Description |
---|---|---|
scene | Scene | |
policy | SplitMeshPolicy |
splitMesh(Scene scene, SplitMeshPolicy policy, boolean removeOldMesh)
public static void splitMesh(Scene scene, SplitMeshPolicy policy, boolean removeOldMesh)
Split mesh into sub-meshes by VertexElementMaterial. Each sub-mesh will use only one material. Perform mesh splitting on all nodes of the scene.
Parameters:
Parameter | Type | Description |
---|---|---|
scene | Scene | |
policy | SplitMeshPolicy | |
removeOldMesh | boolean |
toString()
public String toString()
Returns: java.lang.String
triangulate(Mesh mesh)
public static Mesh triangulate(Mesh mesh)
Convert a polygon-based mesh into full triangle mesh
Parameters:
Parameter | Type | Description |
---|---|---|
mesh | Mesh | The original non-triangle mesh |
Returns: Mesh - The generated new triangle mesh
triangulate(Scene scene)
public static void triangulate(Scene scene)
Convert all polygon-based meshes into full triangle mesh
Parameters:
Parameter | Type | Description |
---|---|---|
scene | Scene | The scene to process |
triangulate(List controlPoints)
public static int[][] triangulate(List<Vector4> controlPoints)
Convert a polygon into triangles, the order of the polygon is defined by the controlPoints
Parameters:
Parameter | Type | Description |
---|---|---|
controlPoints | java.util.List<com.aspose.threed.Vector4> | Control points of the mesh |
Returns: int[][] - A set of triangles
triangulate(List controlPoints, int[] polygon)
public static int[][] triangulate(List<Vector4> controlPoints, int[] polygon)
Convert a polygon into triangles
Parameters:
Parameter | Type | Description |
---|---|---|
controlPoints | java.util.List<com.aspose.threed.Vector4> | Control points of the mesh |
polygon | int[] | Polygon face |
Returns: int[][] - A set of triangles
triangulate(List controlPoints, List<int[]> polygons)
public static int[][] triangulate(List<Vector4> controlPoints, List<int[]> polygons)
Convert a polygon-based mesh into triangles
Parameters:
Parameter | Type | Description |
---|---|---|
controlPoints | java.util.List<com.aspose.threed.Vector4> | Control points of the mesh |
polygons | java.util.List<int[]> | Polygon faces |
Returns: int[][] - A set of triangles
triangulate(List controlPoints, List<int[]> polygons, boolean generateNormals, Vector3[][] nor_out)
public static int[][] triangulate(List<Vector4> controlPoints, List<int[]> polygons, boolean generateNormals, Vector3[][] nor_out)
Convert a polygon-based mesh into full triangle mesh
Parameters:
Parameter | Type | Description |
---|---|---|
controlPoints | java.util.List<com.aspose.threed.Vector4> | Control points of the mesh |
polygons | java.util.List<int[]> | Polygon faces |
generateNormals | boolean | Generate normals |
nor_out | Vector3[] | Generated Per-control point normal |
Returns: int[][] - A set of triangles
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |