Main Page | Namespace List | Class List | Directories | File List | Namespace Members | Class Members | File Members

isphere_ui.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef _ISPHERE_UI_H_
00017 #define _ISPHERE_UI_H_
00018 
00019 // includes, graphics
00020 #include <GL/glew.h>
00021 
00022 // includes, maya
00023 #include <maya/MIOStream.h>
00024 #include <maya/MPxSurfaceShape.h>
00025 #include <maya/MPxSurfaceShapeUI.h>
00026 #include <maya/MFnNumericAttribute.h>
00027 #include <maya/MFnEnumAttribute.h>
00028 #include <maya/MPoint.h>
00029 #include <maya/MPlug.h>
00030 #include <maya/MDrawData.h>
00031 #include <maya/MDrawRequest.h>
00032 #include <maya/MSelectionMask.h>
00033 #include <maya/MSelectionList.h>
00034 #include <maya/MDagPath.h>
00035 #include <maya/MMaterial.h>
00036 #include <maya/MFnTransform.h>
00037 
00038 // includes, GL
00039 #include <GL/gl.h>
00040 
00041 // includes, Cg
00042 #include <Cg/cg.h>
00043 #include <Cg/cgGL.h>
00044 
00045 // Our includes
00046 #include <imaterial.h>
00047 
00048 
00050 class ISphereUI : public MPxSurfaceShapeUI {
00051 
00052  public:
00053 
00055   ISphereUI();
00056 
00058   virtual ~ISphereUI();
00059 
00060  public:
00061 
00065   virtual void getDrawRequests( const MDrawInfo & info,
00066                                 bool objectAndActiveOnly,
00067                                 MDrawRequestQueue & requests );
00068 
00072   virtual void draw( const MDrawRequest & request,
00073                      M3dView & view ) const;  
00074 
00079   virtual bool select( MSelectInfo &select_info,
00080                        MSelectionList &selection_list,
00081                        MPointArray &world_space_pts ) const;
00082  
00083  private:
00084 
00090   void getDrawRequestsShaded( MDrawRequest& request,
00091                               const MDrawInfo& info,
00092                               MDrawRequestQueue& queue,
00093                               MDrawData& data);
00094 
00098   void getDrawRequestsWireframe( MDrawRequest& request, const MDrawInfo& info);
00099 
00100  public:
00101   
00103   static  void *  creator();
00104 
00105  private:
00106 
00109   void updateParameters( MFnTransform trans) const; 
00110 
00111  private:
00112 
00114   enum {
00115     kDrawVertices, 
00116     kDrawWireframe,
00117     kDrawWireframeOnShaded,
00118     kDrawSmoothShaded,
00119     kDrawFlatShaded
00120   };
00121 
00122  private:
00123 
00125   class ISphereShading* shading;
00126 
00127 };
00128 
00129 // variables, exported (extern)
00130 
00131 // functions, inlined (inline)
00132   
00133 // functions, exported (extern)
00134 
00135 #endif // #ifndef _ISPHERE_UI_H_
00136 

Generated on Sat Dec 31 18:07:49 2005 for ICaster by  doxygen 1.4.4