22#include <config_options.h>
26#include <osl/diagnose.h>
76 ip_double(
double fXVal,
double fXInc,
double fYVal,
double fYInc)
98 ip_triple(
double fXVal,
double fXInc,
double fYVal,
double fYInc,
double fZVal,
double fZInc)
114 #define SCANLINE_EMPTY_INDEX (0xffffffff)
135 aDeltaRed *= fInvYDelta;
146 aDeltaGreen *= fInvYDelta;
157 aDeltaBlue *= fInvYDelta;
171 double aDeltaX(rB.
getX() - rA.
getX());
179 aDeltaX *= fInvYDelta;
182 double aDeltaY(rB.
getY() - rA.
getY());
190 aDeltaY *= fInvYDelta;
193 double aDeltaZ(rB.
getZ() - rA.
getZ());
201 aDeltaZ *= fInvYDelta;
208 rA.
getZ(), aDeltaZ));
215 double aDeltaX(rB.
getX() - rA.
getX());
223 aDeltaX *= fInvYDelta;
226 double aDeltaY(rB.
getY() - rA.
getY());
234 aDeltaY *= fInvYDelta;
240 rA.
getY(), aDeltaY));
247 double fZDelta(fZEyeB - fZEyeA);
249 double fInvZEyeB(fInvZEyeA);
258 fZDelta = (fInvZEyeB - fInvZEyeA) * fInvYDelta;
261 const B2DPoint aInvA(rA * fInvZEyeA);
262 const B2DPoint aInvB(rB * fInvZEyeB);
263 const double aDeltaX((aInvB.
getX() - aInvA.
getX()) * fInvYDelta);
264 const double aDeltaY((aInvB.
getY() - aInvA.
getY()) * fInvYDelta);
268 aInvA.
getX(), aDeltaX,
269 aInvA.
getY(), aDeltaY,
270 fInvZEyeA, fZDelta));
308 RasterConversionLineEntry3D(
const double& rfX,
const double& rfDeltaX,
const double& rfZ,
const double& rfDeltaZ, sal_Int32 nY, sal_uInt32 nCount)
309 :
maX(rfX, rfDeltaX),
349 const double fStep(
static_cast<double>(nStep));
388 class UNLESS_MERGELIBS(BASEGFX_DLLPUBLIC) RasterConverter3D :
public InterpolatorProvider3D
392 ::std::vector< RasterConversionLineEntry3D > maLineEntries;
394 struct lineComparator
396 bool operator()(
const RasterConversionLineEntry3D* pA,
const RasterConversionLineEntry3D* pB)
398 OSL_ENSURE(pA && pB,
"lineComparator: empty pointer (!)");
399 return pA->getX().getVal() < pB->getX().getVal();
403 SAL_DLLPRIVATE
void addArea(
const B3DPolygon& rFill,
const B3DHomMatrix* pViewToEye);
404 SAL_DLLPRIVATE
void addArea(
const B3DPolyPolygon& rFill,
const B3DHomMatrix* pViewToEye);
405 SAL_DLLPRIVATE
void addEdge(
const B3DPolygon& rFill, sal_uInt32 a, sal_uInt32 b,
const B3DHomMatrix* pViewToEye);
407 SAL_DLLPRIVATE
void rasterconvertB3DArea(sal_Int32 nStartLine, sal_Int32 nStopLine);
408 SAL_DLLPRIVATE
void rasterconvertB3DEdge(
const B3DPolygon& rLine, sal_uInt32 nA, sal_uInt32 nB, sal_Int32 nStartLine, sal_Int32 nStopLine, sal_uInt16 nLineWidth);
410 virtual void processLineSpan(
const RasterConversionLineEntry3D& rA,
const RasterConversionLineEntry3D& rB, sal_Int32 nLine, sal_uInt32 nSpanCount) = 0;
414 virtual ~RasterConverter3D();
416 void rasterconvertB3DPolyPolygon(
const B3DPolyPolygon& rFill,
const B3DHomMatrix* pViewToEye, sal_Int32 nStartLine, sal_Int32 nStopLine);
417 void rasterconvertB3DPolygon(
const B3DPolygon& rLine, sal_Int32 nStartLine, sal_Int32 nStopLine, sal_uInt16 nLineWidth);
Base Point class with two double values.
Base Point class with three double values.
Base Color class with three double values.
::std::vector< ip_double > maTextureInterpolators
sal_uInt32 addColorInterpolator(const BColor &rA, const BColor &rB, double fInvYDelta)
::std::vector< ip_triple > maInverseTextureInterpolators
sal_uInt32 addNormalInterpolator(const B3DVector &rA, const B3DVector &rB, double fInvYDelta)
::std::vector< ip_triple > maColorInterpolators
::std::vector< ip_triple > & getNormalInterpolators()
::std::vector< ip_triple > maNormalInterpolators
::std::vector< ip_triple > & getInverseTextureInterpolators()
sal_uInt32 addInverseTextureInterpolator(const B2DPoint &rA, const B2DPoint &rB, double fZEyeA, double fZEyeB, double fInvYDelta)
::std::vector< ip_triple > & getColorInterpolators()
::std::vector< ip_double > & getTextureInterpolators()
sal_uInt32 addTextureInterpolator(const B2DPoint &rA, const B2DPoint &rB, double fInvYDelta)
void setColorIndex(sal_uInt32 nIndex)
void setTextureIndex(sal_uInt32 nIndex)
sal_uInt32 getColorIndex() const
sal_uInt32 mnInverseTextureIndex
RasterConversionLineEntry3D(const double &rfX, const double &rfDeltaX, const double &rfZ, const double &rfDeltaZ, sal_Int32 nY, sal_uInt32 nCount)
sal_uInt32 getInverseTextureIndex() const
bool operator<(const RasterConversionLineEntry3D &rComp) const
sal_uInt32 getTextureIndex() const
sal_uInt32 getNormalIndex() const
bool decrementRasterConversionLineEntry3D(sal_uInt32 nStep)
const ip_single & getZ() const
const ip_single & getX() const
void setInverseTextureIndex(sal_uInt32 nIndex)
sal_uInt32 mnTextureIndex
void incrementRasterConversionLineEntry3D(sal_uInt32 nStep, InterpolatorProvider3D &rProvider)
void setNormalIndex(sal_uInt32 nIndex)
TYPE getX() const
Get X-Coordinate of 2D Tuple.
TYPE getY() const
Get Y-Coordinate of 2D Tuple.
TYPE getX() const
Get X-Coordinate of 3D Tuple.
TYPE getZ() const
Get Z-Coordinate of 3D Tuple.
TYPE getY() const
Get Y-Coordinate of 3D Tuple.
const ip_single & getY() const
ip_double(double fXVal, double fXInc, double fYVal, double fYInc)
void increment(double fStep)
const ip_single & getX() const
void increment(double fStep)
ip_single(double fVal, double fInc)
void increment(double fStep)
ip_triple(double fXVal, double fXInc, double fYVal, double fYInc, double fZVal, double fZInc)
const ip_single & getZ() const
const ip_single & getY() const
const ip_single & getX() const
#define SCANLINE_EMPTY_INDEX