HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
COP2_TransformParms.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: COP2_Node.h
7  *
8  * COMMENTS:
9  * Defines a transformation class, which allows transforms to be
10  * collapsed into 1 transform.
11  */
12 #ifndef COP2_TRANSFORM_PARMS_H
13 #define COP2_TRANSFORM_PARMS_H
14 
15 #include "COP2_API.h"
16 #include <UT/UT_XformOrder.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <UT/UT_FilterType.h>
19 #include <RU/RU_FilterArea.h>
20 
22 {
23 public:
24  COP2_TransformParms(float tx = 0.0f, float ty = 0.0f, float rot = 0.0f,
25  float sx = 1.0f, float sy = 1.0f,
26  float px = 0.0f, float py = 0.0f,
29  float filtersize = 1.0f,
31  : myRot(rot),
32  mySX(sx),mySY(sy),
33  myTX(tx),myTY(ty),
34  myPX(px),myPY(py),
35  myFilterSizeX(filtersize), myFilterSizeY(filtersize),
36  myFilterX(filter), myFilterY(filter),
37  myOrder(order),
38  myWrapX(wrap), myWrapY(wrap),
39  myCombinedTransform(0),
40  myConstant(false), myUseBlur(false), myBlur(0.0f),
41  myBias(0.0f), mySegments(8) {}
42 
45 
47  { return (myFilterX == parms.myFilterX &&
48  myFilterY == parms.myFilterY &&
49  myFilterSizeX == parms.myFilterSizeX &&
50  myFilterSizeY == parms.myFilterSizeY &&
51  myWrapX == parms.myWrapX &&
52  myWrapY == parms.myWrapY &&
53  (myConstant || parms.myConstant ||
54  (myUseBlur == parms.myUseBlur &&
55  (!myUseBlur || (myBlur == parms.myBlur &&
56  myBias == parms.myBias &&
57  mySegments == parms.mySegments))))); }
58 
59  bool collapseTransform(const COP2_TransformParms &parms);
60 
61  void convertToMatrix();
62 
63  // Return the matrix representing our transform parameters.
64  void getMatrix(UT_Matrix4 &) const;
65 
66  // Return the inverse of the matrix representing our transform parameters
67  void getInverseMatrix(UT_Matrix4 &mat) const;
68 
69  // public Data
70  float myRot;
71  float mySX, mySY;
72  float myTX, myTY;
73  float myPX, myPY;
74  float myFilterSizeX, myFilterSizeY;
79 
80  bool myConstant;
81  bool myUseBlur;
82  float myBlur;
83  float myBias;
85 };
86 
87 #endif
UT_Matrix4 * myCombinedTransform
int myOrder
Definition: GT_CurveEval.h:263
GA_API const UT_StringHolder rot
UT_FilterType
Definition: UT_FilterType.h:16
RU_FILTER_WRAP
Definition: RU_FilterArea.h:49
GLfloat f
Definition: glcorearb.h:1925
bool isCompatibleWith(const COP2_TransformParms &parms)
IFDmantra py
Definition: HDK_Image.dox:266
#define COP2_API
Definition: COP2_API.h:10
COP2_TransformParms(float tx=0.0f, float ty=0.0f, float rot=0.0f, float sx=1.0f, float sy=1.0f, float px=0.0f, float py=0.0f, UT_XformOrder::rstOrder order=UT_XformOrder::TRS, UT_FilterType filter=UT_FILTER_BOX, float filtersize=1.0f, RU_FILTER_WRAP wrap=RU_FILTER_BORDER)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glcorearb.h:1296