Carna  Version 3.3.2
PointMarkerHelper.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 - 2015 Leonid Kostrykin
3  *
4  * Chair of Medical Engineering (mediTEC)
5  * RWTH Aachen University
6  * Pauwelsstr. 20
7  * 52074 Aachen
8  * Germany
9  *
10  */
11 
12 #ifndef POINTMARKERHELPER_H_6014714286
13 #define POINTMARKERHELPER_H_6014714286
14 
15 #include <Carna/Carna.h>
16 #include <Carna/base/noncopyable.h>
17 
22 namespace Carna
23 {
24 
25 namespace helpers
26 {
27 
28 
29 
30 // ----------------------------------------------------------------------------------
31 // PointMarkerHelper
32 // ----------------------------------------------------------------------------------
33 
60 class CARNA_LIB PointMarkerHelper
61 {
62 
64 
65  struct Details;
66  const std::unique_ptr< Details > pimpl;
67 
68 public:
69 
73  const static unsigned int DEFAULT_POINT_SIZE = 6;
74 
78  explicit PointMarkerHelper
79  ( unsigned int geometryType
80  , unsigned int pointSize = DEFAULT_POINT_SIZE );
81 
84  explicit PointMarkerHelper
85  ( unsigned int geometryType
86  , unsigned int meshRole
87  , unsigned int materialRole
88  , unsigned int pointSize = DEFAULT_POINT_SIZE );
89 
94 
95  const unsigned int geometryType;
96  const unsigned int meshRole;
97  const unsigned int materialRole;
98  const unsigned int pointSize;
99 
107  void releaseGeometryFeatures();
108 
116  base::Geometry* createPointMarker() const;
117 
123  base::Geometry* createPointMarker( unsigned int pointSize ) const;
124 
129  base::Geometry* createPointMarker( const base::Color& color ) const;
130 
135  base::Geometry* createPointMarker( const base::Color& color, unsigned int pointSize ) const;
136 
141  static void resetDefaultColor();
142 
143 }; // PointMarkerHelper
144 
145 
146 
147 } // namespace Carna :: helpers
148 
149 } // namespace Carna
150 
151 
152 
153 #endif // POINTMARKERHELPER_H_6014714286
const unsigned int pointSize
Holds the preferred pixel size of the markers.
Simplifies the creation and maintenance of point markers.
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered...
Definition: Geometry.h:59
const unsigned int materialRole
Holds the role used to attach the material to the markers.
Represents a color. Objects from this class are copyable and assignable.
Definition: Color.h:41
const unsigned int geometryType
Holds the markers&#39; geometry type.
const unsigned int meshRole
Holds the role used to attach the mesh to the markers.
#define NON_COPYABLE
Features class it is placed in as non-copyable.
Definition: noncopyable.h:109