bool TGeometryFx::doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info) { TRasterFxPort *input = dynamic_cast<TRasterFxPort *>(getInputPort(0)); assert(input); if (input->isConnected()) { TRasterFxP fx = input->getFx(); assert(fx); bool ret = fx->doGetBBox(frame, bBox, info); if (getActiveTimeRegion().contains(frame)) bBox = getPlacement(frame) * bBox; return ret; } else { bBox = TRectD(); return false; } return true; };
void TGeometryFx::doCompute(TTile &tile, double frame, const TRenderSettings &ri) { TRasterFxPort *input = dynamic_cast<TRasterFxPort *>(getInputPort(0)); assert(input); if (!input->isConnected()) return; if (!getActiveTimeRegion().contains(frame)) { TRasterFxP(input->getFx())->compute(tile, frame, ri); return; } if (!TRaster32P(tile.getRaster()) && !TRaster64P(tile.getRaster())) throw TException("AffineFx unsupported pixel type"); TAffine aff1 = getPlacement(frame); TRenderSettings ri2(ri); ri2.m_affine = ri2.m_affine * aff1; TRasterFxP src = getInputPort("source")->getFx(); src->compute(tile, frame, ri2); return; }