MRPT  2.0.4
TLightParameters.cpp
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 
10 #include "opengl-precomp.h" // Precompiled header
11 
14 
15 using namespace mrpt;
16 using namespace mrpt::opengl;
17 using namespace std;
18 
20 {
21  const uint8_t version = 0;
22  out << version;
23 
24  out << diffuse << ambient << specular << direction;
25 }
26 
28 {
29  uint8_t version;
30  in >> version;
31 
32  switch (version)
33  {
34  case 0:
35  in >> diffuse >> ambient >> specular >> direction;
36  break;
37  default:
39  };
40 }
41 
42 namespace mrpt::opengl
43 {
46 {
47  o.readFromStream(in);
48  return in;
49 }
52 {
53  o.writeToStream(out);
54  return out;
55 }
56 } // 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
STL namespace.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
Definition: exceptions.h:97
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
mrpt::vision::TStereoCalibResults out
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.4 Git: 5711e29ae Wed May 27 14:29:47 2020 +0200 at miƩ may 27 14:30:10 CEST 2020