Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

StateSetUnifyTraverser.h

Go to the documentation of this file.
00001 // Copyright NVIDIA Corporation 2002-2004
00002 // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
00003 // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
00004 // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
00005 // AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS
00006 // BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES
00007 // WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
00008 // BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS)
00009 // ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS
00010 // BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES 
00011 
00012 #pragma once
00013 
00015 #include <set>
00016 
00017 #include "nvsgcommon.h"
00018 #include "nvtraverser/Traverser.h"
00019 
00020 namespace nvsg
00021 {
00022   class StateAttribute;
00023   class TextureAttributeItem;
00024 }
00025 
00026 namespace nvtraverser
00027 {
00029 
00032   class StateSetUnifyTraverser : public Traverser
00033   {
00034     public:
00036       NVSG_API StateSetUnifyTraverser( void );
00037 
00038     public:
00040 
00042       NVSG_API bool getIgnoreNames( void ) const;
00043 
00045 
00046       NVSG_API void setIgnoreNames( bool ignore   
00047                                   );
00048 
00049     protected:
00051       NVSG_API virtual ~StateSetUnifyTraverser( void );
00052 
00054 
00056       NVSG_API virtual void handleCgFx( const nvsg::CgFx *p             
00057                                       );
00058 
00060 
00062       NVSG_API virtual void handleGeoNode( const nvsg::GeoNode *p   
00063                                          );
00064 
00066 
00069       NVSG_API virtual void handleFaceAttribute( const nvsg::FaceAttribute *p 
00070                                                );
00071 
00073 
00076       NVSG_API virtual void handleMaterial( const nvsg::Material *p     
00077                                           );
00078 
00080 
00084       NVSG_API virtual void handleStateSet( const nvsg::StateSet * p    
00085                                           );
00086 
00088 
00092       NVSG_API virtual void handleTextureAttribute( const nvsg::TextureAttribute *p 
00093                                                   );
00094 
00096 
00099       NVSG_API virtual void handleTextureAttributeItem( const nvsg::TextureAttributeItem *p 
00100                                                       , size_t textureUnit            
00101                                                       );
00102 
00103     private:
00104       const nvsg::CgFx                            * m_cgfx;
00105       std::set<const nvsg::CgFx*>                   m_cgfxs;
00106       const nvsg::FaceAttribute                   * m_faceAttribute;
00107       std::set<const nvsg::FaceAttribute*>          m_faceAttributes;
00108       const nvsg::Material                        * m_material;
00109       std::set<const nvsg::Material*>               m_materials;
00110       std::vector<std::pair<const nvsg::StateSet*,const nvsg::StateSet*> > m_stateSet;
00111       std::set<const nvsg::StateSet*>               m_stateSets;
00112       const nvsg::TextureAttribute                * m_textureAttribute;
00113       std::set<const nvsg::TextureAttribute*>       m_textureAttributes;
00114       std::vector<std::pair<size_t,const nvsg::TextureAttributeItem*> > m_textureAttributeItem;
00115       std::set<const nvsg::TextureAttributeItem*>   m_textureAttributeItems;
00116 
00117       bool  m_ignoreNames;
00118   };
00119 
00120   inline bool StateSetUnifyTraverser::getIgnoreNames( void ) const
00121   {
00122     return( m_ignoreNames );
00123   }
00124 
00125   inline void StateSetUnifyTraverser::setIgnoreNames( bool ignore )
00126   {
00127     m_ignoreNames = ignore;
00128   }
00129 
00130 }

Generated on Tue Mar 1 13:19:19 2005 for NVSGSDK by NVIDIA