#pragma once

#include "vector3d.h"

//~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 std::ostream& operator<<(std::ostream& stream, const Motion& p);
	Logical TestInstance() const;
	static Logical TestClass();
};
