Esempio n. 1
0
void TranslateOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
	ensureDelta();

	float originalXPos = x - this->getDeltaX();
	float originalYPos = y - this->getDeltaY();

	this->m_inputOperation->read(output, originalXPos, originalYPos, sampler);
}
bool TranslateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
	ensureDelta();
	rcti newInput;
	
	newInput.xmax = input->xmax - this->getDeltaX();
	newInput.xmin = input->xmin - this->getDeltaX();
	newInput.ymax = input->ymax - this->getDeltaY();
	newInput.ymin = input->ymin - this->getDeltaY();
	
	return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
void TranslateOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
	ensureDelta();
	this->m_inputOperation->read(output, x - this->getDeltaX(), y - this->getDeltaY(), sampler);
}