ug4
traverser_collision_tree.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2015: G-CSC, Goethe University Frankfurt
3  * Author: Sebastian Reiter
4  *
5  * This file is part of UG4.
6  *
7  * UG4 is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License version 3 (as published by the
9  * Free Software Foundation) with the following additional attribution
10  * requirements (according to LGPL/GPL v3 §7):
11  *
12  * (1) The following notice must be displayed in the Appropriate Legal Notices
13  * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14  *
15  * (2) The following notice must be displayed at a prominent place in the
16  * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17  *
18  * (3) The following bibliography is recommended for citation and must be
19  * preserved in all covered files:
20  * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21  * parallel geometric multigrid solver on hierarchically distributed grids.
22  * Computing and visualization in science 16, 4 (2013), 151-164"
23  * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24  * flexible software system for simulating pde based models on high performance
25  * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU Lesser General Public License for more details.
31  */
32 
33 #ifndef __H__UG__NODE_TREE__TRAVERSER_COLLISION_TREE__
34 #define __H__UG__NODE_TREE__TRAVERSER_COLLISION_TREE__
35 
36 #include <stack>
37 #include "../traverser.h"
38 #include "../collision_element_info.h"
39 
40 namespace ug{
41 namespace node_tree
42 {
43 
44 class CollisionTreeRootNode;
45 class CollisionEdgesNode;
46 class CollisionTrianglesNode;
47 
49 // Traverser_CollisionTree
51 
62 {
63  public:
65  virtual ~Traverser_CollisionTree();
66 
67  protected:
68  virtual void handle_collision_tree_root(CollisionTreeRootNode* colTreeRootNode);
69  virtual void handle_collision_edges(CollisionEdgesNode* colEdgesNode);
70  virtual void handle_collision_triangles(CollisionTrianglesNode* colTrisNode);
71 
73 
74  private:
75  std::stack<CollisionTreeRootNode*> m_stackRootNodes;
76 };
77 
78 }// end of namespace node_tree
79 }// end of namespace ug
80 
81 #endif
holds index pairs defining edges.
Definition: collision_edges_node.h:57
A group node featuring a bounding box and a set of points.
Definition: collision_tree_root_node.h:55
holds index tuples defining triangles.
Definition: collision_triangles_node.h:61
Enhances the Traverser base-class by methods to traverse a collision tree.
Definition: traverser_collision_tree.h:62
std::stack< CollisionTreeRootNode * > m_stackRootNodes
Definition: traverser_collision_tree.h:75
virtual void handle_collision_tree_root(CollisionTreeRootNode *colTreeRootNode)
Definition: traverser_collision_tree.cpp:56
Traverser_CollisionTree()
Definition: traverser_collision_tree.cpp:40
virtual void handle_collision_triangles(CollisionTrianglesNode *colTrisNode)
Definition: traverser_collision_tree.cpp:78
virtual ~Traverser_CollisionTree()
Definition: traverser_collision_tree.cpp:51
CollisionTreeRootNode * get_current_root_node()
Definition: traverser_collision_tree.cpp:84
virtual void handle_collision_edges(CollisionEdgesNode *colEdgesNode)
Definition: traverser_collision_tree.cpp:72
Derivates of a Traverser can be used to traverse a scenegraph.
Definition: traverser.h:54
the ug namespace