|
||||||||||
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
public abstract class Mouse
Mouse
defines a node that handles the rendering and updating
of a mouse input device. If a cursor is set, this cursor is displayed in the
position defined by the device.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.TriMesh |
---|
TriMesh.Mode |
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary | |
---|---|
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. |
Fields inherited from class com.jme.scene.shape.Quad |
---|
height, width |
Fields inherited from class com.jme.scene.TriMesh |
---|
indexBuffer, mode, triangleQuantity |
Fields inherited from class com.jme.scene.Geometry |
---|
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity |
Fields inherited from class com.jme.scene.Spatial |
---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, 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. |
boolean |
hasCursor()
hasCursor returns true if there is a texture associated
with the mouse. |
abstract void |
registerWithInputHandler(InputHandler inputHandler)
|
void |
setHotSpotOffset(Vector3f offset)
Sets the mouse's hotspot offset. |
RenderState |
setRenderState(RenderState rs)
setRenderState sets a render state for this node. |
abstract void |
setSpeed(float speed)
Sets the speed multiplier for updating the cursor position |
Methods inherited from class com.jme.scene.shape.Quad |
---|
getCenter, getHeight, getWidth, initialize, resize, updateGeometry |
Methods inherited from class com.jme.scene.TriMesh |
---|
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, randomPointOnTriangles, read, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jme.util.export.Savable |
---|
getClassTag |
Field Detail |
---|
protected boolean hasCursor
protected int imageWidth
protected int imageHeight
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 BlendState 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 Spatial
rs
- 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 abstract void setSpeed(float speed)
speed
- public Vector3f getHotSpotPosition()
public Vector3f getHotSpotOffset()
public void setHotSpotOffset(Vector3f offset)
offset
- The new hotspot for this mouse.public abstract void registerWithInputHandler(InputHandler inputHandler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |