public abstract class GenericVertexController extends java.lang.Object implements IVertexController, java.io.Serializable
IVertexController
,
Serialized FormALTER_SOURCE_MESH, PRESERVE_SOURCE_MESH
Constructor and Description |
---|
GenericVertexController() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
This is an empty implementation of cleanup().
|
void |
destroy()
This method will be called when the controller will be removed from a
Mesh.
|
SimpleVector[] |
getDestinationMesh()
Returns the destination mesh's vertex data.
|
SimpleVector[] |
getDestinationNormals()
Returns the destination mesh's normals.
|
int |
getMeshSize()
Returns the size of the mesh.
|
int[] |
getPolygonIDs(int vertex,
int max)
Returns the polygon IDs of the polygons that are using the vertex
"number".
|
SimpleVector[] |
getSourceMesh()
Returns the source mesh's vertex data, i.e. the vertex-data that needs
modification.
|
SimpleVector[] |
getSourceNormals()
Returns the source mesh's normals, i.e. the normals that need
modification.
|
float[][] |
getTangentVectors()
If available, this will return the tangent vectors for the mesh.
|
boolean |
init(Mesh mesh,
boolean modify)
Initialize the VertexController with a mesh to modify and a operating
mode.
|
void |
refreshMeshData()
Refreshes the controller's data with the data taken directly from the
Mesh.
|
boolean |
setup()
This is an empty implementation of setup().
|
void |
updateMesh()
Alters the actual Mesh to reflect the modifications that have been
applied to the DestinationMesh- and DestinationNormals-arrays.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public final boolean init(Mesh mesh, boolean modify)
IVertexController
init
in interface IVertexController
mesh
- the Mesh the controller should be assigned tomodify
- the modeIVertexController.ALTER_SOURCE_MESH
,
IVertexController.PRESERVE_SOURCE_MESH
public boolean setup()
setup
in interface IVertexController
public final SimpleVector[] getSourceMesh()
IVertexController
getSourceMesh
in interface IVertexController
public final SimpleVector[] getSourceNormals()
IVertexController
getSourceNormals
in interface IVertexController
public final SimpleVector[] getDestinationMesh()
IVertexController
getDestinationMesh
in interface IVertexController
public final SimpleVector[] getDestinationNormals()
IVertexController
getDestinationNormals
in interface IVertexController
public final int getMeshSize()
IVertexController
getMeshSize
in interface IVertexController
public void refreshMeshData()
IVertexController
refreshMeshData
in interface IVertexController
public final void updateMesh()
updateMesh
in interface IVertexController
public final void destroy()
IVertexController
destroy
in interface IVertexController
Mesh.removeVertexController()
public void cleanup()
cleanup
in interface IVertexController
Mesh.removeVertexController()
public int[] getPolygonIDs(int vertex, int max)
IVertexController
getPolygonIDs
in interface IVertexController
vertex
- the number of the vertexmax
- the maximum of IDs to returnpublic float[][] getTangentVectors()
IVertexController
getTangentVectors
in interface IVertexController