Carna Version 3.3.3
Loading...
Searching...
No Matches
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>
17
22namespace Carna
23{
24
25namespace helpers
26{
27
28
29
30// ----------------------------------------------------------------------------------
31// PointMarkerHelper
32// ----------------------------------------------------------------------------------
33
60class CARNA_LIB PointMarkerHelper
61{
62
64
65 struct Details;
66 const std::unique_ptr< Details > pimpl;
67
68public:
69
73 const static unsigned int DEFAULT_POINT_SIZE = 6;
74
79 ( unsigned int geometryType
80 , unsigned int pointSize = DEFAULT_POINT_SIZE );
81
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
108
117
123 base::Geometry* createPointMarker( unsigned int pointSize ) const;
124
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
Represents a color. Objects from this class are copyable and assignable.
Definition Color.h:42
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered....
Definition Geometry.h:60
Simplifies the creation and maintenance of point markers.
base::Geometry * createPointMarker(const base::Color &color) const
Creates new point marker of preferred pixel size with color. This method creates a new material each ...
~PointMarkerHelper()
Releases all previously acquired materials.
const unsigned int pointSize
Holds the preferred pixel size of the markers.
const unsigned int meshRole
Holds the role used to attach the mesh to the markers.
PointMarkerHelper(unsigned int geometryType, unsigned int pointSize=DEFAULT_POINT_SIZE)
Instantiates.
void releaseGeometryFeatures()
Releases all previously acquired materials. Invoke this method when it is sure that no further marker...
base::Geometry * createPointMarker() const
Creates new point marker of preferred pixel size, colored differently than the last point marker crea...
PointMarkerHelper(unsigned int geometryType, unsigned int meshRole, unsigned int materialRole, unsigned int pointSize=DEFAULT_POINT_SIZE)
static void resetDefaultColor()
Resets the color that the next invocation to the argument-less version of createPointMarker uses.
const unsigned int materialRole
Holds the role used to attach the material to the markers.
const unsigned int geometryType
Holds the markers' geometry type.
base::Geometry * createPointMarker(unsigned int pointSize) const
Creates new point marker of pointSize colored differently than the last point marker created by any P...
base::Geometry * createPointMarker(const base::Color &color, unsigned int pointSize) const
Creates new point marker of pointSize with color. This method creates a new material each time it is ...
#define NON_COPYABLE
Features class it is placed in as non-copyable.