AnimatLab
2
Test
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
WorldCoordinateNodeVisitor.h
1
2
#pragma once
3
4
namespace
VortexAnimatSim
5
{
6
namespace
Visualization
7
{
8
9
// Visitor to return the world coordinates of a node.
10
// It traverses from the starting node to the parent.
11
// The first time it reaches a root node, it stores the world coordinates of
12
// the node it started from. The world coordinates are found by concatenating all
13
// the matrix transforms found on the path from the start node to the root node.
14
15
class
VORTEX_PORT
WorldCoordinateNodeVisitor
:
public
osg::NodeVisitor
16
{
17
public
:
18
WorldCoordinateNodeVisitor
():
19
osg::NodeVisitor(NodeVisitor::TRAVERSE_PARENTS), done(
false
)
20
{
21
}
22
virtual
void
apply(osg::Node &node);
23
24
osg::Matrixd MatrixTransform()
25
{
26
return
wcMatrix;
27
}
28
private
:
29
bool
done;
30
osg::Matrixd wcMatrix;
31
};
32
33
}
// end Visualization
34
}
//end VortexAnimatSim
35
36
VortexAnimatSim::Visualization::WorldCoordinateNodeVisitor
Definition:
WorldCoordinateNodeVisitor.h:15
VortexAnimatSim
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
Definition:
MeshMinVertexDistanceVisitor.cpp:5
Libraries
VortexAnimatSim
WorldCoordinateNodeVisitor.h
Generated on Tue Sep 29 2015 07:07:24 for AnimatLab by
1.8.10