|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threed.jpct.GenericVertexController
The GenericVertexController provides an abstract class that implements large
portions of the IVertexController interface. Every implementation of a
VertexController should extend this class rather than implementing
IVertexController alone.
Don't use a GenericVertexController on meshes of objects that do use an
OcTree unless you are sure that no vertex will cross its node's borders after
it has been modified.
The GenericVertexController holds a copy of the actual mesh data, i.e. it
doesn't get the data directly from the mesh everytime. While this is much
faster, it makes the controller blind to changes to the mesh's vertex data
that may happen behind its back (like using keyframe animations on an object
that makes use of the mesh). Keep this in mind.
IVertexController,
Serialized Form| Field Summary |
| Fields inherited from interface com.threed.jpct.IVertexController |
ALTER_SOURCE_MESH, PRESERVE_SOURCE_MESH |
| Constructor Summary | |
GenericVertexController()
|
|
| Method Summary | |
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. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.threed.jpct.IVertexController |
apply |
| Constructor Detail |
public GenericVertexController()
| Method Detail |
public final boolean init(Mesh mesh,
boolean modify)
IVertexController
init in interface IVertexControllermesh - the Mesh the controller should be assigned tomodify - the mode
IVertexController.ALTER_SOURCE_MESH,
IVertexController.PRESERVE_SOURCE_MESHpublic boolean setup()
setup in interface IVertexControllerpublic final SimpleVector[] getSourceMesh()
IVertexController
getSourceMesh in interface IVertexControllerpublic final SimpleVector[] getSourceNormals()
IVertexController
getSourceNormals in interface IVertexControllerpublic final SimpleVector[] getDestinationMesh()
IVertexController
getDestinationMesh in interface IVertexControllerpublic final SimpleVector[] getDestinationNormals()
IVertexController
getDestinationNormals in interface IVertexControllerpublic final int getMeshSize()
IVertexController
getMeshSize in interface IVertexControllerpublic void refreshMeshData()
IVertexController
refreshMeshData in interface IVertexControllerpublic final void updateMesh()
updateMesh in interface IVertexControllerpublic final void destroy()
IVertexController
destroy in interface IVertexControllerMesh.removeVertexController()public void cleanup()
cleanup in interface IVertexControllerMesh.removeVertexController()
public int[] getPolygonIDs(int vertex,
int max)
IVertexController
getPolygonIDs in interface IVertexControllervertex - the number of the vertexmax - the maximum of IDs to return
public float[][] getTangentVectors()
IVertexController
getTangentVectors in interface IVertexController
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||