| #pragma once |
| |
| |
| |
| |
| |
| |
| |
| #ifndef IWA_PERSPECTIVE_DISTORT_H |
| #define IWA_PERSPECTIVE_DISTORT_H |
| |
| #include "tfxparam.h" |
| #include "stdfx.h" |
| #include "tparamset.h" |
| |
| struct float4 { |
| float x, y, z, w; |
| }; |
| |
| class Iwa_PerspectiveDistortFx : public TStandardRasterFx |
| { |
| FX_PLUGIN_DECLARATION(Iwa_PerspectiveDistortFx) |
| protected: |
| TRasterFxPort m_source; |
| |
| TPointParamP m_vanishingPoint; |
| TPointParamP m_anchorPoint; |
| |
| TDoubleParamP m_precision; |
| |
| |
| template <typename RASTER, typename PIXEL> |
| void setOutputRaster(float4 *srcMem, |
| const RASTER dstRas, |
| TDimensionI dim, |
| int drawLevel); |
| |
| |
| template <typename RASTER, typename PIXEL> |
| void setSourceRaster(const RASTER srcRas, |
| float4 *dstMem, |
| TDimensionI dim); |
| |
| public: |
| Iwa_PerspectiveDistortFx(); |
| |
| bool doGetBBox( |
| double frame, TRectD &bBox, const TRenderSettings &info); |
| |
| bool canHandle( |
| const TRenderSettings &info, double frame); |
| |
| void doCompute( |
| TTile &tile, double frame, const TRenderSettings &rend_sets); |
| |
| void doCompute_CPU(TTile &tile, |
| const double frame, |
| const TRenderSettings &settings, |
| TPointD &vanishingPoint, |
| TPointD &anchorPoint, |
| float4 *source_host, |
| float4 *result_host, |
| TDimensionI &sourceDim, |
| TDimensionI &resultDim, |
| const double precision, |
| const double offs); |
| |
| void getParamUIs(TParamUIConcept *&concepts, int &length); |
| }; |
| |
| #endif |