|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ryanm.glvisualiser.GLCamera
@ConfigurableType(value="Camera") public class GLCamera
Defines a camera that the user can move about with quake-style
controls. The position can be reset by pressing r. The controls are :
Forward = w
Back = s
Sidestep left = a
Sidestep right = d
Up = e
Down = q
The mouse controls are:
Right-button drag = look around - in best inverted style
Mouse wheel up = Zoom in
Mouse wheel down = Zoom out
| Field Summary | |
|---|---|
Vector3f |
default3dPosition
The default position of the camera |
Vector3f |
default3dTarget
The default target of the camera |
float |
farPlane
The distance to the far clipping plane |
float |
mouseWheelSensitivity
The angle by which to alter the fov for every click of the wheel, in degrees |
float |
nearPlane
The distances to the near and far clipping planes |
boolean |
originView
When in originView mode, the near and far clipping planes are set so as to keep the unit cube in the positive octant in view. |
boolean |
ortho
When true, an orthographic matrix is used |
float |
orthoWidth
The minimum extent of the orthographic view in either the x or y directions |
int |
pickingSensitivity
The size of the picking square |
float |
speed
The movement speed of the camera, in units per second |
| Method Summary | |
|---|---|
float |
getAspectRatio()
Gets the aspect ratio of the viewport |
Configurator |
getConfigurator()
Gets a Configurator object that describes and can manipulate the variables of this Configurable. |
double |
getFarPlane()
Gets the distance to the far clipping plane |
float |
getFieldOfView()
Gets the field of view of this camera |
float |
getMouseSensitivity()
Gets the turning speed of the camera |
double |
getNearPlane()
Gets the distance to the near clipping plane |
Point3f |
getPosition()
Gets the camera's position |
Point3f |
getTarget()
Gets the current view target |
Vector3f |
getUpVector()
Gets the camera's up-vector |
Vector3f |
getViewDirection()
Computes the current view vector |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent mwe)
|
void |
setMouseSensitivity(float mouseSensitivity)
Sets the turning speed of the camera. |
void |
setPosition(Point3f position)
Sets the camera position. |
void |
setTarget(Point3f target)
Sets the target point for the camera to look at |
void |
setTileMatrix(com.sun.opengl.util.TileRenderer tr)
Sets the tile rendering matrix appropriately |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@ConfigurableVariable(value="Default position") @Description(value="The default position of the camera") @Priority(value=4) public Vector3f default3dPosition
@ConfigurableVariable(value="Default Target") @Description(value="The default target point of the camera") @Priority(value=5) public Vector3f default3dTarget
@ConfigurableVariable(value="Origin View") @Description(value="When in origin view, the near and far clipping planes are set to keep the unit octant in view") @Priority(value=6) public boolean originView
@ConfigurableVariable(value="Orthographic") @Description(value="Sets the camera to an orthographic view") @Priority(value=9) public boolean ortho
@ConfigurableVariable(value="Orthographic size")
@Description(value="The minimum extent of the orthographic view in either the x or y directions")
@NumberRange(value={9.999999747378752E-6f,0f/0f})
@Priority(value=10)
public float orthoWidth
@ConfigurableVariable(value="Near clipping plane") @Description(value="The distance to the near clipping plane") @Priority(value=7) public float nearPlane
@ConfigurableVariable(value="Far clipping plane") @Description(value="The distance to the far clipping plane") @Priority(value=8) public float farPlane
@ConfigurableVariable(value="Speed")
@Description(value="The movement speed of the camera, in units per second")
@NumberRange(value={0.0f,5.0f})
@Priority(value=1)
public float speed
@ConfigurableVariable(value="Wheel")
@Description(value="The wheel sensitivity, in degrees per click")
@NumberRange(value={0.0f,10.0f})
@Priority(value=3)
public float mouseWheelSensitivity
@ConfigurableVariable(value="Picking Sensitivity")
@Description(value="The size of the picking window, in pixels")
@NumberRange(value={1.0f,50.0f})
@Priority(value=11)
public int pickingSensitivity
| Method Detail |
|---|
public void setTarget(Point3f target)
target - The target point, or null to leave target modepublic Point3f getTarget()
public void setPosition(Point3f position)
position - The desired position, or null to return to the default
positionpublic Point3f getPosition()
public Vector3f getUpVector()
public Vector3f getViewDirection()
public float getFieldOfView()
public double getNearPlane()
public double getFarPlane()
public float getAspectRatio()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseWheelMoved(java.awt.event.MouseWheelEvent mwe)
mouseWheelMoved in interface java.awt.event.MouseWheelListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic Configurator getConfigurator()
Configurable
getConfigurator in interface Configurable@ConfigurableVariable(value="Mouse") public float getMouseSensitivity()
@ConfigurableVariable(value="Mouse")
@Description(value="The turning speed of the camera, in degrees per pixel of mouse movement")
@NumberRange(value={0.0f,2.0f})
@Priority(value=2)
public void setMouseSensitivity(float mouseSensitivity)
mouseSensitivity - The angle increment, in degrees per pixel.public void setTileMatrix(com.sun.opengl.util.TileRenderer tr)
tr - The tile render context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||