/*
    auteur: Thibault Podevin
    titre:   class point 3d
    But:  Base d'un engine 3d en définnissant les points dans un environement 3d
preprocesseur*/

#ifndef POINT_H_INCLUDED
#define POINT_H_INCLUDED
#define pi 3.14151109

#include <math.h>

/*
classe
*/

class point
{
protected:
    float _x,
           _y,
           _z;
    //pour les surcharges d'operateur
    const point _add(const point &)const;
    const point _sous(const point &)const;
    //operation sur les points
    const point _divS(float scaliare) const;
    const point _somS(float scalaire) const;
public:

    //constructeur
    point();
    point(float X, float Y, float Z);

    //setteur
    void setX(float);
    void setY(float);
    void setZ(float);

    //getteur
    float getX()const;
    float getY()const;
    float getZ()const;

    //rotations
    const point rotX(float angle)const;
    const point rotY(float angle)const;
    const point rotZ(float angle)const;

    //cross-product
    const point cross(const point& p) const;

    //magnitude SQ
    float magSQ()const;

    //methode the deudeeification du point
    const point deuxdee(float,float)const;

    //surcharges d'operateur
    const point operator+(const point& p) const;
    const point operator-(const point& p) const;
    const point operator*(float scaliare) const;
    const point operator/(float scaliare) const;
};


#endif // POINT_H_INCLUDED
