geometry.h

Go to the documentation of this file.
00001 
00002 //**************************************************************************/
00003 // Copyright (c) 2008 Autodesk, Inc.
00004 // All rights reserved.
00005 //
00006 // Use of this software is subject to the terms of the Autodesk license
00007 // agreement provided at the time of installation or download, or which
00008 // otherwise accompanies this software in either electronic or hard copy form.
00009 //
00010 //**************************************************************************/
00011 // DESCRIPTION:
00012 // CREATED: October 2008
00013 //**************************************************************************/
00014 
00015 namespace mudbox {
00016 
00018 class MBDLL_DECL Geometry : virtual public GroupNode
00019 {
00020     DECLARE_CLASS;
00021 
00022 protected:
00024     Geometry( void );
00025 
00026 public:
00027 
00028     enum MatchMode
00029     {
00030         matchByVertexID,        
00031         matchByUV,              
00032         matchByVertexPosition   
00033     };
00034 
00036     virtual unsigned int LevelCount( void ) const;
00037     
00039     virtual SubdivisionLevel *LowestLevel( void ) const;
00040     
00042     virtual SubdivisionLevel *HighestLevel( void ) const;
00043     
00045     virtual SubdivisionLevel *Level(
00046         unsigned int iIndex     
00047         ) const;
00048 
00050     virtual void AddLevel( 
00051         SubdivisionLevel *pLevel,   
00052         bool bFirst = false         
00053         );
00054 
00058     virtual bool RemoveHighestLevel();
00059 
00063     virtual SubdivisionLevel *ActiveLevel( void ) const;
00064 
00070     virtual bool ChangeActiveLevel( 
00071         const SubdivisionLevel* pNewLevel   
00072         );
00073 
00075     virtual unsigned int LayerCount() const;
00076 
00079     virtual LayerMeshData* LayerData( 
00080         const QString& sLayerName           
00081         ) const;
00082 
00086     virtual LayerMeshData* LayerData( 
00087         unsigned int iLayer,                    
00088         const SubdivisionLevel* pLevel = NULL   
00089         ) const;
00090 
00092     virtual mudbox::Material *Material( void ) const;
00093     
00095     virtual void SetMaterial( mudbox::Material *pMaterial );
00096 
00100     virtual mudbox::Material *MaterialOverride( void ) const;
00101 
00105     virtual void SetMaterialOverride( mudbox::Material *pMaterialOverride );
00106 
00111     aptr<SubdivisionLevel> m_pActiveLevel;
00112 
00114     virtual void SetActiveLevel(
00115         SubdivisionLevel *pNewActiveLevel
00116         );
00117 
00119     virtual int GeometryID( void )const;
00120 
00123     virtual void ImportUVs( const Geometry* pSource,    
00124         MatchMode eMode = matchByVertexID,              
00125         float fTolerance = 0.001f                       
00126         );
00127 
00128     virtual void Transform( const Matrix &mMatrix );
00129 };
00130 
00131 }; // end of namespace mudbox