apiMeshShapeUI.h
#include <maya/MPxSurfaceShapeUI.h>
#include <apiMeshShape.h>
class apiMeshUI : public MPxSurfaceShapeUI
{
public:
apiMeshUI();
virtual ~apiMeshUI();
virtual void getDrawRequests( const MDrawInfo & info,
bool objectAndActiveOnly,
MDrawRequestQueue & requests );
virtual void draw( const MDrawRequest & request,
M3dView & view ) const;
virtual void drawUV( M3dView &view, const MTextureEditorDrawInfo & ) const;
virtual bool canDrawUV() const;
virtual bool select( MSelectInfo &selectInfo,
MSelectionList &selectionList,
MPointArray &worldSpaceSelectPts ) const;
void drawWireframe( const MDrawRequest & request, M3dView & view ) const;
void drawShaded( const MDrawRequest & request, M3dView & view ) const;
void drawVertices( const MDrawRequest & request, M3dView & view ) const;
void drawBoundingBox( const MDrawRequest & request, M3dView & view ) const;
void drawRedPointAtCenter( const MDrawRequest & request, M3dView & view ) const;
bool selectVertices( MSelectInfo &selectInfo,
MSelectionList &selectionList,
MPointArray &worldSpaceSelectPts ) const;
static void * creator();
private:
void drawUVWireframe( apiMeshGeom *, M3dView &,
const MTextureEditorDrawInfo &info ) const;
void drawUVMapCoord( M3dView &, int uv, float u, float v, bool ) const;
void drawUVMapCoordNum( apiMeshGeom *, M3dView &,
const MTextureEditorDrawInfo &info, bool ) const;
enum {
kDrawVertices,
kDrawWireframe,
kDrawWireframeOnShaded,
kDrawSmoothShaded,
kDrawFlatShaded,
kDrawBoundingBox,
kDrawRedPointAtCenter,
kLastToken
};
};