/*
    autheur: Thibault Podevin
    titre:   class point 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;

    //methode qui serve presque a rien
//    void print(ostream& out)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;
//    friend ostream& operator << (ostream& out, const point& p);
//    friend istream& operator >> (istream& in, point& p);

};


#endif // POINT_H_INCLUDED
