HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_Sticky.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_Sticky.h (Custom Library, C++)
7  *
8  * COMMENTS: An object to fetch it's transform from another object.
9  *
10  */
11 
12 #ifndef __OBJ_Sticky__
13 #define __OBJ_Sticky__
14 
15 #include "OBJ_API.h"
16 #include <UT/UT_Vector2.h>
17 #include <UT/UT_Vector3Array.h>
18 #include <GU/GU_DetailHandle.h>
19 #include "OBJ_StickyShared.h"
20 
22 {
26 
28 };
29 
30 class obj_UVCache;
31 class GEO_Vertex;
32 class GEO_Hull;
33 
35 {
36 public:
38  const char *name,
39  OP_Operator *op);
40 
42 
43  static OP_Node *myConstructor(OP_Network *net,
44  const char *name,
45  OP_Operator *entry);
46 
47  static PRM_Template *getTemplateList();
48 
49  // 2d transform code:
50  virtual bool get2DWorldTransform(UT_DMatrix4 &mat,
51  OP_Context &context);
52 
53  virtual OBJ_Sticky *castToOBJSticky() { return this; }
54 
55  virtual void STICKYGEOPATH(UT_String &str, fpreal t)
56  {
57  evalString(str, "stickysop", 0, t);
58  }
59  virtual void STICKYUV(UT_Vector2R &uv, fpreal t)
60  {
61  uv.x() = evalFloat("stickyuv", 0, t);
62  uv.y() = evalFloat("stickyuv", 1, t);
63  }
64  virtual fpreal STICKYROT(fpreal t)
65  {
66  return evalFloat("stickyrot", 0, t);
67  }
68 
70  CH_StringMeaning meaning, fpreal t)
71  {
72  setString(str, meaning, "stickysop", 0, t);
73  }
74  void setSTICKYUV(const UT_Vector2R &uv, fpreal t)
75  {
76  setFloat("stickyuv", 0, t, uv.x());
77  setFloat("stickyuv", 1, t, uv.y());
78  }
79 
80 protected:
81  virtual void getUV(UT_Vector2R &uv, OP_Context &context);
82 
83  // Used to get pointer to indirection indices for each object type
84  virtual int *getIndirect() const
85  { return stickyIndirect; }
86 
87  static int *stickyIndirect;
88 
89 };
90 #endif
91 
OBJ_StickyIndex
Definition: OBJ_Sticky.h:21
static PRM_Template * getTemplateList()
virtual fpreal STICKYROT(fpreal t)
Definition: OBJ_Sticky.h:64
GA_API const UT_StringHolder uv
CH_StringMeaning
fpreal evalFloat(int pi, int vi, fpreal t) const
T & x(void)
Definition: UT_Vector2.h:285
void setString(const UT_StringRef &val, CH_StringMeaning meaning, int parmi, int vectori, fpreal t)
2D Vector class.
Definition: UT_Vector2.h:138
void setSTICKYGEOPATH(UT_String &str, CH_StringMeaning meaning, fpreal t)
Definition: OBJ_Sticky.h:69
virtual bool get2DWorldTransform(UT_DMatrix4 &mat, OP_Context &context)
void evalString(UT_String &val, int pi, int vi, fpreal t) const
virtual void STICKYUV(UT_Vector2R &uv, fpreal t)
Definition: OBJ_Sticky.h:59
static int * stickyIndirect
Definition: OBJ_Sticky.h:87
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual int * getIndirect() const
Definition: OBJ_Sticky.h:84
void setSTICKYUV(const UT_Vector2R &uv, fpreal t)
Definition: OBJ_Sticky.h:74
double fpreal
Definition: SYS_Types.h:270
void setFloat(int parmi, int vectori, fpreal t, fpreal value, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
T & y(void)
Definition: UT_Vector2.h:287
virtual OBJ_Sticky * castToOBJSticky()
Definition: OBJ_Sticky.h:53
virtual void getUV(UT_Vector2R &uv, OP_Context &context)
#define OBJ_API
Definition: OBJ_API.h:10
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
virtual void STICKYGEOPATH(UT_String &str, fpreal t)
Definition: OBJ_Sticky.h:55