Carna Version 3.3.3
Loading...
Searching...
No Matches
Geometry.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 GEOMETRY_H_6014714286
13#define GEOMETRY_H_6014714286
14
15#include <Carna/Carna.h>
16#include <Carna/base/Spatial.h>
17#include <memory>
18
23namespace Carna
24{
25
26namespace base
27{
28
29
30
31// ----------------------------------------------------------------------------------
32// Geometry
33// ----------------------------------------------------------------------------------
34
59class CARNA_LIB Geometry : public Spatial
60{
61
62 struct Details;
63 const std::unique_ptr< Details > pimpl;
64
65public:
66
70 const unsigned int geometryType;
71
80 explicit Geometry( unsigned int geometryType, const std::string& tag = "" );
81
85 virtual ~Geometry();
86
102 void putFeature( unsigned int role, GeometryFeature& feature );
103
113
121 void removeFeature( unsigned int role );
122
130
135 bool hasFeature( const GeometryFeature& feature ) const;
136
141 bool hasFeature( unsigned int role ) const;
142
149 GeometryFeature& feature( unsigned int role ) const;
150
154 std::size_t featuresCount() const;
155
160 void visitFeatures( const std::function< void( GeometryFeature& gf, unsigned int role ) >& visit ) const;
161
166 void setBoundingVolume( BoundingVolume* boundingVolume );
167
171 bool hasBoundingVolume() const;
172
180
184
185}; // Geometry
186
187
188
189} // namespace Carna :: base
190
191} // namespace Carna
192
193#endif // GEOMETRY_H_6014714286
Defines Carna::base::Spatial.
Represents an association.
Definition Association.h:45
Represents a Geometry minimal boundary volume of simple geometric shape. The volume is centered withi...
Represents "components" that are aggregated by Geometry objects. Closer description is given here.
Defines scene graph leafs. Instances of this class represent visible geometry that can be rendered....
Definition Geometry.h:60
Geometry(unsigned int geometryType, const std::string &tag="")
Instantiates.
void removeFeature(unsigned int role)
Removes the geometry feature from this node that is associated with role in .
std::size_t featuresCount() const
Tells number of geometry features attached.
const unsigned int geometryType
Holds the geometry type of this geometry node.
Definition Geometry.h:70
bool hasFeature(const GeometryFeature &feature) const
Tells whether feature is attached to this node in .
void putFeature(unsigned int role, GeometryFeature &feature)
Adds the feature to this geometry node using role in . The concept of geometry features and roles is ...
virtual ~Geometry()
Deletes.
const BoundingVolume & boundingVolume() const
void setBoundingVolume(BoundingVolume *boundingVolume)
Sets boundingVolume as the minimum boundary volume of this node. Supply nullptr for boundingVolume to...
void removeFeature(GeometryFeature &feature)
Removes feature from this geometry node in . The concept of geometry features and roles is explained ...
BoundingVolume & boundingVolume()
References the previously set minimum boundary volume.
bool hasBoundingVolume() const
Tells whether a minimum boundary volume is set on this node.
void clearFeatures()
Removes all geometry feature from this node.
void visitFeatures(const std::function< void(GeometryFeature &gf, unsigned int role) > &visit) const
Invokes visit once on each attached geometry feature.
bool hasFeature(unsigned int role) const
Tells whether this node has a feature with role attached in .
GeometryFeature & feature(unsigned int role) const
References the feature with role attached to this node in .
Represents a spatial scene element. It's location is determined relatively to another spatial that is...
Definition Spatial.h:45