MRPT  2.0.0
TLightParameters.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>
15 
16 namespace mrpt::opengl
17 {
18 /** Lighting parameters, mostly for triangle shaders.
19  * Refer to standard OpenGL literature and tutorials for the meaning of each
20  * field, and to the shader GLSL code itself.
21  */
23 {
24  TLightParameters() = default;
25  ~TLightParameters() = default;
26 
27  mrpt::img::TColorf diffuse = {0.8f, 0.8f, 0.8f, 0.0f};
28  mrpt::img::TColorf ambient = {0.2f, 0.2f, 0.2f, 1.0f};
29  mrpt::img::TColorf specular = {1.0f, 1.0f, 1.0f, 1.0f};
30 
31  /** Light direction (must be normalized) */
32  mrpt::math::TVector3Df direction = {-0.40825f, -0.40825f, -0.81650f};
33 
36 
38 };
39 
45 
46 } // namespace mrpt::opengl
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CPolyhedron::TPolyhedronEdge &o)
Reads a polyhedron edge from a binary stream.
void readFromStream(mrpt::serialization::CArchive &in)
COpenGLScene::Ptr & operator<<(COpenGLScene::Ptr &s, const CRenderizable::Ptr &r)
Inserts an openGL object into a scene.
Definition: COpenGLScene.h:252
#define DECLARE_TTYPENAME_CLASSNAME(_CLASSNAME)
Like DECLARE_CUSTOM_TTYPENAME(), but for use within the class declaration body.
Definition: TTypeName.h:104
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:54
mrpt::vision::TStereoCalibResults out
mrpt::math::TVector3Df direction
Light direction (must be normalized)
An RGBA color - floats in the range [0,1].
Definition: TColor.h:88
The namespace for 3D scene representation and rendering.
Definition: CGlCanvasBase.h:13
Lighting parameters, mostly for triangle shaders.
void writeToStream(mrpt::serialization::CArchive &out) const



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020