48 using namespace HDK_Sample;
92 COP2_FullImageFilter::COP2_FullImageFilter(
OP_Network *parent,
114 float t,
int xres,
int ,
177 input_areas, needed_areas);
191 input_areas, needed_areas);
249 alphaplane.setScoped(1);
284 memset(odata, 0, context.
myXsize*context.
myYsize *
sizeof(
float));
291 for(y=0; y<context.
myYsize; y++)
292 for(x=0; x<context.
myXsize; x++)
294 float *pix = (
float *) idata;
295 float *out = (
float *) odata;
297 unsigned seed = x * context.
myYsize +
y;
298 float dx = SYSrandomZero(seed);
299 float dy = SYSrandomZero(seed);
312 if(nx < 0 || nx >= context.
myXsize ||
317 out += (nx+ny*context.
myXsize);
342 "HDK Full Image Filter",
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
virtual void setDefaultScope(bool color, bool alpha, const char *others)
static OP_TemplatePair myTemplatePair
OP_ERROR error() override
OP_ERROR cookFullImage(COP2_Context &context, TIL_TileList *tiles, COP2_FullImageCB callback, UT_Lock &fullimagelock, bool use_float)
~COP2_FullImageFilter() override
static OP_TemplatePair myTemplatePair
void setImageBounds(int x1, int y1, int x2, int y2)
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
OP_ERROR doCookMyTile(COP2_Context &context, TIL_TileList *tiles) override
static OP_VariablePair myVariablePair
void computeImageBounds(COP2_Context &context) override
void * getImageData(int index)
static const char * myInputLabels[]
const char * getName() const
OP_ERROR filterImage(COP2_Context &context, const TIL_Region *input, TIL_Region *output)
static OP_ERROR filter(COP2_Context &context, const TIL_Region *input, TIL_Region *output, COP2_Node *me)
static PRM_Template myTemplateList[]
float getXScaleFactor(int xres) const
#define PLANE_MAX_VECTOR_SIZE
COP2_ContextData * data()
GLfloat GLfloat GLfloat alpha
GLuint const GLchar * name
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
void newCop2Operator(OP_OperatorTable *table)
COP2_MASK_SWITCHER(1,"Sample Full Image Filter")
PRM_API const PRM_Type PRM_FLT_J
fpreal32 SYSrint(fpreal32 val)
GLenum GLenum GLsizei void * table
PRM_API const PRM_Type PRM_SWITCHER
void releaseRegion(TIL_Region *, int output=0)
PRM_API PRM_Name PRMswitcherName
void getMaskDependency(COP2_CookAreaInfo &output_area, const COP2_CookAreaList &input_areas, COP2_CookAreaList &needed_areas)
const TIL_Plane & getPlane() const
TIL_Region * inputRegion(int input_index, COP2_Context &context, const TIL_Plane *plane, int array_index, float t, int xstart, int ystart, int xend, int yend, TIL_RegionExtend hold=TIL_BLACK, int share=1, void *regionmem[PLANE_MAX_VECTOR_SIZE]=0, bool correct_aspect=true, bool correct_bounds=true, int scan_alignment=0)
float getFrameScopeEffect(int image_index) override
int getArrayIndex() const
static OP_VariablePair myVariablePair
void setFormat(TIL_DataFormat format)
COP2_CookAreaInfo * makeOutputAreaDependOnInputPlane(int input, const char *planename, int array_index, float t, const COP2_CookAreaList &input_areas, COP2_CookAreaList &needed_areas)
TIL_Plane * getPlane(int index)
static const char * getAlphaPlaneName()
exint getImageIndex(double t, int clamp_range=1, int round_off=SEQUENCE_NEAREST) const
void getInputDependenciesForOutputArea(COP2_CookAreaInfo &output_area, const COP2_CookAreaList &input_areas, COP2_CookAreaList &needed_areas) override
bool enlargeNeededAreaToBounds()
GA_API const UT_StringHolder area
COP2_ContextData * newContextData(const TIL_Plane *p, int array_index, float t, int xres, int yres, int thread, int max_threads) override