LibCarna Version 3.4.0
Loading...
Searching...
No Matches
PointMarkerHelper.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef POINTMARKERHELPER_H_6014714286
16#define POINTMARKERHELPER_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
20
26namespace LibCarna
27{
28
29namespace helpers
30{
31
32
33
34// ----------------------------------------------------------------------------------
35// PointMarkerHelper
36// ----------------------------------------------------------------------------------
37
63class LIBCARNA PointMarkerHelper
64{
65
67
68 struct Details;
69 const std::unique_ptr< Details > pimpl;
70
71public:
72
76 const static unsigned int DEFAULT_POINT_SIZE = 6;
77
82 ( unsigned int geometryType
83 , unsigned int pointSize = DEFAULT_POINT_SIZE );
84
88 ( unsigned int geometryType
89 , unsigned int meshRole
90 , unsigned int materialRole
91 , unsigned int pointSize = DEFAULT_POINT_SIZE );
92
97
98 const unsigned int geometryType;
99 const unsigned int meshRole;
100 const unsigned int materialRole;
101 const unsigned int pointSize;
102
111
120
126 base::Geometry* createPointMarker( unsigned int pointSize ) const;
127
133
138 base::Geometry* createPointMarker( const base::Color& color, unsigned int pointSize ) const;
139
144 static void resetDefaultColor();
145
146}; // PointMarkerHelper
147
148
149
150} // namespace LibCarna :: helpers
151
152} // namespace LibCarna
153
154
155
156#endif // POINTMARKERHELPER_H_6014714286
Contains forward-declarations.
Represents a color. Objects from this class are copyable and assignable.
Definition Color.hpp:45
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered....
Definition Geometry.hpp:63
Simplifies the creation and maintenance of point markers.
~PointMarkerHelper()
Releases all previously acquired materials.
const unsigned int geometryType
Holds the markers' geometry type.
const unsigned int meshRole
Holds the role used to attach the mesh to the markers.
static void resetDefaultColor()
Resets the color that the next invocation to the argument-less version of createPointMarker uses.
const unsigned int pointSize
Holds the preferred pixel size of the markers.
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)
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 ...
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(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...
const unsigned int materialRole
Holds the role used to attach the material to the markers.
Defines LibCarna::base::noncopyable and NON_COPYABLE.
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.