HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_ForEach.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_ForEach.h ( SOP Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __SOP_ForEach_h__
12 #define __SOP_ForEach_h__
13 
14 #include "SOP_API.h"
15 #include "SOP_Node.h"
16 
17 class UT_InfoTree;
18 
20 {
21 public:
22  SOP_ForEach(OP_Network *net, const char *name, OP_Operator *entry);
23  virtual ~SOP_ForEach();
24 
25  virtual bool updateParmsFlags();
26 
27  static OP_Node *myConstructor(OP_Network *net,
28  const char *name,
29  OP_Operator *entry);
30  static PRM_Template myTemplateList[];
31 
32  virtual void getNodeSpecificInfoText(OP_Context &context,
33  OP_NodeInfoParms &iparms);
34 
35  // Fill in tree with this node's details
36  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
37  const OP_NodeInfoTreeParms &parms);
38 
39  // Special methods used to get the feedback geometry from Each
40  // SOPs.
41  virtual bool hasFeedbackGeo() const;
42  virtual GU_DetailHandle getFeedbackGeo() const;
43 
44  // Registers all each sops that want to be told if the feedback
45  // geo changes.
46  virtual void registerEachSOP(SOP_Node *sop);
47  virtual void unregisterEachSOP(SOP_Node *sop);
48 
49  // Not currently supported even thought is technically a subnetwork.
50  virtual bool canCreateNewOpType() const { return false; }
51 
52  static const char *theChildTableName;
53 
54 protected:
55  virtual void childDeleted(OP_Node *);
56  virtual void childFlagChange(OP_Node *);
57 
58  virtual OP_ERROR cookMySop(OP_Context &context);
59 
60  virtual const char *inputLabel(unsigned idx) const;
61 
62  void buildStampListFromGroup(fpreal t,
63  UT_Vector3DArray &valuelist,
64  UT_StringArray &stringlist);
65  void buildStampListFromAttrib(fpreal t,
66  UT_Vector3DArray &valuelist,
67  UT_StringArray &stringlist);
68  UT_Vector3R buildStampListFromNumber(fpreal t);
69  void buildStampListFromPrimitive(fpreal t,
70  UT_Vector3DArray &valuelist,
71  UT_StringArray &stringlist);
72 
73  virtual void dirtyAllEachSOPs();
74 
76  { return evalInt("mergeresults", 0, t); }
77  void GROUPMASK(UT_String &str, fpreal t)
78  { evalString(str, "groupmask", 0, t); }
79  void ATTRIB(UT_String &str, fpreal t)
80  { evalString(str, "attrib", 0, t); }
81  float ATTRIBTOL(fpreal t)
82  { return evalFloat("attribtol", 0, t); }
83 
85  {
86  v.x() = evalFloat("numrange", 0, t);
87  v.y() = evalFloat("numrange", 1, t);
88  v.z() = evalFloat("numrange", 2, t);
89  }
90 
92  { return evalInt("usemaxiter", 0, t); }
93  int MAXITER(fpreal t)
94  { return evalInt("maxiter", 0, t); }
95 
96  int FORTYPE(fpreal t)
97  { return evalInt("fortype", 0, t); }
98  void FORSTAMP(UT_String &str, fpreal t)
99  { evalString(str, "forstamp", 0, t); }
101  { evalString(str, "foridxstamp", 0, t); }
102 
104  { return evalInt("eachpoint", 0, t); }
105 
107  { return evalInt("stopcondition", 0, t); }
108 
111  // Kept for info.
113 private:
114 };
115 
116 #endif
virtual bool updateParmsFlags()
GU_DetailHandle myFeedbackGeo
Definition: SOP_ForEach.h:109
bool STOPCONDITION(fpreal t)
Definition: SOP_ForEach.h:106
bool USEMAXITER(fpreal t)
Definition: SOP_ForEach.h:91
void ATTRIB(UT_String &str, fpreal t)
Definition: SOP_ForEach.h:79
const GLdouble * v
Definition: glcorearb.h:836
virtual const char * inputLabel(unsigned idx) const
fpreal evalFloat(int pi, int vi, fpreal t) const
UT_ErrorSeverity
Definition: UT_Error.h:25
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
virtual void childDeleted(OP_Node *)
void FORIDXSTAMP(UT_String &str, fpreal t)
Definition: SOP_ForEach.h:100
static const char * theChildTableName
Definition: SOP_ForEach.h:52
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
bool MERGERESULTS(fpreal t)
Definition: SOP_ForEach.h:75
float ATTRIBTOL(fpreal t)
Definition: SOP_ForEach.h:81
bool EACHPOINT(fpreal t)
Definition: SOP_ForEach.h:103
int myLastCookPasses
Definition: SOP_ForEach.h:112
virtual void childFlagChange(OP_Node *)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
void FORSTAMP(UT_String &str, fpreal t)
Definition: SOP_ForEach.h:98
void GROUPMASK(UT_String &str, fpreal t)
Definition: SOP_ForEach.h:77
void evalString(UT_String &val, int pi, int vi, fpreal t) const
int MAXITER(fpreal t)
Definition: SOP_ForEach.h:93
void NUMRANGE(UT_Vector3R &v, fpreal t)
Definition: SOP_ForEach.h:84
GLuint const GLchar * name
Definition: glcorearb.h:785
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
double fpreal
Definition: SYS_Types.h:270
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &iparms) override
virtual bool canCreateNewOpType() const
Definition: SOP_ForEach.h:50
UT_Set< int > myEachSOPList
Definition: SOP_ForEach.h:110
#define SOP_API
Definition: SOP_API.h:10
exint evalInt(int pi, int vi, fpreal t) const
int FORTYPE(fpreal t)
Definition: SOP_ForEach.h:96
virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms) override
Fill in tree with this SOP's details.
virtual OP_ERROR cookMySop(OP_Context &context)=0