//===========================================================================// // File: origin.tst // // Project: MUNGA Brick: Math Library // // Contents: Implementation details for the position class // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- ---------------------------------------------------------- // // 11/19/94 JMA Initial coding. // //---------------------------------------------------------------------------// // Copyright (C) 1994-1995, Virtual World Entertainment, Inc. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #if !defined(LINMTRX_HPP) #include #endif // //########################################################################### //########################################################################### // Logical Origin::TestClass() { DEBUG_STREAM << "Starting Origin test...\n"; Point3D p(1.0f,2.0f,3.0f); Quaternion q(0.0f, 1.0f, 0.0f, 0.0f); Quaternion r; r = q; const Origin a(p,r); Origin b; Quaternion t; t = a.angularPosition; Test( a.linearPosition == p && t.x == q.x && t.w == q.w ); LinearMatrix m; m = a; b = m; t = b; Test( a.linearPosition == b.linearPosition && t.y == q.y ); b = Point3D(3.0f,2.0f,1.0f); p = b; Test(p == Point3D(3.0f,2.0f,1.0f)); Quaternion s(1.0f, 0.0f, 0.0f, 0.0f); b = s; q = b; Test(q.x == s.x && q.y == s.y && q.z == s.z && q.w == s.w); return True; }