org.jrabbit.standard.game.world.camera.components
Class CameraTransforms.ViewRotation

java.lang.Object
  extended by org.jrabbit.base.graphics.transforms.Rotation
      extended by org.jrabbit.standard.game.world.camera.components.CameraTransforms.ViewRotation
All Implemented Interfaces:
GLTransform
Enclosing class:
CameraTransforms

public static class CameraTransforms.ViewRotation
extends Rotation

Similarly to ViewpointVector, ViewRotation needs to apply a negative of its rotation to work correctly.

Author:
Chris Molini

Field Summary
 
Fields inherited from class org.jrabbit.base.graphics.transforms.Rotation
degrees
 
Constructor Summary
CameraTransforms.ViewRotation()
          Creates a ViewRotation with angle [0].
CameraTransforms.ViewRotation(float degrees)
          Creates a ViewRotation at the indicated degrees.
 
Method Summary
 void bind()
          Applies a negative rotation of the Rotation's angle.
 void release()
          Undoes the applied transform.
 
Methods inherited from class org.jrabbit.base.graphics.transforms.Rotation
addListener, alertChange, copy, degrees, equals, getRotationDirection, removeListener, reset, rotate, rotateToFace, rotateTowards, rotateTowards, set, set, theta, toString, unitVector
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CameraTransforms.ViewRotation

public CameraTransforms.ViewRotation()
Creates a ViewRotation with angle [0].


CameraTransforms.ViewRotation

public CameraTransforms.ViewRotation(float degrees)
Creates a ViewRotation at the indicated degrees.

Parameters:
degrees - The degrees of rotation the ViewRotation starts at.
Method Detail

bind

public void bind()
Applies a negative rotation of the Rotation's angle.

Specified by:
bind in interface GLTransform
Overrides:
bind in class Rotation

release

public void release()
Undoes the applied transform.

Specified by:
release in interface GLTransform
Overrides:
release in class Rotation