subdivision.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 SubdivisionLevel : virtual public Mesh
00019 {
00020     DECLARE_CLASS;
00021 
00022 protected:
00024     SubdivisionLevel( FaceType eFaceType = typeQuadric );
00025 
00026 public:
00028     virtual class Geometry *Geometry( void ) const;
00030     virtual SubdivisionLevel *NextLevel( void );
00032     virtual SubdivisionLevel *PrevLevel( void );
00034     virtual unsigned int Index( void ) const;
00036     virtual unsigned int TotalFaceCount( void ) const;
00038     virtual SubdivisionLevel *Subdivide( bool bProcessUV = true, bool bSmoothPositions = true, bool bSmoothUV = false );
00040     virtual void CopyTo( SubdivisionLevel *pDestination ) const;
00042     virtual void ApplyChanges( bool bToLowerLevel = true );
00045     virtual void RecreateUVs( bool bForced = false );
00046 
00047     static void SetUVCreation( bool bCreateUV );
00048     static const Store<unsigned int> &QuadIndexTable( unsigned int iLevel );
00049     static const Store<unsigned int> &QuadVertexIndexTable( unsigned int iLevel );
00050     static const Store<unsigned int> &InvertedQuadIndexTable( unsigned int iLevel );
00051     virtual void CheckMeshGrid( unsigned int iBaseFaceIndex, unsigned int iLevel ) const;
00052     virtual void ConvertToRelative();
00053     virtual void ConvertToAbsolute();
00054 };
00055 
00056 }; // end of namespace mudbox
00057