1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
34 namespace drawinglayer
36 /** SdrPrimitive3D class
38 Base class for the more complicated geometric primitives, so
39 derive from buffered primitive to allow overriding of
40 create3DDecomposition there.
44 class DRAWINGLAYER_DLLPUBLIC SdrPrimitive3D
: public BufferedDecompositionPrimitive3D
47 /// object surface attributes
48 basegfx::B3DHomMatrix maTransform
;
49 basegfx::B2DVector maTextureSize
;
50 attribute::SdrLineFillShadowAttribute3D maSdrLFSAttribute
;
51 attribute::Sdr3DObjectAttribute maSdr3DObjectAttribute
;
54 /** Standard implementation for primitive3D which
55 will use maTransform as range and expand by evtl. line width / 2
57 basegfx::B3DRange
getStandard3DRange() const;
59 /** implementation for primitive3D which
60 will use given Slice3Ds and expand by evtl. line width / 2
62 basegfx::B3DRange
get3DRangeFromSlices(const Slice3DVector
& rSlices
) const;
67 const basegfx::B3DHomMatrix
& rTransform
,
68 const basegfx::B2DVector
& rTextureSize
,
69 const attribute::SdrLineFillShadowAttribute3D
& rSdrLFSAttribute
,
70 const attribute::Sdr3DObjectAttribute
& rSdr3DObjectAttribute
);
73 const basegfx::B3DHomMatrix
& getTransform() const { return maTransform
; }
74 const basegfx::B2DVector
& getTextureSize() const { return maTextureSize
; }
75 const attribute::SdrLineFillShadowAttribute3D
& getSdrLFSAttribute() const { return maSdrLFSAttribute
; }
76 const attribute::Sdr3DObjectAttribute
getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute
; }
79 virtual bool operator==(const BasePrimitive3D
& rPrimitive
) const SAL_OVERRIDE
;
81 } // end of namespace primitive3d
82 } // end of namespace drawinglayer
86 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */