LibCarna Version 3.4.0
Loading...
Searching...
No Matches
GeometryFeature.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 GEOMETRYFEATURE_H_6014714286
16#define GEOMETRYFEATURE_H_6014714286
17
24#include <set>
25
26namespace LibCarna
27{
28
29namespace base
30{
31
32
33
34// ----------------------------------------------------------------------------------
35// GeometryFeature
36// ----------------------------------------------------------------------------------
37
44class LIBCARNA GeometryFeature
45{
46
48
49 struct Details;
50 const std::unique_ptr< Details > pimpl;
51
52protected:
53
58
63
64public:
65
69 unsigned int videoResourceAcquisitionsCount() const;
70
74 virtual bool controlsSameVideoResource( const GeometryFeature& other ) const = 0;
75
86 void release();
87
93 void addTo( Geometry& sceneGraphNode, unsigned int role );
94
101
102 // ------------------------------------------------------------------------------
103 // GeometryFeature :: ManagedInterface
104 // ------------------------------------------------------------------------------
105
112 class LIBCARNA ManagedInterface
113 {
114
116
117 protected:
118
130
131 public:
132
138
143 GeometryFeature& geometryFeature;
144
145 }; // GeometryFeature :: ManagedInterface
146
153 virtual ManagedInterface* acquireVideoResource() = 0;
154
155}; // GeometryFeature
156
157
158
159} // namespace LibCarna :: base
160
161} // namespace LibCarna
162
163#endif // GEOMETRYFEATURE_H_6014714286
Represents an association.
Represents an acquisition of the video resources from a particular GeometryFeature....
virtual ~ManagedInterface() noexcept(false)
Releases the video resources previously acquired from the managing geometryFeature.
ManagedInterface(GeometryFeature &gf)
Acquires the video resources from gf.
Represents "components" that are aggregated by Geometry objects. Closer description is given here.
void release()
Denotes that this object is no longer required and may be deleted as soon as it is valid to delete it...
void removeFrom(Geometry &sceneGraphNode)
Removes this geometry feature from the sceneGraphNode.
virtual ~GeometryFeature()
Deletes and logs an error if video resources are leaked.
virtual bool controlsSameVideoResource(const GeometryFeature &other) const =0
Tells whether this instance maintains the same video resources like other.
void addTo(Geometry &sceneGraphNode, unsigned int role)
Puts this geometry feature on the sceneGraphNode.
unsigned int videoResourceAcquisitionsCount() const
Tells current number of video resource acquisitions.
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered....
Definition Geometry.hpp:63
Defines LibCarna::base::noncopyable and NON_COPYABLE.
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.