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

RenderRoutines.h

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------------------
00013 //-----------------------------------------------------------------------------------------
00014 
00015 #ifndef __RENDER_ROUTINES__H__
00016 #define __RENDER_ROUTINES__H__
00017 
00018         #ifdef WIN32
00019                 #pragma once
00020                 // this is needed before any of the maya includes. Generally it is better to
00021                 // set this within the preprocessor settings of visual C++.
00022                 #define NT_PLUGIN
00023         #endif
00024 
00025         #include <maya/MPxLocatorNode.h>
00026         #include <maya/MString.h>
00027         #include <maya/MTypeId.h>
00028         #include <maya/MVector.h>
00029         #include <maya/MDataBlock.h>
00030         #include <maya/MDataHandle.h>
00031         #include <maya/M3dView.h>
00032         #include <maya/MDistance.h>
00033         #include <maya/MFnUnitAttribute.h>
00034         #include <maya/MFnNumericAttribute.h>
00035         #include <maya/MFnMessageAttribute.h>
00036         #include <maya/MFnTypedAttribute.h>
00037         #include <maya/MPxManipContainer.h>
00038         #include <maya/MPointArray.h>
00039         #include <math.h>
00040         
00042 
00053         class RenderRoutines
00054                 : public MPxLocatorNode {
00055         public:
00056 
00057                 RenderRoutines() : MPxLocatorNode() {};
00058 
00059                 virtual ~RenderRoutines() {};
00060 
00064                 virtual bool isBounded() const;
00065 
00066 
00067                 virtual void draw( M3dView& view,
00068                                                                 const MDagPath& DGpath,
00069                                                                 M3dView::DisplayStyle style,
00070                                                                 M3dView::DisplayStatus status );
00071 
00072                 virtual void OnDraw( M3dView::DisplayStyle style,
00073                                                          M3dView::DisplayStatus status ) {
00074                 }
00075 
00076         protected:
00077 
00079                 void ApplyStateColour(const float intensity,M3dView::DisplayStatus status);
00080 
00081                 //      These functions draw a circle on the specified plane
00082                 //      \param  r               -       the radius of the circle
00083                 //      \param  divs    -       the number of divisions around the circle
00084                 //
00085                 void DrawCircleXY(const float r,const int divs);
00086                 void DrawCircleXZ(const float r,const int divs);
00087                 void DrawCircleYZ(const float r,const int divs);
00088 
00089                 void DrawFilledCircleXY(const float r,const int divs);
00090                 void DrawFilledCircleXZ(const float r,const int divs);
00091                 void DrawFilledCircleYZ(const float r,const int divs);
00092 
00093 
00094                 //      These functions draw a quad in the specified plane.
00095                 //      \brief  w       -       the width
00096                 //      \brief  h       -       the height
00097                 //
00098                 void DrawQuadXY(const float w,const float h);
00099                 void DrawQuadXZ(const float w,const float h);
00100                 void DrawQuadYZ(const float w,const float h);
00101 
00102                 void DrawFilledQuadXY(const float w,const float h);
00103                 void DrawFilledQuadXZ(const float w,const float h);
00104                 void DrawFilledQuadYZ(const float w,const float h);
00105 
00106 
00107                 //      These functions draw a 2 crossed lines in the specified plane.
00108                 //      \brief  w       -       the width
00109                 //      \brief  h       -       the height
00110                 //
00111                 void DrawCrossXY(const float w,const float h);
00112                 void DrawCrossXZ(const float w,const float h);
00113                 void DrawCrossYZ(const float w,const float h);
00114 
00115                 //      These functions draw an arc on the specified plane
00116                 //      \param  r               -       the radius of the circle
00117                 //      \param  sa              -       the start angle in degrees
00118                 //      \param  ea              -       the end angle in degrees
00119                 //      \param  divs    -       the number of divisions around the circle
00120                 //
00121                 void DrawArcXY(const float r,const float sa,const float ea,const int divs);
00122                 void DrawArcXZ(const float r,const float sa,const float ea,const int divs);
00123                 void DrawArcYZ(const float r,const float sa,const float ea,const int divs);
00124 
00125 
00126                 //      These functions draw an arc on the specified plane
00127                 //      \param  sr              -       the start radius of the spiral
00128                 //      \param  er              -       the end radius of the spiral
00129                 //      \param  sa              -       the start angle in degrees
00130                 //      \param  ea              -       the end angle in degrees
00131                 //      \param  h               -       the height of the spiral to draw
00132                 //      \param  divs    -       the number of divisions around the circle
00133                 //
00134                 void DrawSpiralXY(const float sr,const float er,const float sa,const float ea,const float h,const int divs);
00135                 void DrawSpiralXZ(const float sr,const float er,const float sa,const float ea,const float h,const int divs);
00136                 void DrawSpiralYZ(const float sr,const float er,const float sa,const float ea,const float h,const int divs);
00137 
00138 
00139                 void DrawSphere(const float r);
00140                 void DrawCone(const float r,const float h);
00141                 void DrawCube(const float w,const float h,const float d);
00142                 void DrawFilledCube(const float w,const float h,const float d);
00143 
00144                 //      These functions draw a 2 crossed lines in the specified plane.
00145                 //      \brief  r       -       the radius
00146                 //      \brief  h       -       the height
00147                 //
00148                 void DrawCylinderXY(const float r,const float h);
00149                 void DrawCylinderXZ(const float r,const float h);
00150                 void DrawCylinderYZ(const float r,const float h);
00151 
00152 
00153         };
00154 
00155 
00156 #endif
00157 

Generated on Mon Jun 13 03:18:00 2005 for ImplicitFunctions by  doxygen 1.4.1