41 using namespace HDK_Sample;
83 COP2_PixelAdd::COP2_PixelAdd(
OP_Network *parent,
90 COP2_PixelAdd::~COP2_PixelAdd() { }
95 namespace HDK_Sample {
100 { myAddend[0] =
r; myAddend[1] =
g; myAddend[2] =
b; myAddend[3] =
a; }
131 if(vals[0] && scope[0]) *vals[0] = *vals[0] + pf->myAddend[0];
132 if(vals[1] && scope[1]) *vals[1] = *vals[1] + pf->myAddend[1];
133 if(vals[2] && scope[2]) *vals[2] = *vals[2] + pf->myAddend[2];
134 if(vals[3] && scope[3]) *vals[3] = *vals[3] + pf->myAddend[3];
163 r = g = b = a = ADD(3, t) * effect;
168 r = ADD(0,t) * effect;
169 g = ADD(1,t) * effect;
170 b = ADD(2,t) * effect;
171 a = ADD(3,t) * effect;
178 COP2_PixelAdd::getOperationInfo()
188 info.
sprintf(
"Add (%g, %g, %g, %g)",
189 ADD(0,t)*effect, ADD(1,t)*effect,
190 ADD(2,t)*effect, ADD(3,t)*effect);
199 "HDK Sample Pixel Add",
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
void newCop2Operator(OP_OperatorTable *table)
static PRM_Template myTemplateList[]
COP2_PIXEL_OP_SWITCHER(1,"Sample Pixel Add")
static void addvec(RU_PixelFunction *f, float **vals, const bool *scope)
SYS_FORCE_INLINE const char * buffer() const
GLboolean GLboolean GLboolean GLboolean a
cop2_AddFunc(float r, float g, float b, float a)
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
static OP_VariablePair myVariablePair
PRM_API const PRM_Type PRM_RGB_J
RU_PixelFunction * addPixelFunction(const TIL_Plane *, int, float t, int, int, int thread) override
static const char * myInputLabels[]
static float add(RU_PixelFunction *pf, float val, int comp)
RUVectorFunc getVectorFunction() const override
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
GLenum GLenum GLsizei void * table
PRM_API const PRM_Type PRM_SWITCHER
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
static OP_TemplatePair myTemplatePair
bool needAllComponents() const override
PRM_API PRM_Default PRMoneDefaults[]
PRM_API PRM_Name PRMswitcherName
float getFrameScopeEffect(int image_index) override
static OP_TemplatePair myTemplatePair
static OP_VariablePair myVariablePair
RUPixelFunc getPixelFunction() const override
bool eachComponentDifferent() const override
void(* RUVectorFunc)(RU_PixelFunction *, float **, const bool *)
exint getImageIndex(double t, int clamp_range=1, int round_off=SEQUENCE_NEAREST) const
float(* RUPixelFunc)(RU_PixelFunction *, float, int)
bool isAlphaPlane() const