107 double fOpacity(1.0);
147 rColor *= aBlendColor;
271 if(nSpanCount & 0x0001)
298 const double fNewZ(std::clamp(
maIntZ.
getVal(), 0.0, 65535.0));
299 const sal_uInt16 nNewZ(
static_cast< sal_uInt16
>(fNewZ));
305 const sal_uInt16 nOpacity(std::max(sal_Int16(0),
static_cast< sal_Int16
>(
decideColorAndOpacity(aNewColor) * 255.0)));
312 if(nOpacity >= 0x00ff)
326 const sal_uInt16 nTransparence(255 - nOpacity);
327 rDest.
setRed(
static_cast<sal_uInt8>(((rDest.
getRed() * nTransparence) + (
static_cast<sal_uInt16
>(255.0 * aNewColor.
getRed()) * nOpacity)) >> 8));
329 rDest.
setBlue(
static_cast<sal_uInt8>(((rDest.
getBlue() * nTransparence) + (
static_cast<sal_uInt16
>(255.0 * aNewColor.
getBlue()) * nOpacity)) >> 8));
379 std::shared_ptr< drawinglayer::texture::GeoTexSvx > pGeoTexSvx,
380 std::shared_ptr< drawinglayer::texture::GeoTexSvx > pTransparenceGeoTexSvx,
385 bool bSimpleTextureActive,
450 aTransform.
scale(fScaleDown, fScaleDown, 1.0);
458 aTransform.
scale(fScaleUp, fScaleUp, 1.0);
504 sal_uInt16 nAntiAlialize,
505 double fFullViewSizeX,
506 double fFullViewSizeY,
508 sal_uInt32 nStartLine,
509 sal_uInt32 nStopLine)
511 mnAntiAlialize(nAntiAlialize),
512 mnStartLine(nStartLine),
513 mnStopLine(nStopLine)
529 aDeviceToView.
scale(0.5, -0.5, -0.5);
546 const double fMaxZDepth(65533.0);
552 aDeviceToView.
scale(fFullViewSizeX, fFullViewSizeY, fMaxZDepth);
588 OSL_FAIL(
"ZBufferProcessor3D: destructed, but there are unrendered transparent geometries. Use ZBufferProcessor3D::finish() to render these (!)");
606 for(sal_uInt32
a(0);
a < nSize;
a++)
const ::rtl::Reference< IEventProcessor > & rProcessor
const std::shared_ptr< drawinglayer::texture::GeoTexSvx > & getTransparenceGeoTexSvx() const
drawinglayer::attribute::MaterialAttribute3D maMaterial
RasterPrimitive3D(std::shared_ptr< drawinglayer::texture::GeoTexSvx > pGeoTexSvx, std::shared_ptr< drawinglayer::texture::GeoTexSvx > pTransparenceGeoTexSvx, const drawinglayer::attribute::MaterialAttribute3D &rMaterial, const basegfx::B3DPolyPolygon &rPolyPolygon, bool bModulate, bool bFilter, bool bSimpleTextureActive, bool bIsLine)
bool getSimpleTextureActive() const
const basegfx::B3DPolyPolygon & getPolyPolygon() const
std::shared_ptr< drawinglayer::texture::GeoTexSvx > mpGeoTexSvx
basegfx::B3DPolyPolygon maPolyPolygon
bool operator<(const RasterPrimitive3D &rComp) const
const std::shared_ptr< drawinglayer::texture::GeoTexSvx > & getGeoTexSvx() const
bool mbSimpleTextureActive
std::shared_ptr< drawinglayer::texture::GeoTexSvx > mpTransparenceGeoTexSvx
const drawinglayer::attribute::MaterialAttribute3D & getMaterial() const
void setupLineSpanInterpolators(const basegfx::RasterConversionLineEntry3D &rA, const basegfx::RasterConversionLineEntry3D &rB)
basegfx::ip_triple maIntInvTexture
void getTextureCoor(basegfx::B2DPoint &rTarget) const
basegfx::ip_single maIntZ
basegfx::BZPixelRaster & mrBuffer
const drawinglayer::processor3d::DefaultProcessor3D & mrProcessor
basegfx::ip_triple maIntNormal
basegfx::ip_double maIntTexture
void incrementLineSpanInterpolators(double fStep)
double decideColorAndOpacity(basegfx::BColor &rColor) const
basegfx::ip_triple maIntColor
ZBufferRasterConverter3D(basegfx::BZPixelRaster &rBuffer, const drawinglayer::processor3d::ZBufferProcessor3D &rProcessor)
const drawinglayer::attribute::MaterialAttribute3D * mpCurrentMaterial
void setCurrentMaterial(const drawinglayer::attribute::MaterialAttribute3D &rMaterial)
virtual void processLineSpan(const basegfx::RasterConversionLineEntry3D &rA, const basegfx::RasterConversionLineEntry3D &rB, sal_Int32 nLine, sal_uInt32 nSpanCount) override
void translate(double fX, double fY, double fZ)
void scale(double fX, double fY, double fZ)
B3DPolygon const & getB3DPolygon(sal_uInt32 nIndex) const
void transform(const B3DHomMatrix &rMatrix)
::basegfx::BColor getModifiedColor(const ::basegfx::BColor &rSource) const
void setBlue(double fNew)
void setGreen(double fNew)
sal_uInt8 getAlpha() const
void setAlpha(sal_uInt8 nNew)
sal_uInt8 getBlue() const
sal_uInt8 getGreen() const
void setRed(sal_uInt8 nNew)
void setBlue(sal_uInt8 nNew)
void setGreen(sal_uInt8 nNew)
sal_uInt32 getIndexFromXY(sal_uInt32 nX, sal_uInt32 nY) const
sal_uInt32 getWidth() const
sal_uInt32 getHeight() const
const sal_uInt16 & getZ(sal_uInt32 nIndex) const
const BPixel & getBPixel(sal_uInt32 nIndex) const
void expand(const Tuple2D< TYPE > &rTuple)
sal_uInt32 getColorIndex() const
sal_uInt32 getInverseTextureIndex() const
sal_uInt32 getTextureIndex() const
sal_uInt32 getNormalIndex() const
const ip_single & getZ() const
const ip_single & getX() const
const ip_single & getY() const
void increment(double fStep)
const ip_single & getX() const
void increment(double fStep)
void increment(double fStep)
const ip_single & getZ() const
const ip_single & getY() const
const ip_single & getX() const
sal_uInt16 getSpecularIntensity() const
const basegfx::BColor & getSpecular() const
const basegfx::BColor & getEmission() const
const basegfx::BColor & getColor() const
basegfx::BColor solveColorModel(const basegfx::B3DVector &rNormalInEyeCoordinates, const basegfx::BColor &rColor, const basegfx::BColor &rSpecular, const basegfx::BColor &rEmission, sal_uInt16 nSpecularIntensity) const
const geometry::ViewInformation3D & getViewInformation3D() const
void updateViewInformation(const geometry::ViewInformation3D &rViewInformation3D)
DefaultProcessor3D class.
std::shared_ptr< texture::GeoTexSvx > mpTransparenceGeoTexSvx
the current active transparence texture
const basegfx::BColorModifierStack & getBColorModifierStack() const
data read access renderer stuff
bool mbSimpleTextureActive
bool getSimpleTextureActive() const
const attribute::SdrLightingAttribute & getSdrLightingAttribute() const
std::shared_ptr< texture::GeoTexSvx > mpGeoTexSvx
the current active texture
const std::shared_ptr< texture::GeoTexSvx > & getGeoTexSvx() const
basegfx::B2DRange maRasterRange
renderer range.
const std::shared_ptr< texture::GeoTexSvx > & getTransparenceGeoTexSvx() const
sal_uInt32 getTransparenceCounter() const
This 3D renderer derived from DefaultProcessor3D renders all fed primitives to a 2D raster bitmap usi...
std::unique_ptr< ZBufferRasterConverter3D > mpZBufferRasterConverter3D
The raster converter for Z-Buffer.
ZBufferProcessor3D(const geometry::ViewInformation3D &rViewInformation3D, const attribute::SdrSceneAttribute &rSdrSceneAttribute, const attribute::SdrLightingAttribute &rSdrLightingAttribute, const basegfx::B2DRange &rVisiblePart, sal_uInt16 nAntiAlialize, double fFullViewSizeX, double fFullViewSizeY, basegfx::BZPixelRaster &rBZPixelRaster, sal_uInt32 nStartLine, sal_uInt32 nStopLine)
virtual void rasterconvertB3DPolyPolygon(const attribute::MaterialAttribute3D &rMaterial, const basegfx::B3DPolyPolygon &rFill) const override
virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D &rMaterial, const basegfx::B3DPolygon &rHairline) const override
basegfx::B3DHomMatrix maInvEyeToView
inverse of EyeToView for rasterconversion with evtl. Phong shading
virtual ~ZBufferProcessor3D() override
sal_uInt16 mnAntiAlialize
std::vector< RasterPrimitive3D > maRasterPrimitive3Ds
bool IsSnapHorVerLinesToDiscrete()
B2VectorOrientation getOrientation(const B2DPolygon &rCandidate)
B2DPolygon snapPointsOfHorizontalOrVerticalEdges(const B2DPolygon &rCandidate)
B2DRange getRange(const B2DPolygon &rCandidate)
B2IRange fround(const B2DRange &rRange)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
#define SCANLINE_EMPTY_INDEX