00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __SOP_Reverse_h__
00021 #define __SOP_Reverse_h__
00022
00023 #include "SOP_API.h"
00024 class GB_Primitive;
00025 class GD_Primitive;
00026
00027 #include "SOP_Node.h"
00028
00029 #define SR_NONE 0
00030 #define SR_REVERSE 1
00031 #define SR_REVERSEU 2
00032 #define SR_REVERSEV 3
00033 #define SR_TRANSPOSE 4
00034 #define SR_SHIFT 5
00035
00036 class SOP_API SOP_Reverse : public SOP_Node
00037 {
00038 public:
00039 virtual OP_ERROR cookInputGroups(OP_Context &context,
00040 int alone = 0);
00041
00042 virtual unsigned disableParms();
00043
00044 static PRM_Template myTemplateList[];
00045 static OP_Node *myConstructor(OP_Network *, const char *,
00046 OP_Operator *);
00047 static void buildObjectMenu(void *data, PRM_Name* menu,
00048 int maxSize, void* notUsed, PRM_Parm *);
00049
00050 void SET_VERTEX(int i) { setInt(1, 0, 0, i); }
00051
00052 protected:
00053 SOP_Reverse(OP_Network *, const char *, OP_Operator *);
00054 virtual ~SOP_Reverse();
00055
00056 virtual OP_ERROR cookMySop(OP_Context &context);
00057 virtual const char *inputLabel(unsigned idx) const;
00058
00059 private:
00060
00061 void getSourceGroups(UT_String &str, float t)
00062 { evalString(str, 0, 0, t); }
00063
00064 int VERTEX() { return evalInt(1, 0, 0); }
00065 int VTXUOFF(float t) { return evalInt(2, 0, t); }
00066 int VTXVOFF(float t) { return evalInt(3, 0, t); }
00067
00068 void doVertex3d (float t, int type);
00069 void doVertex2d (float t, int type);
00070
00071 GEO_Primitive *myPrim3d;
00072 GD_Primitive *myPrim2d;
00073
00074 GU_DetailGroupPair myDetailGroupPair;
00075
00076 const GB_PrimitiveGroup *myGroup;
00077 };
00078
00079 #endif