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