com.jme.input
Class AbsoluteMouse

java.lang.Object
  extended bycom.jme.scene.Spatial
      extended bycom.jme.scene.Geometry
          extended bycom.jme.scene.TriMesh
              extended bycom.jme.scene.shape.Quad
                  extended bycom.jme.input.Mouse
                      extended bycom.jme.input.AbsoluteMouse
All Implemented Interfaces:
java.io.Serializable

public class AbsoluteMouse
extends Mouse

AbsoluteMouse defines a mouse object that maintains a position within the window. Each call to update adjusts the current position by the change in position since the previous update. The mouse is forced to be contained within the values provided during construction (typically these correspond to the width and height of the window).

Version:
$Id: AbsoluteMouse.java,v 1.15 2004/10/14 01:23:06 mojomonkey Exp $
Author:
Mark Powell, Gregg Patton
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jme.input.Mouse
_speed, hasCursor, hotSpotLocation, hotSpotOffset, imageHeight, imageWidth, mouse
 
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
AbsoluteMouse(java.lang.String name, int width, int height)
          Constructor instantiates a new AbsoluteMouse object.
 
Method Summary
 void setLimit(int width, int height)
          set the mouse's limit.
 void update()
          update sets the mouse's current position within the window.
 void update(boolean updateState)
          update updates the mouse's information with the last known mouse movement and button presses.
 
Methods inherited from class com.jme.input.Mouse
getHotSpotOffset, getHotSpotPosition, getImageHeight, getImageWidth, getMouseInput, hasCursor, setHotSpotOffset, setMouseInput, setRenderState, setSpeed
 
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 com.jme.scene.Geometry
applyRenderState, applyStates, copyTextureCoords, findPick, getAllTextures, getCloneID, getColorAsFloatBuffer, getColors, getModelBound, getNormalAsFloatBuffer, getNormals, getNumberOfUnits, getTextureAsFloatBuffer, getTextureAsFloatBuffer, getTextures, getTextures, getVBOColorID, getVBONormalID, getVBOTextureID, getVBOVertexID, getVerticeAsFloatBuffer, getVertices, getVertQuantity, isVBOColorEnabled, isVBONormalEnabled, isVBOTextureEnabled, isVBOVertexEnabled, randomVertice, reconstruct, setAllTextures, setColor, setColors, setFloatBuffer, setForceView, setModelBound, setNormal, setNormalBuffer, setNormals, setRandomColors, setSolidColor, setTexture, setTexture, setTextureBuffer, setTextureCoord, setTextures, setTextures, setVBOColorEnabled, setVBOColorID, setVBONormalEnabled, setVBONormalID, setVBOTextureEnabled, setVBOTextureID, setVBOVertexEnabled, setVBOVertexID, setVertex, setVertexBuffer, setVertices, updateColorBuffer, updateColorBuffer, updateModelBound, updateNormalBuffer, updateNormalBuffer, updateTextureBuffer, updateTextureBuffer, updateTextureBuffer, updateVertexBuffer, updateVertexBuffer, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, isForceCulled, isForceView, onDraw, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setTextureCombineMode, setWorldBound, setZOrder, toString, updateGeometricState, updateRenderState, updateRenderState, updateWorldData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbsoluteMouse

public AbsoluteMouse(java.lang.String name,
                     int width,
                     int height)
Constructor instantiates a new AbsoluteMouse object. The limits of the mouse movements are provided.

Parameters:
name - the name of the scene element. This is required for identification and comparision purposes.
width - the width of the mouse's limit.
height - the height of the mouse's limit.
Method Detail

update

public void update()
update sets the mouse's current position within the window.

Specified by:
update in class Mouse
See Also:
Mouse.update(boolean)

update

public void update(boolean updateState)
update updates the mouse's information with the last known mouse movement and button presses. If updateState is true, the mouse is polled for new movement and button press information

Specified by:
update in class Mouse
Parameters:
updateState - Mouse information is updated if true
See Also:
Mouse.update(boolean)

setLimit

public void setLimit(int width,
                     int height)
set the mouse's limit.

Parameters:
width - the width of the mouse's limit.
height - the height of the mouse's limit.