|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
com.jme.scene.shape.Quad
com.jme.input.Mouse
Mouse defines a node that handles the rendering and updating
of a mouse input device. If a cursor is set, this cursor is desplayed in the
position defined by the device.
| Field Summary | |
protected float |
_speed
|
protected boolean |
hasCursor
the cursor's texture. |
protected Vector3f |
hotSpotLocation
This mouse's actual location after hotspot offset is taken into account. |
protected Vector3f |
hotSpotOffset
This mouse's hotspot location. |
protected int |
imageHeight
Height of this mouse's texture. |
protected int |
imageWidth
Width of this mouse's texture. |
protected MouseInput |
mouse
the input device. |
| Fields inherited from class com.jme.scene.TriMesh |
indices, triangleQuantity |
| Fields inherited from class com.jme.scene.Geometry |
bound, color, colorBuf, normal, normBuf, texBuf, texture, vertBuf, vertex, vertQuantity |
| Fields inherited from class com.jme.scene.Spatial |
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
| Constructor Summary | |
Mouse(java.lang.String name)
Constructor creates a new Mouse object. |
|
| Method Summary | |
Vector3f |
getHotSpotOffset()
Returns the currently set hotspot of the mouse. |
Vector3f |
getHotSpotPosition()
Returns this mouse's location relative to the hotspot offset. |
int |
getImageHeight()
getImageHeight retrieves the height of the cursor image. |
int |
getImageWidth()
getImageWidth retrieves the width of the cursor image. |
MouseInput |
getMouseInput()
getMouseInput retrieves the input device for the mouse. |
boolean |
hasCursor()
hasCursor returns true if there is a texture associated
with the mouse. |
void |
setHotSpotOffset(Vector3f offset)
Sets the mouse's hotspot offset. |
void |
setMouseInput(MouseInput mouse)
setMouseInput sets the input device for the mouse. |
RenderState |
setRenderState(RenderState rs)
setRenderState sets a render state for this node. |
void |
setSpeed(float speed)
Sets the speed multiplier for updating the cursor position |
abstract void |
update()
update updates the mouse input object. |
abstract void |
update(boolean updateState)
update updates the mouse input object. |
| Methods inherited from class com.jme.scene.shape.Quad |
getCenter, initialize, resize |
| Methods inherited from class com.jme.scene.TriMesh |
clearBuffers, draw, drawBounds, findCollisions, findTriangleCollision, findTrianglePick, findWorldRotMat, getIndexAsBuffer, getIndices, getMeshAsTriangles, getTriangle, getTriangle, getTriangleQuantity, hasCollision, hasTriangleCollision, putClone, reconstruct, setIndexBuffer, setIndices, updateCollisionTree, updateIndexBuffer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected MouseInput mouse
protected boolean hasCursor
protected int imageWidth
protected int imageHeight
protected float _speed
protected Vector3f hotSpotLocation
protected Vector3f hotSpotOffset
| Constructor Detail |
public Mouse(java.lang.String name)
Mouse object.
name - the name of the scene element. This is required for
identification and comparision purposes.| Method Detail |
public RenderState setRenderState(RenderState rs)
setRenderState sets a render state for this node. Note,
there can only be one render state per type per node. That is, there can
only be a single AlphaState a single TextureState, etc. If there is
already a render state for a type set the old render state will be
rendered. Otherwise, null is returned.
setRenderState in class Spatialrs - the render state to add.
public int getImageHeight()
getImageHeight retrieves the height of the cursor image.
public int getImageWidth()
getImageWidth retrieves the width of the cursor image.
public boolean hasCursor()
hasCursor returns true if there is a texture associated
with the mouse.
public void setMouseInput(MouseInput mouse)
setMouseInput sets the input device for the mouse.
mouse - the input device for the mouse.public MouseInput getMouseInput()
getMouseInput retrieves the input device for the mouse.
public abstract void update()
update updates the mouse input object. This is normally a
call to update(true).
update(boolean)public abstract void update(boolean updateState)
update updates the mouse input object. This is where the
mouse location and button press states are updated.
updateState - indicates if the mouse's state (buttons) should be updatedpublic void setSpeed(float speed)
speed - public Vector3f getHotSpotPosition()
public Vector3f getHotSpotOffset()
public void setHotSpotOffset(Vector3f offset)
offset - The new hotspot for this mouse.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||