endrov.gl
Class EvGLCamera

java.lang.Object
  extended by endrov.gl.EvGLCamera

public class EvGLCamera
extends java.lang.Object


Field Summary
 javax.vecmath.Vector3d center
          Center position
 javax.vecmath.Vector3d pos
          Camera position
 
Constructor Summary
EvGLCamera()
           
EvGLCamera(EvGLCamera cam)
           
 
Method Summary
 void center(double dist)
          Make camera move at center at some distance with current rotation
 void fromElement(org.jdom.Element e)
           
 javax.vecmath.Matrix3d getRotationMatrixReadOnly()
          Get the rotation matrix.
 void moveCamera(double x, double y, double z)
          Move camera relative to camera coordinate system
 void rotateCamera(double x, double y, double z)
          Rotate around camera, relative to camera
 void rotateCenter(double x, double y, double z)
          Rotate camera around center
 javax.vecmath.Vector3d rotateVector(double x, double y, double z)
           
 javax.vecmath.Vector3d rotateVector(javax.vecmath.Vector3d v)
           
 void setRotation(double x, double y, double z)
          Set the rotation of the camera
 void setRotationMatrix(javax.vecmath.Matrix3d mat)
          Set rotation of camera through matrix
 void toElement(org.jdom.Element e)
           
 void transformGL(javax.media.opengl.GL2 gl)
          Do the GL transformation to move into camera coordinates
 javax.vecmath.Vector3d transformPoint(javax.vecmath.Vector3d v)
          Transform a point world coord to cam coord
 void unrotateGL(javax.media.opengl.GL2 gl)
          Inverse GL camera rotation
 javax.vecmath.Vector3d unrotateVector(javax.vecmath.Vector3d v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pos

public javax.vecmath.Vector3d pos
Camera position


center

public javax.vecmath.Vector3d center
Center position

Constructor Detail

EvGLCamera

public EvGLCamera()

EvGLCamera

public EvGLCamera(EvGLCamera cam)
Method Detail

toElement

public void toElement(org.jdom.Element e)

fromElement

public void fromElement(org.jdom.Element e)

rotateVector

public javax.vecmath.Vector3d rotateVector(double x,
                                           double y,
                                           double z)

rotateVector

public javax.vecmath.Vector3d rotateVector(javax.vecmath.Vector3d v)

unrotateVector

public javax.vecmath.Vector3d unrotateVector(javax.vecmath.Vector3d v)

moveCamera

public void moveCamera(double x,
                       double y,
                       double z)
Move camera relative to camera coordinate system


rotateCamera

public void rotateCamera(double x,
                         double y,
                         double z)
Rotate around camera, relative to camera


setRotation

public void setRotation(double x,
                        double y,
                        double z)
Set the rotation of the camera


setRotationMatrix

public void setRotationMatrix(javax.vecmath.Matrix3d mat)
Set rotation of camera through matrix


getRotationMatrixReadOnly

public javax.vecmath.Matrix3d getRotationMatrixReadOnly()
Get the rotation matrix. May not be written


transformGL

public void transformGL(javax.media.opengl.GL2 gl)
Do the GL transformation to move into camera coordinates


unrotateGL

public void unrotateGL(javax.media.opengl.GL2 gl)
Inverse GL camera rotation


transformPoint

public javax.vecmath.Vector3d transformPoint(javax.vecmath.Vector3d v)
Transform a point world coord to cam coord


rotateCenter

public void rotateCenter(double x,
                         double y,
                         double z)
Rotate camera around center


center

public void center(double dist)
Make camera move at center at some distance with current rotation