#include <vecmath.h>
Inheritance diagram for Matrix3< T >:

Public Member Functions | |
| Vector3< T > | column (int) const |
| T | determinant () const |
| Matrix3< T > | inverse () const |
| template<class U> | |
| Matrix3 (const Matrix3< U > &) | |
| Matrix3 (const Vector3< T > &, const Vector3< T > &, const Vector3< T > &) | |
| Matrix3 () | |
| Matrix3 & | operator *= (T) |
| const Vector3< T > & | operator[] (int) const |
| Vector3< T > | row (int) const |
| Matrix3< T > | transpose () const |
Static Public Member Functions | |
| static Matrix3< T > | identity () |
| static Matrix3< T > | scaling (T) |
| static Matrix3< T > | scaling (const Vector3< T > &) |
| static Matrix3< T > | xrotation (T) |
| static Matrix3< T > | yrotation (T) |
| static Matrix3< T > | zrotation (T) |
Public Attributes | |
| Vector3< T > | r [3] |
|
|||||||||
|
Definition at line 573 of file vecmath.h. References Matrix3< T >::r. 00574 {
00575 r[0] = Vector3<T>(0, 0, 0);
00576 r[1] = Vector3<T>(0, 0, 0);
00577 r[2] = Vector3<T>(0, 0, 0);
00578 }
|
|
||||||||||||||||||||
|
Definition at line 581 of file vecmath.h. References Matrix3< T >::r.
|
|
||||||||||||||
|
|
|
||||||||||
|
Definition at line 619 of file vecmath.h. References Matrix3< T >::r. 00620 {
00621 return Vector3<T>(r[0][n], r[1][n], r[2][n]);
00622 }
|
|
|||||||||
|
Definition at line 710 of file vecmath.h. References Matrix3< T >::r. Referenced by Matrix3< T >::inverse(). 00711 {
00712 return (r[0].x * r[1].y * r[2].z +
00713 r[0].y * r[1].z * r[2].x +
00714 r[0].z * r[1].x * r[2].y -
00715 r[0].z * r[1].y * r[2].x -
00716 r[0].x * r[1].z * r[2].y -
00717 r[0].y * r[1].x * r[2].z);
00718 }
|
|
|||||||||
|
Definition at line 689 of file vecmath.h. 00690 {
00691 return Matrix3<T>(Vector3<T>(1, 0, 0),
00692 Vector3<T>(0, 1, 0),
00693 Vector3<T>(0, 0, 1));
00694 }
|
|
|||||||||
|
Definition at line 721 of file vecmath.h. References det2x2(), Matrix3< T >::determinant(), and Matrix3< T >::r. 00722 {
00723 Matrix3<T> adjoint;
00724
00725 // Just use Cramer's rule for now . . .
00726 adjoint.r[0].x = det2x2(r[1].y, r[1].z, r[2].y, r[2].z);
00727 adjoint.r[0].y = -det2x2(r[1].x, r[1].z, r[2].x, r[2].z);
00728 adjoint.r[0].z = det2x2(r[1].x, r[1].y, r[2].x, r[2].y);
00729 adjoint.r[1].x = -det2x2(r[0].y, r[0].z, r[2].y, r[2].z);
00730 adjoint.r[1].y = det2x2(r[0].x, r[0].z, r[2].x, r[2].z);
00731 adjoint.r[1].z = -det2x2(r[0].x, r[0].y, r[2].x, r[2].y);
00732 adjoint.r[2].x = det2x2(r[0].y, r[0].z, r[1].y, r[1].z);
00733 adjoint.r[2].y = -det2x2(r[0].x, r[0].z, r[1].x, r[1].z);
00734 adjoint.r[2].z = det2x2(r[0].x, r[0].y, r[1].x, r[1].y);
00735 adjoint *= 1 / determinant();
00736
00737 return adjoint;
00738 }
|
|
||||||||||
|
Definition at line 624 of file vecmath.h. References Matrix3< T >::r.
|
|
||||||||||
|
Definition at line 608 of file vecmath.h. References Matrix3< T >::r. 00609 {
00610 // return const_cast<Vector3<T>&>(r[n]);
00611 return r[n];
00612 }
|
|
||||||||||
|
Definition at line 614 of file vecmath.h. References Matrix3< T >::r. 00615 {
00616 return r[n];
00617 }
|
|
||||||||||
|
Definition at line 782 of file vecmath.h. References Matrix3< T >::scaling(). 00783 {
00784 return scaling(Vector3<T>(scale, scale, scale));
00785 }
|
|
||||||||||
|
Definition at line 774 of file vecmath.h. Referenced by Matrix3< T >::scaling(). 00775 {
00776 return Matrix3<T>(Vector3<T>(scale.x, 0, 0),
00777 Vector3<T>(0, scale.y, 0),
00778 Vector3<T>(0, 0, scale.z));
00779 }
|
|
|||||||||
|
Definition at line 697 of file vecmath.h. References Matrix3< T >::r. Referenced by FrameOfReference::fromUniversal(). 00698 {
00699 return Matrix3<T>(Vector3<T>(r[0].x, r[1].x, r[2].x),
00700 Vector3<T>(r[0].y, r[1].y, r[2].y),
00701 Vector3<T>(r[0].z, r[1].z, r[2].z));
00702 }
|
|
||||||||||
|
Definition at line 741 of file vecmath.h. Referenced by JPLEphOrbit::computePosition(), TritonOrbit::computePosition(), UranianSatelliteOrbit::computePosition(), DeimosOrbit::computePosition(), PhobosOrbit::computePosition(), and EllipticalOrbit::positionAtE(). 00742 {
00743 T c = (T) cos(angle);
00744 T s = (T) sin(angle);
00745
00746 return Matrix3<T>(Vector3<T>(1, 0, 0),
00747 Vector3<T>(0, c, -s),
00748 Vector3<T>(0, s, c));
00749 }
|
|
||||||||||
|
Definition at line 752 of file vecmath.h. Referenced by TritonOrbit::computePosition(), UranianSatelliteOrbit::computePosition(), DeimosOrbit::computePosition(), PhobosOrbit::computePosition(), and EllipticalOrbit::positionAtE(). 00753 {
00754 T c = (T) cos(angle);
00755 T s = (T) sin(angle);
00756
00757 return Matrix3<T>(Vector3<T>(c, 0, s),
00758 Vector3<T>(0, 1, 0),
00759 Vector3<T>(-s, 0, c));
00760 }
|
|
||||||||||
|
Definition at line 763 of file vecmath.h. 00764 {
00765 T c = (T) cos(angle);
00766 T s = (T) sin(angle);
00767
00768 return Matrix3<T>(Vector3<T>(c, -s, 0),
00769 Vector3<T>(s, c, 0),
00770 Vector3<T>(0, 0, 1));
00771 }
|
|
|||||
|
Definition at line 163 of file vecmath.h. Referenced by Matrix3< T >::column(), Matrix3< T >::determinant(), Matrix3< T >::inverse(), Matrix3< T >::Matrix3(), Matrix4< T >::Matrix4(), Matrix3< T >::operator *=(), Matrix3< T >::operator[](), Matrix3< T >::row(), and Matrix3< T >::transpose(). |
1.4.1