21 #ifndef SNARK_GRAPHICS_APPLICATIONS_VIEWPOINTS_POINTWITHID_H_
22 #define SNARK_GRAPHICS_APPLICATIONS_VIEWPOINTS_POINTWITHID_H_
24 #include <comma/base/types.h>
25 #include <snark/visiting/eigen.h>
26 #include <Qt3D/qcolor4ub.h>
27 #include "./ShapeWithId.h"
29 namespace snark {
namespace graphics {
namespace View {
33 PointWithId() : id( 0 ), block( 0 ) {}
34 Eigen::Vector3d point;
35 Eigen::Vector3d orientation;
45 namespace comma {
namespace visiting {
47 template <>
struct traits< snark::graphics::View::PointWithId >
49 template <
typename Key,
class Visitor >
50 static void visit( Key, snark::graphics::View::PointWithId& p, Visitor& v )
52 v.apply(
"point", p.point );
53 v.apply(
"roll", p.orientation.x() );
54 v.apply(
"pitch", p.orientation.y() );
55 v.apply(
"yaw", p.orientation.z() );
56 v.apply(
"id", p.id );
57 v.apply(
"block", p.block );
58 v.apply(
"colour", p.color );
59 v.apply(
"label", p.label );
60 v.apply(
"scalar", p.scalar );
63 template <
typename Key,
class Visitor >
64 static void visit( Key,
const snark::graphics::View::PointWithId& p, Visitor& v )
66 v.apply(
"point", p.point );
67 v.apply(
"roll", p.orientation.x() );
68 v.apply(
"pitch", p.orientation.y() );
69 v.apply(
"yaw", p.orientation.z() );
70 v.apply(
"id", p.id );
71 v.apply(
"block", p.block );
72 v.apply(
"color", p.color );
73 v.apply(
"label", p.label );
74 v.apply(
"scalar", p.scalar );