#include <MathTest.h>
Static Public Member Functions | |
static BOOL | Matrix4Inverse (void) |
This class test computing of inverse matrix for matrix 4x4. | |
static BOOL | Matrix3Inverse (void) |
This class test computing of inverse matrix for matrix 3x3. | |
static BOOL | ConvMatrix3Quaternion (void) |
Test conversion between matrix 3x3 and quaternion. | |
static BOOL | ConvMatrix4Quaternion (void) |
Test conversion between matrix 4x4 and quaternion. | |
static BOOL | ConvEulerAnglesMatrix4 (void) |
Test conversion between Euler angles and matrix 4x4. | |
static BOOL | ConvEulerAnglesMatrix3 (void) |
Test conversion between Euler angles and matrix 3x3. | |
static BOOL | ConvEulerAnglesQuaternion (void) |
Tests conversion from Euler angles to quaternion. | |
static BOOL | ConvQuaternionEulerAngles (void) |
This method test conversion from quaternion to Euler angles. | |
static BOOL | CalcMatrix3QuaternionMul (void) |
This method test matrix and quaternion multiplication. | |
static BOOL | CalcPlanePlaneIntersection (void) |
This method tests plane-plane intersection where result should be line or nothing when two planes are parallel. | |
static BOOL | CalcLineSegmentDistance (void) |
This method tests calculation distance from point to line segment. | |
static BOOL | CalcPlaneSegmentIntersection (void) |
This method tests intersection between plane and line segment. | |
static BOOL | CalcPlaneRayIntersection (void) |
This method intersection between plane and ray. | |
static BOOL | CalcSphereLineIntersection (void) |
This method tests intersection between line and sphere. | |
static BOOL | CalcSphereLineSegmentIntersection (void) |
This method test intersection between plane and line segment. | |
static BOOL | CalcSphereRayIntersection (void) |
This method tests intersection between ray and sphere. | |
static BOOL | CalcSphereSphereIntersection (void) |
Test intersection between two spheres. | |
static BOOL | CalcAABBoxLineSegmentProjection (void) |
This method test projection from AABB to line segment. | |
static BOOL | CalcAABBoxAABBoxIntersection (void) |
This method check intersection between two AABB. | |
static BOOL | CalcRay2DLine2DIntersection (void) |
This method tests intersection between ray and line in 2D-space. | |
static BOOL | CalcLineSegment2DVector2DProjection (void) |
This method tests projecton of points to line segment in 2D-space. | |
static BOOL | CalcLine2DLineSegment2DIntersection (void) |
This method tests intersection between line and line segment in 2D-space. | |
static BOOL | CalcRectangle2DLineSegment2DIntersection (void) |
This method test intersection between rectangle and line segment in 2D-space. | |
static BOOL | TransformPlanePoint (void) |
This method tests conversion from plane to matrix and transforming points by this matrix. | |
static BOOL | AllTests (void) |
Run all tests. |
Class should be used only while debugging for check correctness of used mathematic methods.
Definition at line 25 of file MathTest.h.
|
|
This method check intersection between two AABB.
Definition at line 762 of file MathTest.h. References NSMath::TAABBox::Compare(), NSMath::TAABBox::IsIntersectAABB(), NSMath::TAABBox::MoveToLB(), NSMath::TAABBox::ScaleFromCenter(), NSMath::TAABBox::Surface(), NSMath::TAABBox::Translate(), TRUE, and NSMath::TAABBox::Volume(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method test projection from AABB to line segment.
Definition at line 734 of file MathTest.h. References NSMath::NSStdMath::compareFloat(), NSMath::TAABBox::ProjectToLineSegment(), NSMath::TAABBox::Translate(), and TRUE. Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests intersection between line and line segment in 2D-space.
Definition at line 877 of file MathTest.h. References NSMath::TLine2D::Intersect(), NSMath::TLine2D::IntersectPoint(), NSMath::TLine2D::IsOnLine(), NSMath::TLineSegment2D::IsOnSegment(), NSMath::TVector2D::Normalize(), and NSMath::TLineSegment2D::SetStart(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests projecton of points to line segment in 2D-space.
Definition at line 842 of file MathTest.h. References NSMath::NSStdMath::compareFloat(), NSMath::TLineSegment2D::SetEnd(), NSMath::TLineSegment2D::Time(), and NSMath::TLineSegment2D::TimeNormalized(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests calculation distance from point to line segment.
Definition at line 381 of file MathTest.h. References NSMath::TLineSegment::Distance(), and TRUE. Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method test matrix and quaternion multiplication. If we have three rotation matrices M0, M1 and M2 and corresponding quaternions Q0,Q1 and Q2 then multiplaying them in sequence M = M0*M1*M2 should be equal Q = Q2*Q1*Q0. Definition at line 314 of file MathTest.h. References NSMath::TVector3::Compare(), NSMath::TMatrix3::Compare(), NSMath::TMatrix3::MulRightByRotateX(), NSMath::TMatrix3::MulRightByRotateY(), NSMath::TMatrix3::MulRightByRotateZ(), NSMath::TMatrix3::RotateX(), NSMath::TMatrix3::RotateZ(), NSMath::TQuaternion::ToMatrix3(), NSMath::TQuaternion::TransformTo(), and NSMath::TMatrix3::TransformTo(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests plane-plane intersection where result should be line or nothing when two planes are parallel.
Definition at line 357 of file MathTest.h. References NSMath::TLine::GetPoint(), NSMath::TPlane::IntersectPlane(), NSMath::TPlane::IsOnPlane(), and NSMath::TVector3::Normalize(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method intersection between plane and ray.
Definition at line 425 of file MathTest.h. References NSMath::TPlane::Intersect(), NSMath::TPlane::IntersectPoint(), NSMath::TPlane::IsOnPlane(), and NSMath::TVector3::Normalize(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests intersection between plane and line segment.
Definition at line 399 of file MathTest.h. References NSMath::TPlane::Intersect(), NSMath::TPlane::IntersectPoint(), NSMath::TPlane::IsOnPlane(), and NSMath::TVector3::Normalize(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests intersection between ray and line in 2D-space.
Definition at line 817 of file MathTest.h. References NSMath::TLine2D::Intersect(), NSMath::TLine2D::IntersectPoint(), NSMath::TRay2D::Inverse(), NSMath::TLine2D::IsOnLine(), and NSMath::TRay2D::IsOnRay(). Here is the call graph for this function: ![]() |
|
This method test intersection between rectangle and line segment in 2D-space.
Definition at line 904 of file MathTest.h. References NSMath::TLineSegment2D::Distance(), NSMath::TLineSegment2D::GetNormal(), NSMath::TRectangle2D::IsIntersect(), NSMath::TLineSegment2D::SetEnd(), NSMath::TLineSegment2D::SetStart(), and NSMath::TLineSegment2D::Translate(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests intersection between line and sphere.
Definition at line 454 of file MathTest.h. References NSMath::TSphere::IsIntersect(), NSMath::TSphere::IsIntersectPoints(), NSMath::TLine::IsOnLine(), NSMath::TSphere::IsOnSurface(), and NSMath::TLine::PointForTime(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method test intersection between plane and line segment.
Definition at line 521 of file MathTest.h. References NSMath::TSphere::IsIntersect(), NSMath::TSphere::IsIntersectPoints(), NSMath::TLineSegment::IsOnSegment(), NSMath::TSphere::IsOnSurface(), and NSMath::TLineSegment::PointForTime(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests intersection between ray and sphere.
Definition at line 577 of file MathTest.h. References NSMath::TSphere::IsIntersect(), NSMath::TSphere::IsIntersectPoints(), NSMath::TRay::IsOnRay(), NSMath::TSphere::IsOnSurface(), and NSMath::TRay::PointForTime(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
Test intersection between two spheres.
Definition at line 610 of file MathTest.h. References NSMath::TSphere::ComparePrecise(), NSMath::TSphere::IsIntersect(), NSMath::TSphere::IsIntersectsSphere(), and NSMath::TSphere::Set(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
Test conversion between Euler angles and matrix 3x3.
Definition at line 243 of file MathTest.h. References NSMath::TMatrix3::Compare(), NSMath::TMatrix4::MulRightByRotateX(), NSMath::TMatrix4::MulRightByRotateZ(), NSMath::NSFastMath::PI_HALF, NSMath::TMatrix4::RotateY(), NSMath::TEulerAngles::Set(), NSMath::TEulerAngles::ToMatrix3(), and NSMath::TMatrix4::ToMatrix3(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
Test conversion between Euler angles and matrix 4x4.
Definition at line 221 of file MathTest.h. References NSMath::TMatrix4::Compare(), NSMath::TMatrix4::MulRightByRotateX(), NSMath::TMatrix4::MulRightByRotateZ(), NSMath::NSFastMath::PI_HALF, NSMath::TMatrix4::RotateY(), NSMath::TEulerAngles::Set(), and NSMath::TEulerAngles::ToMatrix4(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
Tests conversion from Euler angles to quaternion. Euler angles convert to rotation matrix and to quaternion. Then transform specified point with matrix and with quaternion and compare results. Definition at line 270 of file MathTest.h. References NSMath::TVector3::Compare(), NSMath::TEulerAngles::ToMatrix3(), NSMath::TQuaternion::TransformTo(), and NSMath::TMatrix3::TransformTo(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
Test conversion between matrix 3x3 and quaternion.
Definition at line 161 of file MathTest.h. References NSMath::TMatrix3::Compare(), NSMath::TVector3::Compare(), NSMath::TMatrix3::MulRightByRotateX(), NSMath::TMatrix3::MulRightByRotateY(), NSMath::TMatrix3::RotateX(), NSMath::TQuaternion::ToMatrix3(), NSMath::TMatrix3::ToQuaternion(), NSMath::TQuaternion::TransformTo(), and NSMath::TMatrix3::TransformTo(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
Test conversion between matrix 4x4 and quaternion.
Definition at line 191 of file MathTest.h. References NSMath::TMatrix4::Compare(), NSMath::TVector3::Compare(), NSMath::TMatrix4::MulRightByRotateX(), NSMath::TMatrix4::MulRightByRotateY(), NSMath::TMatrix4::RotateX(), NSMath::TQuaternion::ToMatrix4(), NSMath::TMatrix4::ToQuaternion(), NSMath::TMatrix4::TransformAsVectorTo(), and NSMath::TQuaternion::TransformTo(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method test conversion from quaternion to Euler angles.
Definition at line 294 of file MathTest.h. References NSMath::TEulerAngles::Compare(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This class test computing of inverse matrix for matrix 3x3.
Definition at line 134 of file MathTest.h. References NSMath::TMatrix3::GetInverse(), NSMath::TMatrix3::MulRightByRotateY(), NSMath::TMatrix3::RemoveSmallValues(), and NSMath::TMatrix3::RotateX(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This class test computing of inverse matrix for matrix 4x4.
Definition at line 108 of file MathTest.h. References NSMath::TMatrix4::GetInverse(), NSMath::TMatrix4::RemoveSmallValues(), and NSMath::TMatrix4::RotateYTran(). Referenced by AllTests(). Here is the call graph for this function: ![]() |
|
This method tests conversion from plane to matrix and transforming points by this matrix.
Definition at line 930 of file MathTest.h. References NSMath::TPlane::IsOnPlane(), NSMath::TVector3::Normalize(), NSMath::TPlane::ReflectionMatrix(), NSMath::TMatrix4::TransformAsPointTo(), and TRUE. Referenced by AllTests(). Here is the call graph for this function: ![]() |