00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <list>
00013
00014 #include "nvsgcommon.h"
00015
00016 #include "nvtraverser/Traverser.h"
00017
00018 namespace nvtraverser
00019 {
00021
00025 class TransformUnifyTraverser : public Traverser
00026 {
00027 public:
00029 NVSG_API TransformUnifyTraverser( void );
00030
00031 public:
00033
00035 NVSG_API bool getIgnoreNames( void ) const;
00036
00038
00039 NVSG_API void setIgnoreNames( bool ignore
00040 );
00041
00042 protected:
00044 NVSG_API virtual ~TransformUnifyTraverser( void );
00045
00047 NVSG_API virtual void doApply( const nvsg::ViewState *viewState, const nvsg::Scene *scene );
00048
00050
00052 NVSG_API virtual void handleTransform( const nvsg::Transform * p
00053 );
00054
00056
00058 NVSG_API virtual void handleAnimatedTransform( const nvsg::AnimatedTransform * p
00059 );
00060
00062
00064 NVSG_API virtual void preTraverseGroup(
00065 const nvsg::Group *p
00066 );
00067
00069
00071 NVSG_API virtual void postTraverseGroup(
00072 const nvsg::Group *p
00073 );
00074
00075 private:
00076 bool m_ignoreLights;
00077 bool m_ignoreNames;
00078 std::stack<std::list<const nvsg::Transform*>*> m_toDeleteTransform;
00079 std::stack<std::list<const nvsg::Transform*>*> m_toKeepTransform;
00080 std::stack<std::list<const nvsg::AnimatedTransform*>*> m_toDeleteAnimatedTransform;
00081 std::stack<std::list<const nvsg::AnimatedTransform*>*> m_toKeepAnimatedTransform;
00082 };
00083
00084 inline bool TransformUnifyTraverser::getIgnoreNames( void ) const
00085 {
00086 return( m_ignoreNames );
00087 }
00088
00089 inline void TransformUnifyTraverser::setIgnoreNames( bool ignore )
00090 {
00091 m_ignoreNames = ignore;
00092 }
00093
00094 }