HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
COP2_PixelFunction.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_PixelFunction.h
7  *
8  * COMMENTS:
9  * Data class which manages pixel function lists between COPs.
10  */
11 #ifndef _COP2_PIXEL_FUNCTION_H_
12 #define _COP2_PIXEL_FUNCTION_H_
13 
14 #include "COP2_API.h"
15 #include <UT/UT_String.h>
16 
17 class COP2_Node;
18 class RU_PixelFunction;
19 
21 {
22 public:
23  // Set up with specific function conditions.
24  COP2_PixelFunction(COP2_Node *masknode,
25  int maskplane,
26  int maskindex,
27  bool in_unpremult,
28  float effect);
30 
31  // returns true if the scope & mask COP are the same.
32  bool isCompatibleWith(COP2_Node *masknode,
33  int maskplane,
34  int maskindex,
35  bool inunpremult,
36  float effect) const;
37 
38  // prepends the function to the function list. Only do if the above
39  // function returns true!
40  void addFunction(RU_PixelFunction *func,
41  COP2_Node *fornode,
42  int input_index,
43  bool mask[4]);
44 
45  // Needed for evaluation when all functions are added.
46  COP2_Node *getFirstNode() const { return myFirstNode; }
47  int getNodeInput() const { return myInputIndex; }
48  RU_PixelFunction *getFunction() const { return myFunction; }
49  bool isInUnpremult() const { return myInUnpremult; }
50 
51 private:
52  // Pixel function conditions
53  COP2_Node *myMask;
54  int myMaskPlane;
55  int myMaskIndex;
56 
57  // Pixel function information
58  COP2_Node *myFirstNode;
59  int myInputIndex;
60  RU_PixelFunction *myFunction;
61  bool myInUnpremult;
62  float myEffect;
63 };
64 
65 #endif
GLint GLuint mask
Definition: glcorearb.h:124
COP2_Node * getFirstNode() const
RU_PixelFunction * getFunction() const
GLenum func
Definition: glcorearb.h:783
#define COP2_API
Definition: COP2_API.h:10
bool isInUnpremult() const
int getNodeInput() const