Helios++
Helios software for LiDAR simulations
Color4f.h
1 #pragma once
2 
3 #include <boost/archive/text_iarchive.hpp>
4 #include <boost/archive/text_oarchive.hpp>
5 #include <boost/serialization/base_object.hpp>
6 
10 class Color4f {
11 private:
12  // *** SERIALIZATION *** //
13  // *********************** //
14  friend class boost::serialization::access;
21  template<class Archive>
22  void serialize(Archive &ar, const unsigned int version) {
23  ar & x & y & z & w;
24  }
25 public:
26  // *** ATTRIBUTES *** //
27  // ******************** //
31  float x = 1;
35  float y = 1;
39  float z = 1;
43  float w = 1;
44 
45  // *** CONSTRUCTION / DESTRUCTION *** //
46  // ************************************ //
50  Color4f() = default;
51 
59  Color4f(float x, float y, float z, float w) {
60  this->x = x;
61  this->y = y;
62  this->z = z;
63  this->w = w;
64  }
65 
66 };
Class representing a color with 4 float components: RGBA.
Definition: Color4f.h:10
float z
Color blue component (B)
Definition: Color4f.h:39
void serialize(Archive &ar, const unsigned int version)
Serialize a Color3f to a stream of bytes.
Definition: Color4f.h:22
float x
Color red component (R)
Definition: Color4f.h:31
float w
Color alpha component (A)
Definition: Color4f.h:43
Color4f(float x, float y, float z, float w)
Color in 4 float components constructor.
Definition: Color4f.h:59
float y
Color green component (G)
Definition: Color4f.h:35
Color4f()=default
Color in 4 float components default constructor.