meshRemapTool.h
#ifndef _MESH_REMAP_TOOL_H_
#define _MESH_REMAP_TOOL_H_
#include <maya/MString.h>
#include <maya/MItSelectionList.h>
#include <maya/MPxContextCommand.h>
#include <maya/MPxContext.h>
#include <maya/MPxSelectionContext.h>
#include <maya/MEvent.h>
#include <maya/M3dView.h>
#include <maya/MObjectArray.h>
#include <maya/MDagPathArray.h>
#include <maya/MIntArray.h>
#include <meshRemapCmd.h>
class meshRemapTool : public MPxSelectionContext
{
public:
meshRemapTool();
virtual ~meshRemapTool();
void* creator();
void toolOnSetup( MEvent & event );
MStatus doRelease( MEvent& );
virtual void completeAction();
private:
void helpStateHasChanged();
void reset();
void executeCmd();
bool arePointsOverlap(const MPointArray&, const MPointArray&) const;
MStatus resolveMapping();
MSelectionList fSelectionList;
MObjectArray fSelectedComponentSrc;
MDagPathArray fSelectedPathSrc;
MObjectArray fSelectedComponentDst;
MDagPathArray fSelectedPathDst;
MIntArray fSelectVtxSrc;
MIntArray fSelectVtxDst;
MString fCurrentHelpString;
int fSelectedFaceSrc;
int fSelectedFaceDst;
int fNumSelectedPoints;
};
class meshRemapContextCmd : public MPxContextCommand
{
public:
meshRemapContextCmd() {};
virtual MPxContext* makeObj();
static void* creator();
};
#endif