HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_UVFuse.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: SOP Library (C++)
7  *
8  * COMMENTS: The UV Fuse SOP
9  *
10  */
11 
12 #ifndef __SOP_UVFuse_h__
13 #define __SOP_UVFuse_h__
14 
15 #include "SOP_API.h"
16 #include "SOP_Node.h"
17 
18 enum {
22 
24 
29 
31 };
32 
33 class SOP_API SOP_UVFuse : public SOP_Node
34 {
35 public:
36  SOP_UVFuse(OP_Network *net, const char *name, OP_Operator *entry);
37  virtual ~SOP_UVFuse();
38 
39  virtual bool updateParmsFlags();
40 
41  static OP_Node *myConstructor(OP_Network *net,
42  const char *name,
43  OP_Operator *entry);
44 
45  static PRM_Template myTemplateList[];
46 
47  virtual OP_ERROR cookInputGroups(OP_Context &context,
48  int alone = 0);
49 
50  virtual void getDescriptiveParmName(UT_String &name) const
51  {
52  name = "uvattrib";
53  }
54 
55 protected:
56  virtual OP_ERROR cookMySop(OP_Context &context);
57  virtual const char *inputLabel(unsigned idx) const;
58 
59 private:
60  void getGroupString(UT_String &str)
61  { evalString(str, SOP_UVFUSE_GRP_IDX, 0, 0.0f); }
62 
63  int GRPTYPE() { return evalInt(SOP_UVFUSE_GRPTYPE_IDX, 0, 0); }
64 
65  int MANPOS() { return evalInt(SOP_UVFUSE_MANPOS_IDX, 0, 0); }
66 
67  // The Distance Folder
68  // -------------------
69  int POSTYPE() { return evalInt(SOP_UVFUSE_POSTYPE_IDX, 0, 0); }
70  int USEDIST() { return evalInt(SOP_UVFUSE_USEDIST_IDX, 0, 0); }
71  float DISTANCE(fpreal t) { return evalFloat(SOP_UVFUSE_DIST_IDX, 0, t); }
72  int METRIC() { return evalInt(SOP_UVFUSE_METRIC_IDX, 0, 0); }
73 
74  // The Manual Folder
75  // -----------------
76  float U(fpreal t) { return evalFloat(SOP_UVFUSE_UVW_IDX, 0, t); }
77  float V(fpreal t) { return evalFloat(SOP_UVFUSE_UVW_IDX, 1, t); }
78  float W(fpreal t) { return evalFloat(SOP_UVFUSE_UVW_IDX, 2, t); }
79 
80  // The Grid Folder
81  // ---------------
82  int LINETYPE() { return evalInt(9, 0, 0); }
83  float SPACINGX(fpreal t) { return evalFloat(10, 0, t); }
84  float SPACINGY(fpreal t) { return evalFloat(10, 1, t); }
85  float SPACINGZ(fpreal t) { return evalFloat(10, 2, t); }
86  float NUMLINESX(fpreal t) { return evalFloat(11, 0, t); }
87  float NUMLINESY(fpreal t) { return evalFloat(11, 1, t); }
88  float NUMLINESZ(fpreal t) { return evalFloat(11, 2, t); }
89  int POW2X(fpreal t) { return evalInt(12, 0, t); }
90  int POW2Y(fpreal t) { return evalInt(12, 1, t); }
91  int POW2Z(fpreal t) { return evalInt(12, 2, t); }
92  float OFFSETX(fpreal t) { return evalFloat(13, 0, t); }
93  float OFFSETY(fpreal t) { return evalFloat(13, 1, t); }
94  float OFFSETZ(fpreal t) { return evalFloat(13, 2, t); }
95  int GRIDROUNDTYPE() { return evalInt(14, 0, 0); }
96  float GRIDTOL(fpreal t) { return evalFloat(15, 0, t); }
97 
98  const GA_Group *myGroup;
99 };
100 
101 #endif
virtual bool updateParmsFlags()
virtual const char * inputLabel(unsigned idx) const
fpreal evalFloat(int pi, int vi, fpreal t) const
UT_ErrorSeverity
Definition: UT_Error.h:25
GLfloat f
Definition: glcorearb.h:1925
void evalString(UT_String &val, int pi, int vi, fpreal t) const
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual OP_ERROR cookInputGroups(OP_Context &context, int alone=0)
double fpreal
Definition: SYS_Types.h:269
#define SOP_API
Definition: SOP_API.h:10
virtual void getDescriptiveParmName(UT_String &name) const
Definition: SOP_UVFuse.h:50
exint evalInt(int pi, int vi, fpreal t) const
virtual OP_ERROR cookMySop(OP_Context &context)=0