#ifndef _apiMeshShape
#define _apiMeshShape
#include <map>
#include <string>
#include <maya/MPxSurfaceShape.h>
#include <maya/MPxGeometryIterator.h>
#include <maya/MTypeId.h>
#include <maya/MPlug.h>
#include <maya/MDataBlock.h>
#include <maya/MVectorArray.h>
#include <maya/MDoubleArray.h>
#include <maya/MSelectionList.h>
#include <maya/MSelectionMask.h>
#include <maya/MNodeMessage.h>
#include "apiMeshGeom.h"
#include "apiMeshData.h"
#include "apiMeshIterator.h"
{
public:
    apiMesh();
    virtual ~apiMesh();
    
    
    
    
    
                                             bool asSrc );
                                             bool asSrc );
    
    
    
    
                                    double tolerance ) const;
    
    
                                        MVertexCachingMode cachingMode,
    
    
                                                    MVertexCachingMode cachingMode,
                                                    MVertexCachingMode cachingMode,
    
    
                                                   MVertexOffsetMode mode,
                                                   bool normalize );
    
    
    
    
                                                   bool forReadOnly = false );
                                                     bool writeable=true,
                                                     bool forReadOnly = false);
    
    
    
    bool                    hasHistory();
    bool                    shapeDirty();
    void                    resetShapeDirty();
    bool                    materialDirty() const;
    void                    setMaterialDirty(bool dirty);
    void                    updateCachedSurface( 
const apiMeshGeom* geomPtr, 
const MObjectArray & componentList );
 
    bool                    value( int pntInd, int vlInd, double & val ) const;
    bool                    value( 
int pntInd, 
MPoint & val ) 
const;
 
    bool                    setValue( int pntInd, int vlInd, double val );
    bool                    setValue( 
int pntInd, 
const MPoint & val );
 
    apiMeshGeom*            meshGeom();
    apiMeshGeom*            cachedGeom();
    void                    verticesUpdated();
    static  void *          creator();
public:
    
    
    
    static  MObject         useWeightedTransformUsingFunction;
 
    static  MObject         useWeightedTweakUsingFunction;
 
    
    
    
    
private:
    void                    signalDirtyToViewport();
    bool fHasHistoryOnCreate;
    bool fShapeDirty;
    bool fMaterialDirty;
    std::map<std::string, MCallbackId> fMaterialDirtyCbIds;
};
#endif