00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __SOP_Visibility_h__
00022 #define __SOP_Visibility_h__
00023
00024 #include "SOP_API.h"
00025 #include "SOP_Node.h"
00026
00027
00028 #define SOP_VISIBILITY_GROUP_INDEX 0
00029 #define SOP_VISIBILITY_HIDE_OR_EXPOSE_INDEX 1
00030 #define SOP_VISIBILITY_SEL_OR_NONSEL_INDEX 2
00031 #define SOP_VISIBILITY_3D_OR_2D_INDEX 3
00032 #define SOP_VISIBILITY_CUMULATIVE 4
00033
00034 class SOP_API SOP_Visibility : public SOP_Node
00035 {
00036 public:
00037 SOP_Visibility(OP_Network *net, const char *name,
00038 OP_Operator *entry);
00039 virtual ~SOP_Visibility();
00040
00041
00042
00043 enum { HIDE, EXPOSE };
00044 enum { SELECTED, NON_SELECTED };
00045 enum { THREE_D, TWO_D, TWO_D_AND_THREE_D };
00046
00047 virtual OP_ERROR cookInputGroups(OP_Context &context,
00048 int alone = 0);
00049
00050 static OP_Node *myConstructor(OP_Network *net,
00051 const char *name,
00052 OP_Operator *entry);
00053
00054 static PRM_Template myTemplateList[];
00055
00056 protected:
00057 virtual OP_ERROR cookMySop(OP_Context &context);
00058 virtual const char *inputLabel(unsigned idx) const;
00059
00060 void performVisibility(int visibility_type);
00061
00062 private:
00063 void getGroups(UT_String &str, float t)
00064 { evalString(str, SOP_VISIBILITY_GROUP_INDEX, 0, t); }
00065 int HIDE_OR_EXPOSE()
00066 { return evalInt(SOP_VISIBILITY_HIDE_OR_EXPOSE_INDEX, 0, 0); }
00067 int SEL_OR_NONSEL()
00068 { return evalInt(SOP_VISIBILITY_SEL_OR_NONSEL_INDEX, 0, 0); }
00069 int THREE_D_OR_TWO_D()
00070 { return evalInt(SOP_VISIBILITY_3D_OR_2D_INDEX, 0, 0); }
00071 int CUMULATIVE()
00072 { return evalInt(SOP_VISIBILITY_CUMULATIVE, 0, 0); }
00073
00074 GU_DetailGroupPair myDetailGroupPair;
00075 GB_PrimitiveGroup *myGroup;
00076 };
00077
00078 #endif