2019-07-17 11:44:05 +02:00
|
|
|
|
#include "coord.h"
|
|
|
|
|
|
|
|
|
|
bool operator==(Coord const& a, Coord const& b)
|
|
|
|
|
{return (a.x==b.x && a.y==b.y && a.z==b.z);}
|
|
|
|
|
bool operator!=(Coord const& a, Coord const& b)
|
|
|
|
|
{return !(a==b);}
|
|
|
|
|
|
2019-07-17 15:28:52 +02:00
|
|
|
|
Coord::Coord() : x(0), y(0), z(0), nx(0), ny(0), nz(0), m_lastFrame(-1)
|
2019-07-17 11:44:05 +02:00
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
Coord::Coord(const Coord& coord)
|
|
|
|
|
{
|
|
|
|
|
x=coord.x;
|
|
|
|
|
y=coord.y;
|
|
|
|
|
z=coord.z;
|
2019-07-17 15:28:52 +02:00
|
|
|
|
m_lastFrame=coord.m_lastFrame;
|
2019-07-17 11:44:05 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Coord& Coord::operator=(const Coord& a)
|
|
|
|
|
{this->Coord(a);return *this;}
|
|
|
|
|
|
|
|
|
|
Coord& Coord::operator+=(const Coord& a)
|
|
|
|
|
{x+=a.x;y+=a.y;z+=a.z;return *this;}
|
|
|
|
|
|
|
|
|
|
Coord operator+(Coord const& a, Coord const& b)
|
|
|
|
|
{
|
|
|
|
|
Coord copie(a);
|
|
|
|
|
copie+=b;
|
|
|
|
|
return copie;
|
2019-07-17 15:28:52 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Coord::calc()
|
|
|
|
|
{
|
|
|
|
|
if (Userview::getFrame()==m_lastFrame)
|
|
|
|
|
return;
|
|
|
|
|
m_lastFrame=Userview::getFrame();
|
|
|
|
|
|
|
|
|
|
// todo fonction de translation despoints
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|