MRPT  2.0.4
CRenderizable.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/img/TColor.h>
12 #include <mrpt/math/TPoint3D.h>
13 #include <mrpt/math/math_frwds.h>
16 #include <mrpt/opengl/Shader.h>
19 #include <mrpt/poses/CPose3D.h>
21 #include <deque>
22 
23 namespace mrpt::opengl
24 {
25 // Frwd decls:
26 class COpenGLViewport;
27 class CSetOfObjects;
28 class CText;
29 struct TLightParameters;
30 
31 /** The base class of 3D objects that can be directly rendered through OpenGL.
32  * In this class there are a set of common properties to all 3D objects,
33  *mainly:
34  * - A name (m_name): A name that can be optionally asigned to objects for
35  *easing its reference.
36  * - 6D coordinates (x,y,z,yaw,pitch,roll), relative to the "current"
37  *reference framework. By default, any object is referenced to global scene
38  *coordinates.
39  * - A RGB color: This field will be used in simple elements (points,
40  *lines, text,...) but is ignored in more complex objects that carry their own
41  *color information (triangle sets,...)
42  *
43  * See the main class opengl::COpenGLScene
44  *
45  * \sa opengl::COpenGLScene, mrpt::opengl
46  * \ingroup mrpt_opengl_grp
47  */
49 {
51 
52  friend class mrpt::opengl::COpenGLViewport;
53  friend class mrpt::opengl::CSetOfObjects;
54 
55  protected:
56  std::string m_name;
57  bool m_show_name{false};
58  /** Color components in the range [0,255] */
60  /** 6D pose wrt the parent coordinate reference. This class automatically
61  * holds the cached 3x3 rotation matrix for quick load into opengl stack. */
63  /** Scale components to apply to the object (default=1) */
64  float m_scale_x{1}, m_scale_y{1}, m_scale_z{1};
65  /** Is the object visible? (default=true) */
66  bool m_visible{true};
67 
68  public:
69  /** @name Changes the appearance of the object to render
70  @{ */
71 
72  /** Changes the name of the object */
73  void setName(const std::string& n) { m_name = n; }
74  /** Returns the name of the object */
75  const std::string& getName() const { return m_name; }
76  inline bool isVisible()
77  const /** Is the object visible? \sa setVisibility */
78  {
79  return m_visible;
80  }
81  inline void setVisibility(
82  bool visible =
83  true) /** Set object visibility (default=true) \sa isVisible */
84  {
85  m_visible = visible;
86  }
87 
88  /** Enables or disables showing the name of the object as a label when
89  * rendering */
90  inline void enableShowName(bool showName = true) { m_show_name = showName; }
91  /** \sa enableShowName */
92  inline bool isShowNameEnabled() const { return m_show_name; }
93  /** Set the 3D pose from a mrpt::poses::CPose3D object (return a ref to
94  * this) */
96  /** Set the 3D pose from a mrpt::poses::CPose3D object (return a ref to
97  * this) */
99  /** Set the 3D pose from a mrpt::math::TPose3D object (return a ref to
100  * this) */
102  /** Set the 3D pose from a mrpt::math::TPose3D object (return a ref to
103  * this) */
105  /** Set the 3D pose from a mrpt::poses::CPose3D object (return a ref to
106  * this) */
108  /** Set the 3D pose from a mrpt::poses::CPose3D object (return a ref to
109  * this) */
111 
112  /** Returns the 3D pose of the object as TPose3D */
114 
115  /** Returns a const ref to the 3D pose of the object as mrpt::poses::CPose3D
116  * (which explicitly contains the 3x3 rotation matrix) */
117  inline const mrpt::poses::CPose3D& getPoseRef() const { return m_pose; }
118 
119  /** Changes the location of the object, keeping untouched the orientation
120  * \return a ref to this */
121  inline CRenderizable& setLocation(double x, double y, double z)
122  {
123  m_pose.x(x);
124  m_pose.y(y);
125  m_pose.z(z);
126  return *this;
127  }
128 
129  /** Changes the location of the object, keeping untouched the orientation
130  * \return a ref to this */
132  {
133  m_pose.x(p.x);
134  m_pose.y(p.y);
135  m_pose.z(p.z);
136  return *this;
137  }
138 
139  /** Translation relative to parent coordinate origin. */
140  inline double getPoseX() const { return m_pose.x(); }
141  /** Translation relative to parent coordinate origin. */
142  inline double getPoseY() const { return m_pose.y(); }
143  /** Translation relative to parent coordinate origin. */
144  inline double getPoseZ() const { return m_pose.z(); }
145  /** Rotation relative to parent coordinate origin, in **DEGREES**. */
146  inline double getPoseYaw() const { return mrpt::RAD2DEG(m_pose.yaw()); }
147  /** Rotation relative to parent coordinate origin, in **DEGREES**. */
148  inline double getPosePitch() const { return mrpt::RAD2DEG(m_pose.pitch()); }
149  /** Rotation relative to parent coordinate origin, in **DEGREES**. */
150  inline double getPoseRoll() const { return mrpt::RAD2DEG(m_pose.roll()); }
151  /** Rotation relative to parent coordinate origin, in radians. */
152  inline double getPoseYawRad() const { return m_pose.yaw(); }
153  /** Rotation relative to parent coordinate origin, in radians. */
154  inline double getPosePitchRad() const { return m_pose.pitch(); }
155  /** Rotation relative to parent coordinate origin, in radians. */
156  inline double getPoseRollRad() const { return m_pose.roll(); }
157  /** Color components in the range [0,1] */
158  inline float getColorR() const { return u8tof(m_color.R); }
159  /** Color components in the range [0,1] */
160  inline float getColorG() const { return u8tof(m_color.G); }
161  /** Color components in the range [0,1] */
162  inline float getColorB() const { return u8tof(m_color.B); }
163  /** Color components in the range [0,1] */
164  inline float getColorA() const { return u8tof(m_color.A); }
165  /** Color components in the range [0,255] */
166  inline uint8_t getColorR_u8() const { return m_color.R; }
167  /** Color components in the range [0,255] */
168  inline uint8_t getColorG_u8() const { return m_color.G; }
169  /** Color components in the range [0,255] */
170  inline uint8_t getColorB_u8() const { return m_color.B; }
171  /** Color components in the range [0,255] */
172  inline uint8_t getColorA_u8() const { return m_color.A; }
173  /**Color components in the range [0,1] \return a ref to this */
174  CRenderizable& setColorR(const float r) { return setColorR_u8(f2u8(r)); }
175  /**Color components in the range [0,1] \return a ref to this */
176  CRenderizable& setColorG(const float g) { return setColorG_u8(f2u8(g)); }
177  /**Color components in the range [0,1] \return a ref to this */
178  CRenderizable& setColorB(const float b) { return setColorB_u8(f2u8(b)); }
179  /**Color components in the range [0,1] \return a ref to this */
180  CRenderizable& setColorA(const float a) { return setColorA_u8(f2u8(a)); }
181  /**Color components in the range [0,255] \return a ref to this */
182  virtual CRenderizable& setColorR_u8(const uint8_t r)
183  {
184  m_color.R = r;
185  return *this;
186  }
187  /**Color components in the range [0,255] \return a ref to this */
188  virtual CRenderizable& setColorG_u8(const uint8_t g)
189  {
190  m_color.G = g;
191  return *this;
192  }
193  /**Color components in the range [0,255] \return a ref to this */
194  virtual CRenderizable& setColorB_u8(const uint8_t b)
195  {
196  m_color.B = b;
197  return *this;
198  }
199  /**Color components in the range [0,255] \return a ref to this */
200  virtual CRenderizable& setColorA_u8(const uint8_t a)
201  {
202  m_color.A = a;
203  return *this;
204  }
205 
206  /** Scale to apply to the object, in all three axes (default=1) \return a
207  * ref to this */
208  inline CRenderizable& setScale(float s)
209  {
210  m_scale_x = m_scale_y = m_scale_z = s;
211  return *this;
212  }
213  /** Scale to apply to the object in each axis (default=1) \return a ref to
214  * this */
215  inline CRenderizable& setScale(float sx, float sy, float sz)
216  {
217  m_scale_x = sx;
218  m_scale_y = sy;
219  m_scale_z = sz;
220  return *this;
221  }
222  /** Get the current scaling factor in one axis */
223  inline float getScaleX() const { return m_scale_x; }
224  /** Get the current scaling factor in one axis */
225  inline float getScaleY() const { return m_scale_y; }
226  /** Get the current scaling factor in one axis */
227  inline float getScaleZ() const { return m_scale_z; }
228  /** Returns the object color property as a TColorf */
230  {
231  return mrpt::img::TColorf(m_color);
232  }
233  /** Changes the default object color \return a ref to this */
235  {
236  return setColor_u8(
237  mrpt::img::TColor(f2u8(c.R), f2u8(c.G), f2u8(c.B), f2u8(c.A)));
238  }
239 
240  /** Set the color components of this object (R,G,B,Alpha, in the range 0-1)
241  * \return a ref to this */
242  inline CRenderizable& setColor(float R, float G, float B, float A = 1)
243  {
244  return setColor_u8(f2u8(R), f2u8(G), f2u8(B), f2u8(A));
245  }
246 
247  /** Returns the object color property as a TColor */
248  inline const mrpt::img::TColor& getColor_u8() const { return m_color; }
249  /*** Changes the default object color \return a ref to this */
250  virtual CRenderizable& setColor_u8(const mrpt::img::TColor& c);
251 
252  /** Set the color components of this object (R,G,B,Alpha, in the range
253  * 0-255) \return a ref to this */
254  CRenderizable& setColor_u8(uint8_t R, uint8_t G, uint8_t B, uint8_t A = 255)
255  {
256  return setColor_u8(mrpt::img::TColor(R, G, B, A));
257  }
258 
259  /** @} */
260 
261  /** Default constructor: */
262  CRenderizable();
263  ~CRenderizable() override;
264 
265  /** Context for calls to render() */
267  {
268  RenderContext() = default;
269 
271  const mrpt::opengl::Program* shader = nullptr;
274  };
275 
276  /** Implements the rendering of 3D objects in each class derived from
277  * CRenderizable. This can be called more than once (one per required shader
278  * program) if the object registered several shaders. \sa
279  * renderUpdateBuffers
280  */
281  virtual void render(const RenderContext& rc) const = 0;
282 
283  /** Process all children objects recursively, if the object is a container
284  */
286  [[maybe_unused]] const mrpt::opengl::TRenderMatrices& state,
287  [[maybe_unused]] RenderQueue& rq) const
288  {
289  // do thing
290  }
291 
292  /** Called whenever m_outdatedBuffers is true: used to re-generate
293  * OpenGL vertex buffers, etc. before they are sent for rendering in
294  * render() */
295  virtual void renderUpdateBuffers() const = 0;
296 
297  /** Returns the ID of the OpenGL shader program required to render this
298  * class. \sa DefaultShaderID
299  */
301  {
302  THROW_EXCEPTION("Not implemented in derived class!");
303  }
304 
305  /** Calls renderUpdateBuffers() and clear the flag that is set with
306  * notifyChange() */
307  void updateBuffers() const
308  {
310  const_cast<CRenderizable&>(*this).m_outdatedBuffers = false;
311  }
312 
313  /** Call to enable calling renderUpdateBuffers() before the next
314  * render() rendering iteration. */
315  void notifyChange() const
316  {
317  const_cast<CRenderizable&>(*this).m_outdatedBuffers = true;
318  }
319 
320  /** Returns whether notifyChange() has been invoked since the last call
321  * to renderUpdateBuffers(), meaning the latter needs to be called again
322  * before rendering.
323  */
324  bool hasToUpdateBuffers() const { return m_outdatedBuffers; }
325 
326  /** Simulation of ray-trace, given a pose. Returns true if the ray
327  * effectively collisions with the object (returning the distance to the
328  * origin of the ray in "dist"), or false in other case. "dist" variable
329  * yields undefined behaviour when false is returned
330  */
331  virtual bool traceRay(const mrpt::poses::CPose3D& o, double& dist) const;
332 
333  /** Evaluates the bounding box of this object (including possible
334  * children) in the coordinate frame of the object parent. */
335  virtual void getBoundingBox(
337 
338  /** Provide a representative point (in object local coordinates), used to
339  * sort objects by eye-distance while rendering with transparencies
340  * (Default=[0,0,0]) */
342  {
343  return m_representativePoint;
344  }
345 
346  /** See getLocalRepresentativePoint() */
348  {
350  }
351 
352  /** Returns or constructs (in its first invokation) the associated
353  * mrpt::opengl::CText object representing the label of the object.
354  * \sa enableShowName()
355  */
357 
358  /** Free opengl buffers */
359  virtual void freeOpenGLResources() = 0;
360 
361  /** Initializes all textures (loads them into opengl memory). */
362  virtual void initializeTextures() const {}
363 
364  protected:
367 
368  bool m_outdatedBuffers = true;
370 
371  /** Optional pointer to a mrpt::opengl::CText */
373 };
374 
375 /** A list of smart pointers to renderizable objects */
376 using CListOpenGLObjects = std::deque<CRenderizable::Ptr>;
377 
378 /** @name Miscellaneous rendering methods
379 @{ */
380 
381 /** Processes, recursively, all objects in the list, classifying them by shader
382  * programs into a list suitable to be used within processPendingRendering()
383  *
384  * For each object in the list:
385  * - checks visibility of each object
386  * - update the MODELVIEW matrix according to its coordinates
387  * - call its ::render()
388  * - shows its name (if enabled).
389  *
390  * \note Used by CSetOfObjects and COpenGLViewport
391  *
392  * \sa processPendingRendering
393  */
394 void enqueForRendering(
396  const mrpt::opengl::TRenderMatrices& state, RenderQueue& rq);
397 
398 /** After enqueForRendering(), actually executes the rendering tasks, grouped
399  * shader by shader.
400  *
401  * \note Used by COpenGLViewport
402  */
403 void processRenderQueue(
404  const RenderQueue& rq,
405  std::map<shader_id_t, mrpt::opengl::Program::Ptr>& shaders,
406  const mrpt::opengl::TLightParameters& lights);
407 
408 /** @} */
409 
410 } // namespace mrpt::opengl
virtual void renderUpdateBuffers() const =0
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers, etc.
A 2D text (bitmap rendering): it always "faces the observer" despite it&#39;s at some 3D location...
Definition: CText.h:35
void setName(const std::string &n)
Changes the name of the object.
Definition: CRenderizable.h:73
const mrpt::opengl::Program * shader
float getColorA() const
Color components in the range [0,1].
double getPosePitch() const
Rotation relative to parent coordinate origin, in DEGREES.
virtual void render(const RenderContext &rc) const =0
Implements the rendering of 3D objects in each class derived from CRenderizable.
const mrpt::opengl::TRenderMatrices * state
float getScaleX() const
Get the current scaling factor in one axis.
virtual void initializeTextures() const
Initializes all textures (loads them into opengl memory).
A set of object, which are referenced to the coordinates framework established in this object...
Definition: CSetOfObjects.h:26
#define THROW_EXCEPTION(msg)
Definition: exceptions.h:67
virtual CRenderizable & setColorA_u8(const uint8_t a)
Color components in the range [0,255].
bool hasToUpdateBuffers() const
Returns whether notifyChange() has been invoked since the last call to renderUpdateBuffers(), meaning the latter needs to be called again before rendering.
CRenderizable & setLocation(const mrpt::math::TPoint3D &p)
Changes the location of the object, keeping untouched the orientation.
const double G
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
std::deque< CRenderizable::Ptr > CListOpenGLObjects
A list of smart pointers to renderizable objects.
CRenderizable & setColorB(const float b)
Color components in the range [0,1].
virtual bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const
Simulation of ray-trace, given a pose.
double getPosePitchRad() const
Rotation relative to parent coordinate origin, in radians.
CRenderizable & setColorR(const float r)
Color components in the range [0,1].
void processRenderQueue(const RenderQueue &rq, std::map< shader_id_t, mrpt::opengl::Program::Ptr > &shaders, const mrpt::opengl::TLightParameters &lights)
After enqueForRendering(), actually executes the rendering tasks, grouped shader by shader...
uint8_t getColorR_u8() const
Color components in the range [0,255].
The base class of 3D objects that can be directly rendered through OpenGL.
Definition: CRenderizable.h:48
const mrpt::opengl::TLightParameters * lights
virtual void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const =0
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
double pitch() const
Get the PITCH angle (in radians)
Definition: CPose3D.h:552
CRenderizable & setLocation(double x, double y, double z)
Changes the location of the object, keeping untouched the orientation.
float getColorB() const
Color components in the range [0,1].
double yaw() const
Get the YAW angle (in radians)
Definition: CPose3D.h:546
double getPoseX() const
Translation relative to parent coordinate origin.
virtual CRenderizable & setColorR_u8(const uint8_t r)
Color components in the range [0,255].
virtual void enqueForRenderRecursive([[maybe_unused]] const mrpt::opengl::TRenderMatrices &state, [[maybe_unused]] RenderQueue &rq) const
Process all children objects recursively, if the object is a container.
void enableShowName(bool showName=true)
Enables or disables showing the name of the object as a label when rendering.
Definition: CRenderizable.h:90
STL namespace.
uint8_t B
Definition: TColor.h:51
uint8_t G
Definition: TColor.h:51
mrpt::opengl::CText & labelObject() const
Returns or constructs (in its first invokation) the associated mrpt::opengl::CText object representin...
double getPoseZ() const
Translation relative to parent coordinate origin.
uint8_t getColorA_u8() const
Color components in the range [0,255].
double getPoseRoll() const
Rotation relative to parent coordinate origin, in DEGREES.
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference.
Definition: CRenderizable.h:62
A viewport within a COpenGLScene, containing a set of OpenGL objects to render.
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
Definition: Shader.h:26
std::shared_ptr< mrpt::opengl::CText > m_label_obj
Optional pointer to a mrpt::opengl::CText.
Context for calls to render()
const mrpt::img::TColor & getColor_u8() const
Returns the object color property as a TColor.
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
CRenderizable & setColor(const mrpt::img::TColorf &c)
Changes the default object color.
float m_scale_x
Scale components to apply to the object (default=1)
Definition: CRenderizable.h:64
virtual mrpt::math::TPoint3Df getLocalRepresentativePoint() const
Provide a representative point (in object local coordinates), used to sort objects by eye-distance wh...
virtual CRenderizable & setColorB_u8(const uint8_t b)
Color components in the range [0,255].
virtual CRenderizable & setColor_u8(const mrpt::img::TColor &c)
void writeToStreamRender(mrpt::serialization::CArchive &out) const
uint8_t getColorG_u8() const
Color components in the range [0,255].
void enqueForRendering(const mrpt::opengl::CListOpenGLObjects &objs, const mrpt::opengl::TRenderMatrices &state, RenderQueue &rq)
Processes, recursively, all objects in the list, classifying them by shader programs into a list suit...
Definition: RenderQueue.cpp:28
CRenderizable & setColor_u8(uint8_t R, uint8_t G, uint8_t B, uint8_t A=255)
Set the color components of this object (R,G,B,Alpha, in the range 0-255)
virtual CRenderizable & setColorG_u8(const uint8_t g)
Color components in the range [0,255].
bool isVisible() const
Is the object visible?
Definition: CRenderizable.h:76
uint8_t shader_id_t
Type for IDs of shaders.
Definition: Shader.h:23
CRenderizable & setColorG(const float g)
Color components in the range [0,1].
CRenderizable & setColorA(const float a)
Color components in the range [0,1].
CRenderizable & setScale(float sx, float sy, float sz)
Scale to apply to the object in each axis (default=1)
const std::string & getName() const
Returns the name of the object.
Definition: CRenderizable.h:75
void setLocalRepresentativePoint(const mrpt::math::TPoint3Df &p)
See getLocalRepresentativePoint()
virtual void freeOpenGLResources()=0
Free opengl buffers.
double x() const
Common members of all points & poses classes.
Definition: CPoseOrPoint.h:143
CRenderizable & setScale(float s)
Scale to apply to the object, in all three axes (default=1)
Rendering state related to the projection and model-view matrices.
A class used to store a 2D point.
Definition: CPoint2D.h:32
A class used to store a 3D point.
Definition: CPoint3D.h:31
double roll() const
Get the ROLL angle (in radians)
Definition: CPose3D.h:558
uint8_t R
Definition: TColor.h:51
double getPoseYawRad() const
Rotation relative to parent coordinate origin, in radians.
float getColorR() const
Color components in the range [0,1].
mrpt::img::TColor m_color
Color components in the range [0,255].
Definition: CRenderizable.h:59
double getPoseY() const
Translation relative to parent coordinate origin.
virtual shader_list_t requiredShaders() const
Returns the ID of the OpenGL shader program required to render this class.
T x
X,Y,Z coordinates.
Definition: TPoint3D.h:29
uint8_t f2u8(const float f)
converts a float [0,1] into an uint8_t [0,255] (without checking for out of bounds) ...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:54
void setVisibility(bool visible=true)
Set object visibility (default=true)
Definition: CRenderizable.h:81
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
Definition: CPose2D.h:39
const float R
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
mrpt::vision::TStereoCalibResults out
double getPoseYaw() const
Rotation relative to parent coordinate origin, in DEGREES.
constexpr double RAD2DEG(const double x)
Radians to degrees.
mrpt::img::TColorf getColor() const
Returns the object color property as a TColorf.
An RGBA color - floats in the range [0,1].
Definition: TColor.h:88
float u8tof(const uint8_t v)
converts a uint8_t [0,255] into a float [0,1]
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
Definition: TPose3D.h:24
Lightweight 2D pose.
Definition: TPose2D.h:22
The namespace for 3D scene representation and rendering.
Definition: CGlCanvasBase.h:13
const auto bb_max
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:30
mrpt::math::TPoint3Df m_representativePoint
CRenderizable & setPose(const mrpt::poses::CPose3D &o)
Set the 3D pose from a mrpt::poses::CPose3D object (return a ref to this)
double getPoseRollRad() const
Rotation relative to parent coordinate origin, in radians.
const mrpt::poses::CPose3D & getPoseRef() const
Returns a const ref to the 3D pose of the object as mrpt::poses::CPose3D (which explicitly contains t...
float getScaleY() const
Get the current scaling factor in one axis.
void readFromStreamRender(mrpt::serialization::CArchive &in)
const auto bb_min
A resource handling helper for OpenGL Shader "programs".
Definition: Shader.h:77
A RGB color - 8bit.
Definition: TColor.h:25
uint8_t getColorB_u8() const
Color components in the range [0,255].
bool m_visible
Is the object visible? (default=true)
Definition: CRenderizable.h:66
float getColorG() const
Color components in the range [0,1].
CRenderizable()
Default constructor:
void updateBuffers() const
Calls renderUpdateBuffers() and clear the flag that is set with notifyChange()
mrpt::math::TPose3D getPose() const
Returns the 3D pose of the object as TPose3D.
Lighting parameters, mostly for triangle shaders.
float getScaleZ() const
Get the current scaling factor in one axis.
uint8_t A
Definition: TColor.h:51
std::map< shader_id_t, std::multimap< float, RenderQueueElement > > RenderQueue
A queue for rendering, sorted by shader program to minimize changes of OpenGL shader programs while r...
Definition: RenderQueue.h:46
CRenderizable & setColor(float R, float G, float B, float A=1)
Set the color components of this object (R,G,B,Alpha, in the range 0-1)



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 7b5ddf9de Fri May 29 14:02:56 2020 +0200 at vie may 29 14:15:09 CEST 2020