Main MRPT website > C++ reference for MRPT 1.9.9
CPoseOrPoint_detail.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, 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 #ifndef CPOSEORPOINT_DETAIL_H
10 #define CPOSEORPOINT_DETAIL_H
11 
12 #include <mrpt/poses/poses_frwds.h>
13 
14 namespace mrpt
15 {
16 namespace poses
17 {
18 /** Internal, auxiliary templates for MRPT classes */
19 namespace detail
20 {
21 template <class POSEORPOINT>
22 struct T3DTypeHelper; // generic version. Specialized below.
23 
24 template <>
26 {
27  enum
28  {
29  is_3D_val = 0
30  };
31 };
32 template <>
34 {
35  enum
36  {
37  is_3D_val = 1
38  };
39 };
40 template <>
42 {
43  enum
44  {
45  is_3D_val = 0
46  };
47 };
48 template <>
50 {
51  enum
52  {
53  is_3D_val = 1
54  };
55 };
56 template <>
58 {
59  enum
60  {
61  is_3D_val = 1
62  };
63 };
64 template <>
66 {
67  enum
68  {
69  is_3D_val = 1
70  };
71 };
72 
73 template <class DERIVEDCLASS, int IS3D>
74 struct pose_point_impl; // generic template, specialized below:
75 
76 // Extra members for 3D implementation:
77 template <class DERIVEDCLASS>
78 struct pose_point_impl<DERIVEDCLASS, 1>
79 {
80  inline double z() const /*!< Get Z coord. */
81  {
82  return static_cast<const DERIVEDCLASS*>(this)->m_coords[2];
83  }
84  inline double& z() /*!< Get ref to Z coord. */
85  {
86  return static_cast<DERIVEDCLASS*>(this)->m_coords[2];
87  }
88  inline void z(const double v) /*!< Set Z coord. */
89  {
90  static_cast<DERIVEDCLASS*>(this)->m_coords[2] = v;
91  }
92  inline void z_incr(const double v) /*!< Z+=v */
93  {
94  static_cast<DERIVEDCLASS*>(this)->m_coords[2] += v;
95  }
96 };
97 
98 // Extra members for 2D implementation:
99 template <class DERIVEDCLASS>
100 struct pose_point_impl<DERIVEDCLASS, 0>
101 {
102 };
103 
104 } // End of namespace
105 } // End of namespace
106 } // End of namespace
107 
108 #endif
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::poses::CPose3DQuat
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,...
Definition: CPose3DQuat.h:48
mrpt::poses::CPose3DRotVec
A 3D pose, with a 3D translation and a rotation in 3D parameterized in rotation-vector form (equivale...
Definition: CPose3DRotVec.h:44
v
const GLdouble * v
Definition: glext.h:3678
mrpt::poses::detail::pose_point_impl
Definition: CPoseOrPoint_detail.h:74
mrpt::poses::CPose2D
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
Definition: CPose2D.h:40
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::poses::detail::T3DTypeHelper
Definition: CPoseOrPoint_detail.h:22
mrpt::poses::detail::pose_point_impl< DERIVEDCLASS, 1 >::z
double & z()
Definition: CPoseOrPoint_detail.h:84
poses_frwds.h
mrpt::poses::detail::pose_point_impl< DERIVEDCLASS, 1 >::z
void z(const double v)
Definition: CPoseOrPoint_detail.h:88
mrpt::poses::CPoint2D
A class used to store a 2D point.
Definition: CPoint2D.h:35
mrpt::poses::CPoint3D
A class used to store a 3D point.
Definition: CPoint3D.h:33
mrpt::poses::detail::pose_point_impl< DERIVEDCLASS, 1 >::z
double z() const
Definition: CPoseOrPoint_detail.h:80
mrpt::poses::detail::pose_point_impl< DERIVEDCLASS, 1 >::z_incr
void z_incr(const double v)
Definition: CPoseOrPoint_detail.h:92



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST