LibreOffice Module drawinglayer (master) 1
sdrextrudeprimitive3d.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#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDEPRIMITIVE3D_HXX
21#define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDEPRIMITIVE3D_HXX
22
24
28#include <optional>
29
30
32 {
45 {
46 private:
50
53 double mfDepth;
54 double mfDiagonal;
56
58 std::optional<geometry::ViewInformation3D> mpLastRLGViewInformation;
59
60 bool mbSmoothNormals : 1; // Plane self
61 bool mbSmoothLids : 1; // Front/back
63 bool mbCloseFront : 1;
64 bool mbCloseBack : 1;
65
67 void impCreateSlices();
68
70 const Slice3DVector& getSlices() const;
71
73 virtual Primitive3DContainer create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const override;
74
75 public:
78 const basegfx::B3DHomMatrix& rTransform,
79 const basegfx::B2DVector& rTextureSize,
80 const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
81 const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute,
82 basegfx::B2DPolyPolygon aPolyPolygon,
83 double fDepth,
84 double fDiagonal,
85 double fBackScale,
86 bool bSmoothNormals,
87 bool bSmoothLids,
88 bool bCharacterMode,
89 bool bCloseFront,
90 bool bCloseBack);
91 virtual ~SdrExtrudePrimitive3D() override;
92
95 double getDepth() const { return mfDepth; }
96 double getDiagonal() const { return mfDiagonal; }
97 double getBackScale() const { return mfBackScale; }
98 bool getSmoothNormals() const { return mbSmoothNormals; }
99 bool getSmoothLids() const { return mbSmoothLids; }
100 bool getCharacterMode() const { return mbCharacterMode; }
101 bool getCloseFront() const { return mbCloseFront; }
102 bool getCloseBack() const { return mbCloseBack; }
103
105 virtual bool operator==(const BasePrimitive3D& rPrimitive) const override;
106
108 virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const override;
109
111 virtual Primitive3DContainer get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const override;
112
115 };
116
117} // end of namespace drawinglayer::primitive3d
118
119
120#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDEPRIMITIVE3D_HXX
121
122/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define DeclPrimitive3DIDBlock()
defines for DeclPrimitive3DIDBlock and ImplPrimitive3DIDBlock Added to be able to simply change ident...
const basegfx::B2DPolyPolygon & getPolyPolygon() const
data read access
std::optional< geometry::ViewInformation3D > mpLastRLGViewInformation
decomposition data when ReducedLineGeometry is used, see get3DDecomposition
basegfx::B2DPolyPolygon maCorrectedPolyPolygon
geometry helper for slices
basegfx::B2DPolyPolygon maPolyPolygon
primitive geometry data
#define DRAWINGLAYER_DLLPUBLIC
SdrPrimitive3D class.
::std::vector< Slice3D > Slice3DVector
typedef for a group of Slice3Ds
basegfx::B2DPolyPolygon maPolyPolygon
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)