HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Creep.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: GU_Creep.h (C++)
7  *
8  * COMMENTS: Paramters used in creep sop
9  *
10  */
11 
12 #ifndef __GU_Creep_h__
13 #define __GU_Creep_h__
14 
15 #include "GU_API.h"
16 #include <SYS/SYS_Types.h>
17 #include <UT/UT_Vector3.h>
18 #include <UT/UT_String.h>
19 #include <UT/UT_ValArray.h>
20 
21 class gu_CreepAttribMap;
22 class GA_PointGroup;
23 class GEO_Primitive;
24 class GU_Detail;
25 
27 {
28 public:
29  GU_CreepParms();
30  ~GU_CreepParms();
31 
33  {
37  GU_MUL_ATTRIB
38  };
39 
40  // Patterns for attribute copying from path to crept geometry. The
41  // various attributes will only affect the point attributes of the
42  // crept geometry. Note that the path detail must be set before
43  // these methods are called.
44  void setPointAttrib(const char *pattern, GU_AttribOp op);
45  void setPrimAttrib(const char *pattern, GU_AttribOp op);
46  void setVertexAttrib(const char *pattern, GU_AttribOp op);
47 
48  // Clear all stored attribute mappings.
49  void clearAttribMaps();
50 
52  { myT.assign(x, y, z); }
54  { myR.assign(x, y, z); }
56  { myS.assign(x, y, z); }
58  { myP.assign(x, y, z); }
59 
60  void identity()
61  {
62  setT(0, 0, 0);
63  setR(0, 0, 0);
64  setS(1, 1, 1);
65  setP(0, 0, 0);
66  }
67 
68  const UT_Vector3 &getT() const { return myT; }
69  const UT_Vector3 &getR() const { return myR; }
70  const UT_Vector3 &getS() const { return myS; }
71  const UT_Vector3 &getP() const { return myP; }
72 
73  void setUVAttribute(const char *name)
74  { myUVAttrib.harden(name); }
75 
76  bool doInitFill() const { return myInitFill; }
77  bool doInitUndistort() const { return myInitUndistort; }
78 
79  void setInitFill(bool f) { myInitFill = f; }
80  void setInitUndistort(bool f) { myInitUndistort = f; }
81 
82  void setSource(const GU_Detail *g) { mySourceGdp = g; }
83  void setSourceGroup(const GA_PointGroup *g) { mySourceGroup = g; }
84  void setPath(const GU_Detail *g) { myPathGdp = g; }
85  void setPathPrim(const GEO_Primitive *p) { myPathPrim = p; }
86 
87  const GU_Detail *getSource() const { return mySourceGdp; }
88  const GA_PointGroup *getSourceGroup() const { return mySourceGroup; }
89 
90  const GU_Detail *getPath() const { return myPathGdp; }
91  const GEO_Primitive *getPathPrim() const { return myPathPrim; }
92 
93 private:
94  const GU_Detail *myPathGdp;
95  const GEO_Primitive *myPathPrim;
96  const GU_Detail *mySourceGdp;
97  const GA_PointGroup *mySourceGroup;
98 
99  UT_Vector3 myT, myR, myS, myP;
103  UT_String myUVAttrib;
104  bool myInitFill;
105  bool myInitUndistort;
106 
107  friend class GU_Detail;
108 };
109 
110 #endif
void setR(fpreal x, fpreal y, fpreal z)
Definition: GU_Creep.h:53
void setSourceGroup(const GA_PointGroup *g)
Definition: GU_Creep.h:83
void setT(fpreal x, fpreal y, fpreal z)
Definition: GU_Creep.h:51
void identity()
Definition: GU_Creep.h:60
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
GLboolean GLboolean g
Definition: glcorearb.h:1222
const GU_Detail * getSource() const
Definition: GU_Creep.h:87
const GU_Detail * getPath() const
Definition: GU_Creep.h:90
GLint y
Definition: glcorearb.h:103
void setS(fpreal x, fpreal y, fpreal z)
Definition: GU_Creep.h:55
void setPath(const GU_Detail *g)
Definition: GU_Creep.h:84
const UT_Vector3 & getR() const
Definition: GU_Creep.h:69
const UT_Vector3 & getT() const
Definition: GU_Creep.h:68
GLfloat f
Definition: glcorearb.h:1926
void setP(fpreal x, fpreal y, fpreal z)
Definition: GU_Creep.h:57
bool doInitFill() const
Definition: GU_Creep.h:76
const UT_Vector3 & getS() const
Definition: GU_Creep.h:70
void setPathPrim(const GEO_Primitive *p)
Definition: GU_Creep.h:85
void setInitFill(bool f)
Definition: GU_Creep.h:79
#define GU_API
Definition: GU_API.h:14
GLuint const GLchar * name
Definition: glcorearb.h:786
void setSource(const GU_Detail *g)
Definition: GU_Creep.h:82
void setInitUndistort(bool f)
Definition: GU_Creep.h:80
GLushort pattern
Definition: glad.h:2583
GLint GLenum GLint x
Definition: glcorearb.h:409
const GA_PointGroup * getSourceGroup() const
Definition: GU_Creep.h:88
const GEO_Primitive * getPathPrim() const
Definition: GU_Creep.h:91
const UT_Vector3 & getP() const
Definition: GU_Creep.h:71
fpreal64 fpreal
Definition: SYS_Types.h:277
void setUVAttribute(const char *name)
Definition: GU_Creep.h:73
bool doInitUndistort() const
Definition: GU_Creep.h:77