46 lines
803 B
C++
46 lines
803 B
C++
#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);}
|
||
|
||
Coord::Coord() : x(0), y(0), z(0), nx(0), ny(0), nz(0), m_lastFrame(-1)
|
||
{}
|
||
|
||
Coord::Coord(const Coord& coord)
|
||
{
|
||
x=coord.x;
|
||
y=coord.y;
|
||
z=coord.z;
|
||
m_lastFrame=coord.m_lastFrame;
|
||
}
|
||
|
||
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;
|
||
}
|
||
|
||
void Coord::calc()
|
||
{
|
||
if (Userview::getFrame()==m_lastFrame)
|
||
return;
|
||
m_lastFrame=Userview::getFrame();
|
||
|
||
// todo fonction de translation despoints
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|