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

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

public static class CameraTransforms.ViewpointVector
extends Vector2f

This extension of Vector2f applies the negative of its coordinates.

Author:
Chris Molini

Field Summary
 
Fields inherited from class org.jrabbit.base.graphics.transforms.Vector2f
x, y
 
Constructor Summary
CameraTransforms.ViewpointVector()
          Creates a ViewpointVector at [0, 0].
CameraTransforms.ViewpointVector(float x, float y)
          Creates a ViewpointVector at the indicated coordinates.
 
Method Summary
 void bind()
          Applies a negative translation of the vector's coordinates.
 void release()
          Undoes the applied transform.
 
Methods inherited from class org.jrabbit.base.graphics.transforms.Vector2f
add, add, add, addListener, addPolar, addX, addY, alertChange, angle, angleTowards, angleTowards, cap, copy, decrease, decreaseX, decreaseY, difference, distanceSquared, distanceSquared, distanceTo, distanceTo, divide, equals, magnitude, moveTowards, moveTowards, multiply, removeListener, reset, set, set, setPolar, setX, setY, toString, unitVector, unitVectorTowards, unitVectorTowards, vertex, x, y
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CameraTransforms.ViewpointVector

public CameraTransforms.ViewpointVector()
Creates a ViewpointVector at [0, 0].


CameraTransforms.ViewpointVector

public CameraTransforms.ViewpointVector(float x,
                                        float y)
Creates a ViewpointVector at the indicated coordinates.

Parameters:
x - The initial x-coordinate of the Vector.
y - The initial y-coordinate of the Vector.
Method Detail

bind

public void bind()
Applies a negative translation of the vector's coordinates.

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

release

public void release()
Undoes the applied transform.

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