/* Mathematiques de l'informatique graphique    */
/* Coordonnees homogenes en 3D                  */
/*                                              */
/* Auteur: Nicolas JANEY                        */
/* nicolas.janey@univ-fcomte.fr                 */
/* Mars 2019                                    */

#include <stdlib.h>
#include <stdio.h>
#include <math.h>

#include "CH3D.h"

/* Constructeurs                                */

CH3D::CH3D(void) {
  x = y = z = 0.0;
  w = 1.0;
}

CH3D::CH3D(double x,double y,double z,double w) {
  this->x = x;
  this->y = y;
  this->z = z;
  this->w = w;
}

CH3D::CH3D(CH3D *ch) {
  x = ch->x;
  y = ch->y;
  z = ch->z;
  w = ch->w;
}

/* Destructeur                                  */

CH3D::~CH3D(void) {
}

/* Methode d'affichage texte                    */

void CH3D::print(void) {
  printf("%10.4lf %10.4lf %10.4lf %10.4lf",x,y,z,w);
}
