tdf#154546 skip dispatch when presenter controller is not set
[LibreOffice.git] / include / drawinglayer / primitive3d / sdrprimitive3d.hxx
blob8f05a87afb162a0199c835f6b8d20041b97c7bdd
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_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
26 #include <basegfx/matrix/b3dhommatrix.hxx>
27 #include <basegfx/vector/b2dvector.hxx>
28 #include <drawinglayer/attribute/sdrallattribute3d.hxx>
29 #include <drawinglayer/primitive3d/sdrextrudelathetools3d.hxx>
30 #include <drawinglayer/attribute/sdrobjectattribute3d.hxx>
33 namespace drawinglayer
35 /** SdrPrimitive3D class
37 Base class for the more complicated geometric primitives, so
38 derive from buffered primitive to allow overriding of
39 create3DDecomposition there.
41 namespace primitive3d
43 class DRAWINGLAYER_DLLPUBLIC SdrPrimitive3D : public BufferedDecompositionPrimitive3D
45 private:
46 /// object surface attributes
47 basegfx::B3DHomMatrix maTransform;
48 basegfx::B2DVector maTextureSize;
49 attribute::SdrLineFillShadowAttribute3D maSdrLFSAttribute;
50 attribute::Sdr3DObjectAttribute maSdr3DObjectAttribute;
52 protected:
53 /** Standard implementation for primitive3D which
54 will use maTransform as range and expand by evtl. line width / 2
56 basegfx::B3DRange getStandard3DRange() const;
58 /** implementation for primitive3D which
59 will use given Slice3Ds and expand by evtl. line width / 2
61 basegfx::B3DRange get3DRangeFromSlices(const Slice3DVector& rSlices) const;
63 public:
64 /// constructor
65 SdrPrimitive3D(
66 basegfx::B3DHomMatrix aTransform,
67 const basegfx::B2DVector& rTextureSize,
68 attribute::SdrLineFillShadowAttribute3D aSdrLFSAttribute,
69 const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
71 /// data read access
72 const basegfx::B3DHomMatrix& getTransform() const { return maTransform; }
73 const basegfx::B2DVector& getTextureSize() const { return maTextureSize; }
74 const attribute::SdrLineFillShadowAttribute3D& getSdrLFSAttribute() const { return maSdrLFSAttribute; }
75 const attribute::Sdr3DObjectAttribute& getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; }
77 /// compare operator
78 virtual bool operator==(const BasePrimitive3D& rPrimitive) const override;
80 } // end of namespace primitive3d
81 } // end of namespace drawinglayer
84 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */