scg3  0.6
PreTraverser.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright 2014 Volker Ahlers
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */
24 
25 #ifndef PRETRAVERSER_H_
26 #define PRETRAVERSER_H_
27 
28 #include "scg_internals.h"
29 #include "Traverser.h"
30 
31 namespace scg {
32 
33 
37 class PreTraverser: public Traverser {
38 
39 public:
40 
44  PreTraverser(RenderState* renderState);
45 
49  virtual ~PreTraverser();
50 
51  // leaf nodes
52 
56  virtual void visitLightPosition(LightPosition* node);
57 
58  // composite nodes
59 
64  virtual void visitCamera(Camera* node);
65 
70  virtual void visitPostCamera(Camera* node);
71 
75  virtual void visitTransformation(Transformation* node);
76 
81  virtual void visitPostTransformation(Transformation* node);
82 
83 };
84 
85 
86 } /* namespace scg */
87 
88 #endif /* PRETRAVERSER_H_ */
virtual ~PreTraverser()
Base class for all cameras (composite node, abstract).
Definition: Camera.h:51
virtual void visitPostCamera(Camera *node)
PreTraverser(RenderState *renderState)
virtual void visitLightPosition(LightPosition *node)
Base class for all traversers (visitor pattern, abstract).
Definition: Traverser.h:36
virtual void visitCamera(Camera *node)
virtual void visitTransformation(Transformation *node)
A traverser that searches Camera and LightPosition nodes in the scene graph (visitor pattern).
Definition: PreTraverser.h:37
The central render state that collects information about the current shader, transformations,...
Definition: RenderState.h:107
A transformation node to be used to appy a transformation to the sub-tree (composite node).
Base class for all traversers (visitor pattern, abstract).
Definition: Animation.h:28
virtual void visitPostTransformation(Transformation *node)
Internal definitions required by most classes.
A light position node to define the position of an associated light within the scene graph (leaf node...
Definition: LightPosition.h:44