org.gwoptics.mathutils
Class VectorUtils

java.lang.Object
  extended by org.gwoptics.mathutils.VectorUtils

public class VectorUtils
extends java.lang.Object


Constructor Summary
VectorUtils()
           
 
Method Summary
static processing.core.PVector rotateArbitaryAxis(processing.core.PVector P, processing.core.PVector A, float theta)
          Rotates a given vector about an arbitrary axis.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorUtils

public VectorUtils()
Method Detail

rotateArbitaryAxis

public static processing.core.PVector rotateArbitaryAxis(processing.core.PVector P,
                                                         processing.core.PVector A,
                                                         float theta)
Rotates a given vector about an arbitrary axis. All rotations are about the origin point to translations may be necessary after this step.

Equation used in this code is from the book Mathematics for 3D game programming by Eric Lengyel, 2nd Edition, page 78, ISBN 1-58450-277-0.

Parameters:
P -
A -
theta -
Returns:


processing library gwoptics by Daniel Brown and Andreas Freise. (c) 2009 onwards