#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();
~apiMesh() override;
bool asSrc ) override;
bool asSrc ) override;
double tolerance ) const;
MVertexCachingMode cachingMode,
MVertexCachingMode cachingMode,
const MPlane* freezePlane )
override;
MVertexCachingMode cachingMode,
MVertexOffsetMode mode,
bool normalize ) override;
bool forReadOnly = false ) override;
bool writeable=true,
bool forReadOnly = false) override;
bool hasHistory();
bool shapeDirty();
void resetShapeDirty();
bool materialDirty() const;
void setMaterialDirty(bool dirty);
apiMeshGeom* meshGeomToUse( );
void verticesUpdated();
static void * creator();
public:
static MObject useWeightedTransformUsingFunction;
static MObject useWeightedTweakUsingFunction;
private:
void updateCachedSurface(
const apiMeshGeom* geomPtr,
const MObjectArray & componentList );
bool value(
MDataBlock&,
int pntInd,
int vlInd,
double & val )
const;
bool setValue(
MDataBlock&,
int pntInd,
int vlInd,
double val );
void setShapeDirty();
void notifyViewport();
void signalDirtyToViewport();
bool fHasHistoryOnCreate;
bool fShapeDirty;
bool fMaterialDirty;
std::map<std::string, MCallbackId> fMaterialDirtyCbIds;
};
#endif