/* Stockage de composantes rvb              */
/*                                          */
/* Auteur: Nicolas JANEY                    */
/* nicolas.janey@univ-fcomte.fr             */
/* Mars 2014                                */

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

#include "Rvb.h"

/* Constructeurs                            */
Rvb::Rvb(void) {
  r = 0.0;
  v = 0.0;
  b = 0.0;
}

Rvb::Rvb(double r,double v,double b) {
  this->r = r;
  this->v = v;
  this->b = b;
}

Rvb::Rvb(float r,float v,float b) {
  this->r = r;
  this->v = v;
  this->b = b;
}

Rvb::Rvb(double *c) {
  this->r = c[0];
  this->v = c[1];
  this->b = c[2];
}

Rvb::Rvb(float *c) {
  this->r = c[0];
  this->v = c[1];
  this->b = c[2];
}

Rvb::Rvb(Rvb *c) {
  r = c->r;
  v = c->v;
  b = c->b;
}

/* Destructeur                              */
Rvb::~Rvb(void) {
}

/* Methode d'affichage texte                */
void Rvb::print(void) {
  printf("%8.3lf %8.3lf %8.3lf",r,v,b);
}
