HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_Fetch.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: OBJ_Fetch.h (Custom Library, C++)
7  *
8  * COMMENTS: An object to fetch it's transform from another object.
9  *
10  */
11 
12 #ifndef __OBJ_Fetch__
13 #define __OBJ_Fetch__
14 
15 #include "OBJ_API.h"
16 #include "OBJ_Geometry.h"
17 
19 {
24  I_FETCHINVERT, // invert fetched matrix
25 
27 };
28 
29 
31 {
32 public:
33  OBJ_Fetch(OP_Network *net,
34  const char *name,
35  OP_Operator *op);
36  ~OBJ_Fetch() override;
37 
38  OBJ_OBJECT_TYPE getObjectType() const override;
39 
41  {
42  evalString(str, "fetchobjpath",
44  0, 0.0f);
45  }
46  void setFETCHOBJPATH(const UT_String &str,
47  CH_StringMeaning meaning)
48  {
49  setString(str, meaning, "fetchobjpath",
51  0, 0.0f);
52  }
54  {
55  return evalInt("useinputofthis",
57  0, 0.0f);
58  }
59  void setUSEINPUTOFTHIS( bool flag )
60  {
61  setInt("useinputofthis",
63  0, 0.0f, flag);
64  }
66  {
67  return evalInt("useinputoffetched",
69  0, 0.0f);
70  }
71  void setUSEINPUTOFFETCHED( bool flag )
72  {
73  setInt("useinputoffetched",
75  0, 0.0f, flag);
76  }
78  {
79  return evalInt("fetchsubnet",
81  0, 0.0f);
82  }
83  void setFETCHSUBNET( int fetch_subnet )
84  {
85  setInt("fetchsubnet",
87  0, 0.0f, fetch_subnet );
88  }
89  bool FETCHINVERT()
90  {
91  return (bool) evalInt("invertfetched",
93  0, 0.0f);
94  }
95 
97  PRM_ParmList *obsolete_parms) override;
98 
99  static OP_Node *myConstructor(OP_Network *net,
100  const char *name,
101  OP_Operator *entry);
102 
103  static PRM_Template *getTemplateList();
104  static PRM_Template *getObsolete();
105 
106  OBJ_Fetch *castToOBJFetch() override { return this; }
107 
109  OP_Context &context,
110  OP_NodeInfoParms &iparms) override;
112  UT_InfoTree &tree,
113  const OP_NodeInfoTreeParms &parms
114  ) override;
115 
116 protected:
117  bool updateParmsFlags() override;
118 
119  // Used to get pointer to indirection indices for each object type
120  int *getIndirect() const override
121  { return fetchIndirect; }
122 
123  OP_ERROR cookMyObj(OP_Context &context) override;
124 
125 private:
126  static int *fetchIndirect;
127 };
128 
129 #endif
130 
void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &iparms) override
void setUSEINPUTOFTHIS(bool flag)
Definition: OBJ_Fetch.h:59
void setUSEINPUTOFFETCHED(bool flag)
Definition: OBJ_Fetch.h:71
CH_StringMeaning
OBJ_OBJECT_TYPE getObjectType() const override
int * getIndirect() const override
Definition: OBJ_Geometry.h:111
UT_ErrorSeverity
Definition: UT_Error.h:25
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
void setString(const UT_StringRef &val, CH_StringMeaning meaning, int parmi, int vectori, fpreal t)
void resolveObsoleteParms(PRM_ParmList *obsolete_parms) override
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
int * getIndirect() const override
Definition: OBJ_Fetch.h:120
OBJ_Fetch * castToOBJFetch() override
Definition: OBJ_Fetch.h:106
GLfloat f
Definition: glcorearb.h:1926
static PRM_Template * getObsolete()
void evalString(UT_String &val, int pi, int vi, fpreal t) const
bool FETCHINVERT()
Definition: OBJ_Fetch.h:89
virtual OP_ERROR cookMyObj(OP_Context &context)
GLuint const GLchar * name
Definition: glcorearb.h:786
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
int USEINPUTOFFETCHED()
Definition: OBJ_Fetch.h:65
int FETCHSUBNET()
Definition: OBJ_Fetch.h:77
void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms) override
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
void setFETCHSUBNET(int fetch_subnet)
Definition: OBJ_Fetch.h:83
void setInt(int parmi, int vectori, fpreal t, exint value)
bool updateParmsFlags() override
void setFETCHOBJPATH(const UT_String &str, CH_StringMeaning meaning)
Definition: OBJ_Fetch.h:46
void FETCHOBJPATH(UT_String &str)
Definition: OBJ_Fetch.h:40
exint evalInt(int pi, int vi, fpreal t) const
OBJ_FetchIndex
Definition: OBJ_Fetch.h:18
int USEINPUTOFTHIS()
Definition: OBJ_Fetch.h:53
#define OBJ_API
Definition: OBJ_API.h:10
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:73