public class VertexController extends AbstractMeshController
This class provides a controller for Vertex instances, and it creates a VertexView for a Vertex. It also listens for changes to its Vertex, at which point it updates its VertexView. It can also send updates to the Vertex model based on user input.
component
Constructor and Description |
---|
VertexController(Vertex vertex,
java.util.concurrent.ConcurrentLinkedQueue<AbstractMeshController> queue,
com.jme3.material.Material material)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
This operation returns a clone of the VertexController using a deep copy.
|
void |
copy(VertexController controller)
This operation copies the contents of a VertexController into the current
object using a deep copy.
|
boolean |
equals(java.lang.Object otherObject)
This operation is used to check equality between this VertexController
and another VertexController.
|
com.jme3.math.Vector3f |
getLocation()
Gets the current location from the model.
|
int |
hashCode()
This operation returns the hash value of the VertexController.
|
void |
setLocation(com.jme3.math.Vector3f location)
Sets the current location in the model.
|
void |
syncView()
(non-Javadoc)
|
void |
update(IUpdateable component)
Overrides the default behavior to make sure the appropriate properties
that derive directly from the model get marked as dirty.
|
copy, dispose, getInverseScale, getParentNode, getScale, getSize, getState, setParentNode, setScale, setSize, setState
public VertexController(Vertex vertex, java.util.concurrent.ConcurrentLinkedQueue<AbstractMeshController> queue, com.jme3.material.Material material)
The default constructor.
vertex
- The Vertex managed by this controller.
queue
- The queue used for updating views handled by this and other controllers.
material
- The jME3 Material that should be used for the vertex graphics.
public com.jme3.math.Vector3f getLocation()
Gets the current location from the model.
The current location of the Vertex.
public void setLocation(com.jme3.math.Vector3f location)
Sets the current location in the model.
location
- The new location of the Vertex.
public boolean equals(java.lang.Object otherObject)
This operation is used to check equality between this VertexController and another VertexController. It returns true if the objects are equal and false if they are not.
equals
in class AbstractMeshController
otherObject
- The other object that should be compared with this one.
True if the objects are equal, false otherwise.
public int hashCode()
This operation returns the hash value of the VertexController.
hashCode
in class AbstractMeshController
The hashcode of the object.
public void copy(VertexController controller)
This operation copies the contents of a VertexController into the current object using a deep copy.
controller
- The object from which the values should be copied.
public java.lang.Object clone()
This operation returns a clone of the VertexController using a deep copy.
clone
in class AbstractMeshController
The new clone.
public void syncView()
syncView
in class AbstractMeshController
AbstractMeshController.syncView()
public void update(IUpdateable component)
update
in interface IUpdateableListener
update
in class AbstractMeshController
component
- The component that was updated in some way.