Lexis  1.1.0
Vocabulary of events and shared objects for BBP and HBP software
materialLUT.h
1 // Generated by zerobufCxx.py
2 
3 #pragma once
4 #include <zerobuf/ConstAllocator.h> // static create
5 #include <zerobuf/Vector.h> // member
6 #include <zerobuf/Zerobuf.h> // base class
7 #include <array> // member
8 #include <memory> // std::unique_ptr
9 
10 namespace lexis
11 {
12 namespace render
13 {
14 
15 class Color;
16 typedef std::unique_ptr< const Color > ConstColorPtr;
17 
18 class Color : public ::zerobuf::Zerobuf
19 {
20 public:
21  float getRed() const;
28  void setRed( float value );
29 
30  float getGreen() const;
37  void setGreen( float value );
38 
39  float getBlue() const;
46  void setBlue( float value );
47 
48  Color();
49  Color( const float& redValue, const float& greenValue, const float& blueValue );
50  Color( const Color& rhs );
51  Color( Color&& rhs ) noexcept;
52  Color( const ::zerobuf::Zerobuf& rhs );
53  explicit Color( ::zerobuf::AllocatorPtr allocator );
54  virtual ~Color();
55  Color& operator = ( const Color& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs ); return *this; }
56  Color& operator = ( Color&& rhs );
57 
58  // Introspection
59  std::string getSchema() const final;
60  static std::string ZEROBUF_SCHEMA();
61  std::string getTypeName() const final { return "lexis::render::Color"; }
62  static std::string ZEROBUF_TYPE_NAME() { return "lexis::render::Color"; }
63  ::zerobuf::uint128_t getTypeIdentifier() const final { return ::zerobuf::uint128_t( 0xeac1b06fdceab90bull, 0xacd551bde0515671ull ); }
64  static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0xeac1b06fdceab90bull, 0xacd551bde0515671ull ); }
65  size_t getZerobufStaticSize() const final { return 16; }
66  static size_t ZEROBUF_STATIC_SIZE() { return 16; }
67  size_t getZerobufNumDynamics() const final { return 0; }
68  static size_t ZEROBUF_NUM_DYNAMICS() { return 0; }
69  static ConstColorPtr create( const void* data, const size_t size ) { return ConstColorPtr( new Color( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
70 
71  void _parseJSON( const Json::Value& json ) final;
72  void _createJSON( Json::Value& json ) const final;
73 };
74 
75 class MaterialLUT;
76 typedef std::unique_ptr< const MaterialLUT > ConstMaterialLUTPtr;
77 
78 class MaterialLUT : public ::zerobuf::Zerobuf
79 {
80 public:
81  typedef ::zerobuf::Vector< Color > Diffuse;
88  MaterialLUT::Diffuse& getDiffuse();
89  const MaterialLUT::Diffuse& getDiffuse() const;
90  std::vector< Color > getDiffuseVector() const;
97  void setDiffuse( const std::vector< Color >& value );
98 
99  typedef ::zerobuf::Vector< Color > Emission;
106  MaterialLUT::Emission& getEmission();
107  const MaterialLUT::Emission& getEmission() const;
108  std::vector< Color > getEmissionVector() const;
115  void setEmission( const std::vector< Color >& value );
116 
117  typedef ::zerobuf::Vector< float > Alpha;
124  MaterialLUT::Alpha& getAlpha();
125  const MaterialLUT::Alpha& getAlpha() const;
133  void setAlpha( float const * value, size_t size );
134  std::vector< float > getAlphaVector() const;
141  void setAlpha( const std::vector< float >& value );
142 
143  typedef ::zerobuf::Vector< float > Contribution;
150  MaterialLUT::Contribution& getContribution();
151  const MaterialLUT::Contribution& getContribution() const;
159  void setContribution( float const * value, size_t size );
160  std::vector< float > getContributionVector() const;
167  void setContribution( const std::vector< float >& value );
168 
175  double* getRange();
176  const double* getRange() const;
177  std::vector< double > getRangeVector() const;
184  void setRange( double value[ 2 ] );
191  void setRange( const std::vector< double >& value );
192  size_t getRangeSize() const;
193 
194  void compact( float threshold = 0.1f ) final;
195  MaterialLUT();
196  MaterialLUT( const std::vector< double >& rangeValue, const std::vector< Color >& diffuseValue, const std::vector< Color >& emissionValue, const std::vector< float >& alphaValue, const std::vector< float >& contributionValue );
197  MaterialLUT( const MaterialLUT& rhs );
198  MaterialLUT( MaterialLUT&& rhs ) noexcept;
199  MaterialLUT( const ::zerobuf::Zerobuf& rhs );
200  explicit MaterialLUT( ::zerobuf::AllocatorPtr allocator );
201  virtual ~MaterialLUT();
202  MaterialLUT& operator = ( const MaterialLUT& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs ); return *this; }
203  MaterialLUT& operator = ( MaterialLUT&& rhs );
204 
205  // Introspection
206  std::string getSchema() const final;
207  static std::string ZEROBUF_SCHEMA();
208  std::string getTypeName() const final { return "lexis::render::MaterialLUT"; }
209  static std::string ZEROBUF_TYPE_NAME() { return "lexis::render::MaterialLUT"; }
210  ::zerobuf::uint128_t getTypeIdentifier() const final { return ::zerobuf::uint128_t( 0xc94392f3d81dd79bull, 0x62b65853c6d7f52bull ); }
211  static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0xc94392f3d81dd79bull, 0x62b65853c6d7f52bull ); }
212  size_t getZerobufStaticSize() const final { return 84; }
213  static size_t ZEROBUF_STATIC_SIZE() { return 84; }
214  size_t getZerobufNumDynamics() const final { return 4; }
215  static size_t ZEROBUF_NUM_DYNAMICS() { return 4; }
216  static ConstMaterialLUTPtr create( const void* data, const size_t size ) { return ConstMaterialLUTPtr( new MaterialLUT( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
217 
218  void _parseJSON( const Json::Value& json ) final;
219  void _createJSON( Json::Value& json ) const final;
220 
221 private:
222  Diffuse _diffuse;
223  Emission _emission;
224  Alpha _alpha;
225  Contribution _contribution;
226 };
227 
228 }
229 }
230 namespace zerobuf
231 {
232 }
233 
void setRed(float value)
Set the Red value.
void setGreen(float value)
Set the Green value.
void setBlue(float value)
Set the Blue value.