LibreOffice Module drawinglayer (master) 1
defaultprocessor3d.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
25
26// predefines
27
28namespace basegfx {
29 class B3DPolygon;
30 class B3DPolyPolygon;
31}
32
34 class SdrSceneAttribute;
35 class SdrLightingAttribute;
36 class MaterialAttribute3D;
37}
38
40 class PolygonHairlinePrimitive3D;
41 class PolyPolygonMaterialPrimitive3D;
42 class GradientTexturePrimitive3D;
43 class HatchTexturePrimitive3D;
44 class BitmapTexturePrimitive3D;
45 class TransformPrimitive3D;
46 class ModifiedColorPrimitive3D;
47}
48
49namespace drawinglayer::texture {
50 class GeoTexSvx;
51}
52
53
55 {
64 {
65 protected:
68
71
75
78
80 std::shared_ptr< texture::GeoTexSvx > mpGeoTexSvx;
81
83 std::shared_ptr< texture::GeoTexSvx > mpTransparenceGeoTexSvx;
84
87
88 bool mbModulate : 1;
89 bool mbFilter : 1;
91
92
93 // rendering support
94
95 void impRenderGradientTexturePrimitive3D(const primitive3d::GradientTexturePrimitive3D& rPrimitive, bool bTransparence);
102
103
104 // rasterconversions for filled and non-filled polygons. These NEED to be
105 // implemented from derivations
106
107 virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolygon& rHairline) const = 0;
108 virtual void rasterconvertB3DPolyPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolyPolygon& rFill) const = 0;
109
110 // the processing method for a single, known primitive
111 virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive) override;
112
113 public:
115 const geometry::ViewInformation3D& rViewInformation,
116 const attribute::SdrSceneAttribute& rSdrSceneAttribute,
117 const attribute::SdrLightingAttribute& rSdrLightingAttribute);
118 virtual ~DefaultProcessor3D() override;
119
123
126 const std::shared_ptr< texture::GeoTexSvx >& getGeoTexSvx() const { return mpGeoTexSvx; }
127 const std::shared_ptr< texture::GeoTexSvx >& getTransparenceGeoTexSvx() const { return mpTransparenceGeoTexSvx; }
128 sal_uInt32 getTransparenceCounter() const { return mnTransparenceCounter; }
129 bool getModulate() const { return mbModulate; }
130 bool getFilter() const { return mbFilter; }
132 };
133
134} // end of namespace drawinglayer::processor3d
135
136
137/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< texture::GeoTexSvx > mpTransparenceGeoTexSvx
the current active transparence texture
void impRenderGradientTexturePrimitive3D(const primitive3d::GradientTexturePrimitive3D &rPrimitive, bool bTransparence)
const basegfx::BColorModifierStack & getBColorModifierStack() const
data read access renderer stuff
const attribute::SdrLightingAttribute & mrSdrLightingAttribute
read-only light infos (lights, etc...)
const attribute::SdrLightingAttribute & getSdrLightingAttribute() const
DefaultProcessor3D(const geometry::ViewInformation3D &rViewInformation, const attribute::SdrSceneAttribute &rSdrSceneAttribute, const attribute::SdrLightingAttribute &rSdrLightingAttribute)
std::shared_ptr< texture::GeoTexSvx > mpGeoTexSvx
the current active texture
const attribute::SdrSceneAttribute & getSdrSceneAttribute() const
data read access
virtual void rasterconvertB3DPolyPolygon(const attribute::MaterialAttribute3D &rMaterial, const basegfx::B3DPolyPolygon &rFill) const =0
const std::shared_ptr< texture::GeoTexSvx > & getGeoTexSvx() const
void impRenderPolygonHairlinePrimitive3D(const primitive3d::PolygonHairlinePrimitive3D &rPrimitive) const
basegfx::B2DRange maRasterRange
renderer range.
void impRenderTransformPrimitive3D(const primitive3d::TransformPrimitive3D &rTransformCandidate)
virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D &rMaterial, const basegfx::B3DPolygon &rHairline) const =0
basegfx::BColorModifierStack maBColorModifierStack
the modifiedColorPrimitive stack
void impRenderHatchTexturePrimitive3D(const primitive3d::HatchTexturePrimitive3D &rPrimitive)
void impRenderBitmapTexturePrimitive3D(const primitive3d::BitmapTexturePrimitive3D &rPrimitive)
sal_uInt32 mnTransparenceCounter
counter for entered transparence textures
const std::shared_ptr< texture::GeoTexSvx > & getTransparenceGeoTexSvx() const
void impRenderModifiedColorPrimitive3D(const primitive3d::ModifiedColorPrimitive3D &rModifiedCandidate)
virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D &rBasePrimitive) override
const attribute::SdrSceneAttribute & mrSdrSceneAttribute
read-only scene infos (normal handling, etc...)
void impRenderPolyPolygonMaterialPrimitive3D(const primitive3d::PolyPolygonMaterialPrimitive3D &rPrimitive) const
SdrPrimitive3D class.