update emoji autocorrect entries from po-files
[LibreOffice.git] / include / drawinglayer / processor3d / zbufferprocessor3d.hxx
blob5f6403081b735ffc21aaad206472aa184ad3e974
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR3D_ZBUFFERPROCESSOR3D_HXX
21 #define INCLUDED_DRAWINGLAYER_PROCESSOR3D_ZBUFFERPROCESSOR3D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/processor3d/defaultprocessor3d.hxx>
26 #include <vcl/bitmapex.hxx>
28 namespace basegfx {
29 class BZPixelRaster;
32 namespace drawinglayer {
33 namespace attribute {
34 class SdrSceneAttribute;
35 class SdrLightingAttribute;
36 class MaterialAttribute3D;
38 namespace geometry {
39 class ViewInformation2D;
43 class ZBufferRasterConverter3D;
44 class RasterPrimitive3D;
46 namespace drawinglayer
48 namespace processor3d
50 /**
51 This 3D renderer derived from DefaultProcessor3D renders all feeded primitives to a 2D
52 raster bitmap using a Z-Buffer based approach. It is able to supersample and to handle
53 transparent content.
55 class ZBufferProcessor3D : public DefaultProcessor3D
57 private:
58 /// the raster target, a Z-Buffer
59 basegfx::BZPixelRaster* mpBZPixelRaster;
61 /// inverse of EyeToView for rasterconversion with evtl. Phong shading
62 basegfx::B3DHomMatrix maInvEyeToView;
64 /// The raster converter for Z-Buffer
65 ZBufferRasterConverter3D* mpZBufferRasterConverter3D;
67 /* AA value. Defines how many oversamples will be used in X and Y. Values 0, 1
68 will switch it off while e.g. 2 will use 2x2 pixels for each pixel to create
70 sal_uInt16 mnAntiAlialize;
72 /* remembered RasterPrimitive3D's which need to be painted back to front
73 for transparent 3D parts
75 std::vector< RasterPrimitive3D >* mpRasterPrimitive3Ds;
77 // rasterconversions for filled and non-filled polygons
79 virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolygon& rHairline) const SAL_OVERRIDE;
80 virtual void rasterconvertB3DPolyPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolyPolygon& rFill) const SAL_OVERRIDE;
82 public:
83 ZBufferProcessor3D(
84 const geometry::ViewInformation3D& rViewInformation3D,
85 const geometry::ViewInformation2D& rViewInformation2D,
86 const attribute::SdrSceneAttribute& rSdrSceneAttribute,
87 const attribute::SdrLightingAttribute& rSdrLightingAttribute,
88 double fSizeX,
89 double fSizeY,
90 const basegfx::B2DRange& rVisiblePart,
91 sal_uInt16 nAntiAlialize);
92 virtual ~ZBufferProcessor3D();
94 void finish();
96 /// get the result as bitmapEx
97 BitmapEx getBitmapEx() const;
102 #endif
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */