maspack.matrix
Class RotationMatrix2d

java.lang.Object
  extended bymaspack.matrix.MatrixObject
      extended bymaspack.matrix.Matrix2dObject
          extended bymaspack.matrix.RotationMatrix2d

public class RotationMatrix2d
extends Matrix2dObject


Field Summary
 
Fields inherited from class maspack.matrix.Matrix2dObject
m00, m01, m10, m11
 
Constructor Summary
RotationMatrix2d()
           
RotationMatrix2d(double ang)
           
RotationMatrix2d(RotationMatrix2d R)
           
 
Method Summary
 double getAngle()
           
 void inverseTransform(Vector2d vr)
           
 void inverseTransform(Vector2d vr, Vector2d v1)
           
 boolean invert()
          Inverts this matrix in place, returning false if the matrix is detected to be singular.
 boolean invert(RotationMatrix2d r1)
           
 void mul(RotationMatrix2d r1)
           
 void mul(RotationMatrix2d r1, RotationMatrix2d r2)
           
 void mulAngle(double ang)
           
 void mulInverse(RotationMatrix2d r1)
           
 boolean mulInverse(Vector2d vr)
          Multiplies the column vector vr by the inverse of this matrix and places the result back in vr.
 boolean mulInverse(Vector2d vr, Vector2d v1)
          Multiplies the column vector v1 by the inverse of this matrix and places the result in vr.
 void mulInverseBoth(RotationMatrix2d r1, RotationMatrix2d r2)
           
 void mulInverseLeft(RotationMatrix2d r1, RotationMatrix2d r2)
           
 void mulInverseRight(RotationMatrix2d r1, RotationMatrix2d r2)
           
 boolean mulInverseTranspose(Vector2d vr)
          Multiplies vector vr by the inverse transpose of this matrix, in place.
 boolean mulInverseTranspose(Vector2d vr, Vector2d v1)
          Multiplies the column vector v1 by the inverse transpose of this matrix and places the result in vr.
 void setAngle(double ang)
           
 void setRandom()
           
 void setRandom(java.util.Random generator)
           
 void transform(Vector2d vr)
           
 void transform(Vector2d vr, Vector2d v1)
           
 
Methods inherited from class maspack.matrix.Matrix2dObject
colSize, determinant, epsilonEquals, equals, frobeniusNorm, get, get, getColumn, getColumn, getRow, getRow, infinityNorm, mul, mul, mulTranspose, mulTranspose, negate, oneNorm, rowSize, set, set, set, setColumn, setColumn, setIdentity, setRow, setRow, transpose
 
Methods inherited from class maspack.matrix.MatrixObject
epsilonEquals, equals, equals, get, getColumn, getRow, isFixedSize, scan, set, set, setColumn, setRow, setSize, toString, toString, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RotationMatrix2d

public RotationMatrix2d()

RotationMatrix2d

public RotationMatrix2d(double ang)

RotationMatrix2d

public RotationMatrix2d(RotationMatrix2d R)
Method Detail

mul

public void mul(RotationMatrix2d r1)

mul

public void mul(RotationMatrix2d r1,
                RotationMatrix2d r2)

mulInverse

public void mulInverse(RotationMatrix2d r1)

mulInverseLeft

public void mulInverseLeft(RotationMatrix2d r1,
                           RotationMatrix2d r2)

mulInverseRight

public void mulInverseRight(RotationMatrix2d r1,
                            RotationMatrix2d r2)

mulInverseBoth

public void mulInverseBoth(RotationMatrix2d r1,
                           RotationMatrix2d r2)

mulInverse

public boolean mulInverse(Vector2d vr,
                          Vector2d v1)
Multiplies the column vector v1 by the inverse of this matrix and places the result in vr.

Overrides:
mulInverse in class Matrix2dObject
Parameters:
vr - result vector
v1 - vector to multiply by
Returns:
true (matrix is never singular)

mulInverse

public boolean mulInverse(Vector2d vr)
Multiplies the column vector vr by the inverse of this matrix and places the result back in vr.

Overrides:
mulInverse in class Matrix2dObject
Parameters:
vr - vector to multiply by (in place)
Returns:
true (matrix is never singular)

mulInverseTranspose

public boolean mulInverseTranspose(Vector2d vr,
                                   Vector2d v1)
Multiplies the column vector v1 by the inverse transpose of this matrix and places the result in vr. For a rotation matrix, this is equivalent to simply multiplying by the matrix.

Overrides:
mulInverseTranspose in class Matrix2dObject
Parameters:
vr - result vector
v1 - vector to multiply by
Returns:
true (matrix is never singular)

mulInverseTranspose

public boolean mulInverseTranspose(Vector2d vr)
Multiplies vector vr by the inverse transpose of this matrix, in place. For a rotation matrix, this is equivalent to simply multiplying by the matrix.

Overrides:
mulInverseTranspose in class Matrix2dObject
Parameters:
vr - vector to multiply
Returns:
true (matrix is never singular)

invert

public boolean invert()
Description copied from class: Matrix2dObject
Inverts this matrix in place, returning false if the matrix is detected to be singular.

Overrides:
invert in class Matrix2dObject

invert

public boolean invert(RotationMatrix2d r1)

transform

public void transform(Vector2d vr,
                      Vector2d v1)

transform

public void transform(Vector2d vr)

inverseTransform

public void inverseTransform(Vector2d vr,
                             Vector2d v1)

inverseTransform

public void inverseTransform(Vector2d vr)

setAngle

public void setAngle(double ang)

mulAngle

public void mulAngle(double ang)

getAngle

public double getAngle()

setRandom

public void setRandom()

setRandom

public void setRandom(java.util.Random generator)