Carna Version 3.3.3
Loading...
Searching...
No Matches
GeometryFeature.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 GEOMETRYFEATURE_H_6014714286
13#define GEOMETRYFEATURE_H_6014714286
14
20#include <set>
21
22namespace Carna
23{
24
25namespace base
26{
27
28
29
30// ----------------------------------------------------------------------------------
31// GeometryFeature
32// ----------------------------------------------------------------------------------
33
41class CARNA_LIB GeometryFeature
42{
43
45
46 struct Details;
47 const std::unique_ptr< Details > pimpl;
48
49protected:
50
55
60
61public:
62
66 unsigned int videoResourceAcquisitionsCount() const;
67
71 virtual bool controlsSameVideoResource( const GeometryFeature& other ) const = 0;
72
83 void release();
84
90 void addTo( Geometry& sceneGraphNode, unsigned int role );
91
98
99 // ------------------------------------------------------------------------------
100 // GeometryFeature :: ManagedInterface
101 // ------------------------------------------------------------------------------
102
110 class CARNA_LIB ManagedInterface
111 {
112
114
115 protected:
116
128
129 public:
130
136
142
143 }; // GeometryFeature :: ManagedInterface
144
152
153}; // GeometryFeature
154
155
156
157} // namespace Carna :: base
158
159} // namespace Carna
160
161#endif // GEOMETRYFEATURE_H_6014714286
Represents an association.
Definition Association.h:45
Represents an acquisition of the video resources from a particular GeometryFeature....
virtual ~ManagedInterface()
Releases the video resources previously acquired from the managing geometryFeature.
GeometryFeature & geometryFeature
References the GeometryFeature that manages the video resources that this object interfaces.
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...
unsigned int videoResourceAcquisitionsCount() const
Tells current number of video resource acquisitions.
virtual ManagedInterface * acquireVideoResource()=0
Acquires the video resources from this GeometryFeature by returning new instance of a class derived f...
virtual bool controlsSameVideoResource(const GeometryFeature &other) const =0
Tells whether this instance maintains the same video resources like other.
void removeFrom(Geometry &sceneGraphNode)
Removes this geometry feature from the sceneGraphNode.
void addTo(Geometry &sceneGraphNode, unsigned int role)
Puts this geometry feature on the sceneGraphNode.
virtual ~GeometryFeature()
Deletes and logs an error if video resources are leaked.
GeometryFeature()
Instantiates.
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered....
Definition Geometry.h:60
#define NON_COPYABLE
Features class it is placed in as non-copyable.