diff options
Diffstat (limited to 'drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx')
-rw-r--r-- | drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx index c7d10bdfc690..aefeddbb38a9 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx @@ -50,6 +50,7 @@ namespace drawinglayer { } class ZBufferRasterConverter3D; +class RasterPrimitive3D; ////////////////////////////////////////////////////////////////////////////// @@ -57,37 +58,40 @@ namespace drawinglayer { namespace processor3d { + /** ZBufferProcessor3D class + + This 3D renderer derived from DefaultProcessor3D renders all feeded primitives to a 2D + raster bitmap using a Z-Buffer based approach. It is able to supersample and to handle + transparent content. + */ class ZBufferProcessor3D : public DefaultProcessor3D { private: - // the raster target, a Z-Buffer + /// the raster target, a Z-Buffer basegfx::BZPixelRaster* mpBZPixelRaster; - // inverse of EyeToView for rasterconversion with evtl. Phong shading + /// inverse of EyeToView for rasterconversion with evtl. Phong shading basegfx::B3DHomMatrix maInvEyeToView; - // The raster converter for Z-Buffer + /// The raster converter for Z-Buffer ZBufferRasterConverter3D* mpZBufferRasterConverter3D; - // AA value. Defines how many oversámples will be used in X and Y. Values 0, 1 - // will switch it off while e.g. 2 will use 2x2 pixels for each pixel to create + /* AA value. Defines how many oversámples will be used in X and Y. Values 0, 1 + will switch it off while e.g. 2 will use 2x2 pixels for each pixel to create + */ sal_uInt16 mnAntiAlialize; - // bitfield - // a combination of bools to allow two-pass rendering to render - // the transparent parts in the 2nd run (if any) as needed for Z-Buffer - unsigned mbProcessTransparent : 1; - unsigned mbContainsTransparent : 1; - + /* remembered RasterPrimitive3D's which need to be painted back to front + for transparent 3D parts + */ + std::vector< RasterPrimitive3D >* mpRasterPrimitive3Ds; ////////////////////////////////////////////////////////////////////////////// // rasterconversions for filled and non-filled polygons + virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolygon& rHairline) const; virtual void rasterconvertB3DPolyPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolyPolygon& rFill) const; - // the processing method for a single, known primitive - virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive); - public: ZBufferProcessor3D( const geometry::ViewInformation3D& rViewInformation3D, @@ -100,14 +104,9 @@ namespace drawinglayer sal_uInt16 nAntiAlialize); virtual ~ZBufferProcessor3D(); - // helpers for drawing transparent parts in 2nd run. To use this - // processor, call processNonTransparent and then processTransparent - // with the same primitives. The 2nd call will only do something, - // when transparent parts are contained - void processNonTransparent(const primitive3d::Primitive3DSequence& rSource); - void processTransparent(const primitive3d::Primitive3DSequence& rSource); + void finish(); - // get the result as bitmapEx + /// get the result as bitmapEx BitmapEx getBitmapEx() const; }; } // end of namespace processor3d |