tdf#154546 skip dispatch when presenter controller is not set
[LibreOffice.git] / include / drawinglayer / primitive3d / polypolygonprimitive3d.hxx
bloba378a04d908b024074f60e26cd6e4ed0b23b9909
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_POLYPOLYGONPRIMITIVE3D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYPOLYGONPRIMITIVE3D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
26 #include <basegfx/polygon/b3dpolypolygon.hxx>
27 #include <drawinglayer/attribute/materialattribute3d.hxx>
30 namespace drawinglayer::primitive3d
32 /** PolyPolygonMaterialPrimitive3D class
34 This primitive defines a planar 3D tools::PolyPolygon filled with a single color.
35 This is one of the non-decomposable primitives, so a renderer
36 should process it.
38 It is assumed here that the PolyPolgon is a single plane in 3D.
40 class DRAWINGLAYER_DLLPUBLIC PolyPolygonMaterialPrimitive3D final : public BasePrimitive3D
42 private:
43 /// the tools::PolyPolygon geometry
44 basegfx::B3DPolyPolygon maPolyPolygon;
46 /// the fill parameters
47 attribute::MaterialAttribute3D maMaterial;
49 bool mbDoubleSided : 1;
51 public:
52 /// constructor
53 PolyPolygonMaterialPrimitive3D(
54 basegfx::B3DPolyPolygon aPolyPolygon,
55 const attribute::MaterialAttribute3D& rMaterial,
56 bool bDoubleSided);
58 /// data read access
59 const basegfx::B3DPolyPolygon& getB3DPolyPolygon() const { return maPolyPolygon; }
60 const attribute::MaterialAttribute3D& getMaterial() const { return maMaterial; }
61 bool getDoubleSided() const { return mbDoubleSided; }
63 /// compare operator
64 virtual bool operator==(const BasePrimitive3D& rPrimitive) const override;
66 /// get range
67 virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const override;
69 /// provide unique ID
70 DeclPrimitive3DIDBlock()
73 } // end of namespace drawinglayer::primitive3d
76 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYPOLYGONPRIMITIVE3D_HXX
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */