HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
COP2_MultiInputWipe.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018
3  * Side Effects Software Inc. All rights reserved.
4  *
5  * Redistribution and use of Houdini Development Kit samples in source and
6  * binary forms, with or without modification, are permitted provided that the
7  * following conditions are met:
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  * 2. The name of Side Effects Software may not be used to endorse or
11  * promote products derived from this software without specific prior
12  * written permission.
13  *
14  * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE `AS IS' AND ANY EXPRESS
15  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17  * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
18  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
20  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  *
25  *----------------------------------------------------------------------------
26  * Sample multi-input wipe COP
27  */
28 #ifndef _COP2_COP2_MultiInputWipe_H_
29 #define _COP2_COP2_MultiInputWipe_H_
30 
31 #include <COP2/COP2_MultiBase.h>
32 
33 namespace HDK_Sample {
34 
36 {
37 public:
38  // For the output area (an area of a plane belonging to this node)
39  // and a set of input areas, determine which input areas and which
40  // parts of these areas are needed to cook the output area.
42  COP2_CookAreaInfo &output_area,
43  const COP2_CookAreaList &input_areas,
44  COP2_CookAreaList &needed_areas);
45 
46  static OP_Node *myConstructor(OP_Network*, const char *,
47  OP_Operator *);
52  static const char * myInputLabels[];
53 
54 protected:
55  virtual ~COP2_MultiInputWipe();
56  virtual COP2_ContextData *newContextData(const TIL_Plane *p,
57  int array_index,
58  float t,
59  int xres, int yres,
60  int thread,
61  int max_threads);
62 
63  virtual void computeImageBounds(COP2_Context &context);
64  virtual OP_ERROR cookMyTile(COP2_Context &context,TIL_TileList *tiles);
65 
66 
67  virtual void passThroughTiles(COP2_Context &context,
68  const TIL_Plane *plane,
69  int array_index,
70  float t,
71  int xstart, int ystart,
72  TIL_TileList *&tile,
73  int block = 1,
74  bool *mask = 0,
75  bool *blocked = 0);
76 
77  virtual int passThrough(COP2_Context &context,
78  const TIL_Plane *plane, int comp_index,
79  int array_index, float t,
80  int xstart, int ystart);
81 
82 private:
83 
84  COP2_MultiInputWipe(OP_Network *parent, const char *name,
85  OP_Operator *entry);
86 
87  void boostAndBlur(TIL_TileList *tiles, TIL_Region *input,
88  float fade, float dip, int rad, float blur,
89  bool add);
90 };
91 
92 } // End HDK_Sample namespace
93 #endif
virtual COP2_ContextData * newContextData(const TIL_Plane *p, int array_index, float t, int xres, int yres, int thread, int max_threads)
virtual int passThrough(COP2_Context &context, const TIL_Plane *plane, int comp_index, int array_index, float t, int xstart, int ystart)
static const char * myInputLabels[]
GLint GLuint mask
Definition: glcorearb.h:123
UT_ErrorSeverity
Definition: UT_Error.h:25
virtual void getInputDependenciesForOutputArea(COP2_CookAreaInfo &output_area, const COP2_CookAreaList &input_areas, COP2_CookAreaList &needed_areas)
virtual void computeImageBounds(COP2_Context &context)
static OP_TemplatePair myTemplatePair
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual OP_ERROR cookMyTile(COP2_Context &context, TIL_TileList *tiles)
virtual void passThroughTiles(COP2_Context &context, const TIL_Plane *plane, int array_index, float t, int xstart, int ystart, TIL_TileList *&tile, int block=1, bool *mask=0, bool *blocked=0)
static OP_VariablePair myVariablePair
static PRM_Template myTemplateList[]
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
static CH_LocalVariable myVariableList[]