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

isphere_geo.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_GEO_H_
00017 #define _ISPHERE_GEO_H_
00018 
00019 // includes, maya
00020 #include <maya/MIOStream.h>
00021 #include <maya/MPxSurfaceShape.h>
00022 #include <maya/MPxSurfaceShapeUI.h>
00023 #include <maya/MFnNumericAttribute.h>
00024 #include <maya/MFnEnumAttribute.h>
00025 #include <maya/MPoint.h>
00026 #include <maya/MPlug.h>
00027 #include <maya/MDrawData.h>
00028 #include <maya/MDrawRequest.h>
00029 #include <maya/MSelectionMask.h>
00030 #include <maya/MSelectionList.h>
00031 #include <maya/MDagPath.h>
00032 
00033 // includes, GL
00034 #include <GL/gl.h>
00035 
00037 // Macros for attribute creation and checking in Maya
00040 #define MCHECKERROR(STAT,MSG)       \
00041     if ( MS::kSuccess != STAT ) {   \
00042         cerr << MSG << endl;        \
00043         return MS::kFailure;        \
00044     }
00045 
00046 
00048 // Geometry class for Implicit Sphere
00050 class ISphere : public MPxSurfaceShape {
00051 
00052   friend class ISphereUI;
00053   
00054  public:
00055 
00057   ISphere();
00058 
00059   // @brief Destructor
00060   virtual ~ISphere();
00061 
00062  public:
00063 
00064   virtual void postConstructor();
00065 
00070   virtual MStatus compute( const MPlug& plug, MDataBlock& data_block);
00071 
00072  public:
00073 
00075   virtual bool getInternalValue( const MPlug& p, MDataHandle& data_block);
00076 
00078   virtual bool setInternalValue( const MPlug& p, MDataHandle& data_block);
00079 
00080  public:
00081 
00083   virtual bool isBounded() const;
00084 
00086   virtual MBoundingBox boundingBox() const;
00087 
00088  public:
00089 
00091   static void* creator();
00092 
00094   static MStatus initialize();
00095 
00098   MStatus updateValues();
00099 
00100  private:
00101 
00103   double getUpdatedRadius();
00104 
00105  private:
00106 
00107   // Internal data members
00108 
00111   double radius;
00112 
00114   static MObject sphereRadius;
00116   static MFnNumericAttribute radiusAttribute;
00117 
00118  public:
00119 
00120   // public data members
00121   static  MTypeId  id;
00122 };
00123 
00124 // variables, exported (extern)
00125 
00126 // functions, inlined (inline)
00127   
00128 // functions, exported (extern)
00129  
00130 #endif // #ifndef _ISPHERE_GEO_H_
00131 

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