|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvooga.physicsEngine.geometry.mathUtils.Matrix2f
public class Matrix2f
A utility class representing a 2 by 2 matrix. The main use is to create rotation matrices. Some of this code is copied from an open source implementation by Kevin Glass.
Field Summary | |
---|---|
Vector2f |
col1
The first column of the matrix |
Vector2f |
col2
The second column of the matrix |
Constructor Summary | |
---|---|
Matrix2f()
Create an empty matrix |
|
Matrix2f(double angle)
Create a matrix with a rotation |
|
Matrix2f(Vector2f col1,
Vector2f col2)
Create a matrix |
Method Summary | |
---|---|
Matrix2f |
invert()
Transpose the invert |
Vector2f |
multiply(Vector2f vec)
Multiply this matrix with a given vector |
Matrix2f |
transpose()
Transpose the matrix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Vector2f col1
public Vector2f col2
Constructor Detail |
---|
public Matrix2f()
public Matrix2f(double angle)
angle
- The angle of the rotation decribed by the matrixpublic Matrix2f(Vector2f col1, Vector2f col2)
col1
- The first columncol2
- The second columnMethod Detail |
---|
public Vector2f multiply(Vector2f vec)
vec
-
public Matrix2f transpose()
public Matrix2f invert()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |