Main MRPT website > C++ reference for MRPT 1.5.9
CEllipsoidRangeBearing2D.cpp
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #include "opengl-precomp.h" // Precompiled header
11 
13 #include <mrpt/utils/CStream.h>
14 
15 using namespace mrpt;
16 using namespace mrpt::opengl;
17 using namespace mrpt::utils;
18 using namespace mrpt::math;
19 using namespace std;
20 
22 
23 /*---------------------------------------------------------------
24  transformFromParameterSpace
25  ---------------------------------------------------------------*/
26  void CEllipsoidRangeBearing2D::transformFromParameterSpace(
27  const std::vector<BASE::array_parameter_t> &in_pts,
28  std::vector<BASE::array_point_t> & out_pts) const
29 {
31 
32  // (range,bearing) --> (x,y)
33  const size_t N = in_pts.size();
34  out_pts.resize(N);
35  for (size_t i=0;i<N;i++)
36  {
37  const double range = in_pts[i][0];
38  const double bearing = in_pts[i][1];
39  out_pts[i][0] = range * cos(bearing);
40  out_pts[i][1] = range * sin(bearing);
41  }
42 
43  MRPT_END
44 }
45 
46 
47 /*---------------------------------------------------------------
48  Implements the writing to a CStream capability of
49  CSerializable objects
50  ---------------------------------------------------------------*/
52 {
53  if (version)
54  *version = 0;
55  else
56  {
57  writeToStreamRender(out);
58  BASE::thisclass_writeToStream(out);
59  }
60 }
61 
62 /*---------------------------------------------------------------
63  Implements the reading from a CStream capability of
64  CSerializable objects
65  ---------------------------------------------------------------*/
67 {
68  switch(version)
69  {
70  case 0:
71  {
72  readFromStreamRender(in);
73  BASE::thisclass_readFromStream(in);
74  } break;
75  default:
77  };
79 }
GLsizei range
Definition: glext.h:5281
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Definition: zip.h:16
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
STL namespace.
IMPLEMENTS_SERIALIZABLE(CLogFileRecord_FullEval, CHolonomicLogFileRecord, mrpt::nav) IMPLEMENTS_SERIALIZABLE(CHolonomicFullEval
A renderizable object suitable for rendering with OpenGL&#39;s display lists.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
A numeric matrix of compile-time fixed size.
This base provides a set of functions for maths stuff.
Definition: CArrayNumeric.h:19
#define MRPT_END
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
int version
Definition: mrpt_jpeglib.h:898
#define MRPT_START
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLuint in
Definition: glext.h:6301
The namespace for 3D scene representation and rendering.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
An especial "ellipsoid" in 2D computed as the uncertainty iso-surfaces of a (range,bearing) variable.



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020