HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
COP2_MultiInputWipe.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021
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) override;
45 
46  static OP_Node *myConstructor(OP_Network*, const char *,
47  OP_Operator *);
52  static const char * myInputLabels[];
53 
54 protected:
55  ~COP2_MultiInputWipe() override;
56 
58  int array_index,
59  float t,
60  int xres, int yres,
61  int thread,
62  int max_threads) override;
63 
64  void computeImageBounds(COP2_Context &context) override;
66  TIL_TileList *tiles) override;
67 
68 
70  const TIL_Plane *plane,
71  int array_index,
72  float t,
73  int xstart, int ystart,
74  TIL_TileList *&tile,
75  int block = 1,
76  bool *mask = 0,
77  bool *blocked = 0) override;
78 
80  const TIL_Plane *plane, int comp_index,
81  int array_index, float t,
82  int xstart, int ystart) override;
83 
84 private:
85 
86  COP2_MultiInputWipe(OP_Network *parent, const char *name,
87  OP_Operator *entry);
88 
89  void boostAndBlur(TIL_TileList *tiles, TIL_Region *input,
90  float fade, float dip, int rad, float blur,
91  bool add);
92 };
93 
94 } // End HDK_Sample namespace
95 #endif
GLenum GLenum GLenum input
Definition: glew.h:13879
GLuint const GLchar * name
Definition: glew.h:1814
static const char * myInputLabels[]
UT_ErrorSeverity
Definition: UT_Error.h:25
GLenum GLint GLuint mask
Definition: glew.h:1845
void computeImageBounds(COP2_Context &context) override
static OP_TemplatePair myTemplatePair
OP_ERROR cookMyTile(COP2_Context &context, TIL_TileList *tiles) override
*Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
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) override
static OP_VariablePair myVariablePair
GLfloat GLfloat p
Definition: glew.h:16321
static PRM_Template myTemplateList[]
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
COP2_ContextData * newContextData(const TIL_Plane *p, int array_index, float t, int xres, int yres, int thread, int max_threads) override
void getInputDependenciesForOutputArea(COP2_CookAreaInfo &output_area, const COP2_CookAreaList &input_areas, COP2_CookAreaList &needed_areas) override
int passThrough(COP2_Context &context, const TIL_Plane *plane, int comp_index, int array_index, float t, int xstart, int ystart) override
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLdouble GLdouble t
Definition: glew.h:1398
static CH_LocalVariable myVariableList[]