Carna  Version 3.0.1
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 
19 #include <Carna/base/noncopyable.h>
20 #include <set>
21 
22 namespace Carna
23 {
24 
25 namespace base
26 {
27 
28 
29 
30 // ----------------------------------------------------------------------------------
31 // GeometryFeature
32 // ----------------------------------------------------------------------------------
33 
41 class CARNA_LIB GeometryFeature
42 {
43 
45 
46  struct Details;
47  const std::unique_ptr< Details > pimpl;
48 
49 protected:
50 
55 
59  virtual ~GeometryFeature();
60 
61 public:
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 
97  void removeFrom( Geometry& sceneGraphNode );
98 
99  // ------------------------------------------------------------------------------
100  // GeometryFeature :: ManagedInterface
101  // ------------------------------------------------------------------------------
102 
110  class CARNA_LIB ManagedInterface
111  {
112 
114 
115  protected:
116 
127  explicit ManagedInterface( GeometryFeature& gf );
128 
129  public:
130 
135  virtual ~ManagedInterface();
136 
142 
143  }; // GeometryFeature :: ManagedInterface
144 
151  virtual ManagedInterface* acquireVideoResource() = 0;
152 
153 }; // GeometryFeature
154 
155 
156 
157 } // namespace Carna :: base
158 
159 } // namespace Carna
160 
161 #endif // GEOMETRYFEATURE_H_6014714286
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered...
Definition: Geometry.h:59
Represents "components" that are aggregated by Geometry objects. Closer description is given here...
Represents an acquisition of the video resources from a particular GeometryFeature. This acquisition realizes the RAII idiom.
GeometryFeature & geometryFeature
References the GeometryFeature that manages the video resources that this object interfaces.
#define NON_COPYABLE
Features class it is placed in as non-copyable.
Definition: noncopyable.h:109