-
Notifications
You must be signed in to change notification settings - Fork 33
Matrix Classes Design Notes
Toksaitov Dmitrii Alexandrovich edited this page Oct 30, 2023
·
3 revisions
- In the constructor
MatX(m00: float, m01: float, ...)the elementmIJshould go into arraymat indexIandJ. - For
Mat4parametersm30,m31, andm32should be considered translation componentsx,y,z. -
m: float[]should be 1-D array.
-----------------------------------------
| Mat2 |
| ------------------------------------- |
| - m: float[] |
| ------------------------------------- |
| + Mat2() |
| + Mat2(m00: float, m01: float, ...) |
| + Mat2(m: float[]) |
| + get(i: int, j: int): float |
| + transp(): Mat2 |
| + mul(other: Mat2): Mat2 |
| + mul(other: Vec2): Vec2 |
| + toString(): String |
| + toArray(): float[] |
-----------------------------------------
-----------------------------------------
| Mat3 |
| ------------------------------------- |
| - m: float[] |
| ------------------------------------- |
| + Mat3() |
| + Mat3(m00: float, m01: float, ...) |
| + Mat3(m: float[]) |
| + get(i: int, j: int): float |
| + transp(): Mat3 |
| + mul(other: Mat3): Mat3 |
| + mul(other: Vec3): Vec3 |
| + toString(): String |
| + toArray(): float[] |
-----------------------------------------
-----------------------------------------
| Mat4 |
| ------------------------------------- |
| - m: float[] |
| ------------------------------------- |
| + Mat4() |
| + Mat4(m00: float, m01: float, ...) |
| + Mat4(m: float[]) |
| + get(i: int, j: int): float |
| + transp(): Mat4 |
| + mul(other: Mat4): Mat4 |
| + mul(other: Vec4): Vec4 |
| + toString(): String |
| + toArray(): float[] |
-----------------------------------------