//===========================================================================//
// File:	motion.hh                                                           //
// Project: MUNGA           Brick: Math Library                              //
// Contents: Implementation details for the position class                   //
//---------------------------------------------------------------------------//
//   Date    Who  Modification                                               //
// --------  ---  ---------------------------------------------------------- //
// 01/30/95  JMA  Initial coding.                                            //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc.                     //
// All Rights reserved worldwide                                             //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL               //
//===========================================================================//

#if !defined(MOTION_HPP)
#	define MOTION_HPP

#	if !defined(VECTOR3D_HPP)
#		include <vector3d.hpp>
#	endif

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~ Motion ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	class Motion
	{
	 public:
		#if defined(USE_SIGNATURE)
			friend int
				Is_Signature_Bad(const volatile Motion *);
		#endif

		Vector3D
			linearMotion;
		Vector3D
			angularMotion;

		static const Motion
			Identity;

		//
		// Constructors
		//
		Motion()
			{}
		Motion(const Motion& motion);
		Motion(
			const Vector3D& t,
			const Vector3D& q
		)
			{Check(&t); Check(&q); linearMotion = t; angularMotion = q;}

		//
		// Assignment operators
		//
		Motion&
			operator=(const Motion& p);

		//
		// Equality operator
		//
		Logical
			operator==(const Motion&) const;

		//
		// Origin motion
		//
		Motion&
			AddScaled(
				const Motion& source,
				const Motion& delta,
				Scalar t
			);

		//
		// Support functions
		//
		friend ostream&
			operator<<(
				ostream& stream,
				const Motion& p
			);
		Logical
			TestInstance() const;
		static Logical
			TestClass();
	};

#endif
