PolygonModifier

Inheritance: java.lang.Object

public class PolygonModifier

Utilities to modify polygons

Methods

MethodDescription
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 nodes)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 controlPoints)Convert a polygon into triangles, the order of the polygon is defined by the controlPoints
triangulate(List controlPoints, int[] polygon)Convert a polygon into triangles
triangulate(List controlPoints, List<int[]> polygons)Convert a polygon-based mesh into triangles
triangulate(List controlPoints, List<int[]> polygons, boolean generateNormals, Vector3[][] nor_out)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:

ParameterTypeDescription
meshMesh

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:

ParameterTypeDescription
sceneScene

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

generateNormal(Mesh mesh)

public static VertexElementNormal generateNormal(Mesh mesh)

Generate normal data from Mesh definition

Parameters:

ParameterTypeDescription
meshMesh

Returns: VertexElementNormal

generateUV(Mesh mesh)

public static VertexElementUV generateUV(Mesh mesh)

Generate UV data from the given input mesh

Parameters:

ParameterTypeDescription
meshMeshThe 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:

ParameterTypeDescription
meshMeshThe input mesh
normalsVertexElementNormalThe 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:

ParameterTypeDescription
nodeNodeThe 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:

ParameterTypeDescription
sceneSceneThe 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:

ParameterTypeDescription
nodesjava.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:

ParameterTypeDescription
nodeNodeThe node to scale
scaleVector3The 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:

ParameterTypeDescription
sceneSceneThe scene to scale
scaleVector3The 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:

ParameterTypeDescription
meshMesh
policySplitMeshPolicy

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:

ParameterTypeDescription
nodeNode
policySplitMeshPolicy

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:

ParameterTypeDescription
nodeNode
policySplitMeshPolicy
createChildNodesbooleanCreate 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:

ParameterTypeDescription
nodeNode
policySplitMeshPolicy
createChildNodesbooleanCreate child nodes for each sub-mesh.
removeOldMeshbooleanRemove 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:

ParameterTypeDescription
sceneScene
policySplitMeshPolicy

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:

ParameterTypeDescription
sceneScene
policySplitMeshPolicy
removeOldMeshboolean

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:

ParameterTypeDescription
meshMeshThe 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:

ParameterTypeDescription
sceneSceneThe 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:

ParameterTypeDescription
controlPointsjava.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:

ParameterTypeDescription
controlPointsjava.util.List<com.aspose.threed.Vector4>Control points of the mesh
polygonint[]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:

ParameterTypeDescription
controlPointsjava.util.List<com.aspose.threed.Vector4>Control points of the mesh
polygonsjava.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:

ParameterTypeDescription
controlPointsjava.util.List<com.aspose.threed.Vector4>Control points of the mesh
polygonsjava.util.List<int[]>Polygon faces
generateNormalsbooleanGenerate normals
nor_outVector3[]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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int