com.jme.input
Class RelativeMouse

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.RelativeMouse
All Implemented Interfaces:
java.io.Serializable

public class RelativeMouse
extends Mouse

RelativeMouse defines a mouse controller that only maintains the relative change from one poll to the next. This does not maintain the position of a mouse in a rendering window. This type of controller is typically useful for a first person mouse look or similar.

Version:
$Id: RelativeMouse.java,v 1.13 2004/10/14 01:23:06 mojomonkey Exp $
Author:
Mark Powell
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
RelativeMouse(java.lang.String name)
          Constructor creates a new RelativeMouse object.
 
Method Summary
 void update()
          update sets the translation vector to the change from the previous polling.
 void update(boolean updateState)
          update updates the mouse's position by simply adding to the current location the mouse's X and Y movement delta.
 
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

RelativeMouse

public RelativeMouse(java.lang.String name)
Constructor creates a new RelativeMouse object.

Parameters:
name - the name of the scene element. This is required for identification and comparision purposes.
Method Detail

update

public void update()
update sets the translation vector to the change from the previous polling.

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

update

public void update(boolean updateState)
update updates the mouse's position by simply adding to the current location the mouse's X and Y movement delta. Unlike AbsoluteMouse, no checks are made for moving outside a paticular bounds because this class is used only for frame to frame relative movements.

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