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  virtual ~OBJ_Fetch();
37 
38  virtual OBJ_OBJECT_TYPE getObjectType() const;
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  }
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 
96  virtual void resolveObsoleteParms(
97  PRM_ParmList *obsolete_parms);
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  virtual OBJ_Fetch *castToOBJFetch() { return this; }
107 
108  virtual void getNodeSpecificInfoText(OP_Context &context,
109  OP_NodeInfoParms &iparms);
110  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
111  const OP_NodeInfoTreeParms &parms);
112 
113 protected:
114  virtual bool updateParmsFlags();
115 
116  // Used to get pointer to indirection indices for each object type
117  virtual int *getIndirect() const
118  { return fetchIndirect; }
119 
120  virtual OP_ERROR cookMyObj(OP_Context &context);
121 
122 private:
123  static int *fetchIndirect;
124 };
125 
126 #endif
127 
void setUSEINPUTOFTHIS(bool flag)
Definition: OBJ_Fetch.h:59
void setUSEINPUTOFFETCHED(bool flag)
Definition: OBJ_Fetch.h:71
CH_StringMeaning
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &iparms) override
virtual void resolveObsoleteParms(PRM_ParmList *obsolete_parms)
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)
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
virtual int * getIndirect() const
Definition: OBJ_Fetch.h:117
GLfloat f
Definition: glcorearb.h:1925
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)
virtual int * getIndirect() const
Definition: OBJ_Geometry.h:106
GLuint const GLchar * name
Definition: glcorearb.h:785
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
int USEINPUTOFFETCHED()
Definition: OBJ_Fetch.h:65
virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms) override
int FETCHSUBNET()
Definition: OBJ_Fetch.h:77
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)
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
virtual OBJ_OBJECT_TYPE getObjectType() const
png_infop png_uint_32 flag
Definition: png.h:2242
#define OBJ_API
Definition: OBJ_API.h:10
virtual OBJ_Fetch * castToOBJFetch()
Definition: OBJ_Fetch.h:106
virtual bool updateParmsFlags() override
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:71