Coverage Report

Created: 2026-06-30 11:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/drawinglayer/primitive3d/polypolygonprimitive3d.hxx
Line
Count
Source
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
22
#include <drawinglayer/drawinglayerdllapi.h>
23
24
#include <drawinglayer/primitive3d/baseprimitive3d.hxx>
25
#include <basegfx/polygon/b3dpolypolygon.hxx>
26
#include <drawinglayer/attribute/materialattribute3d.hxx>
27
28
29
namespace drawinglayer::primitive3d
30
    {
31
        /** PolyPolygonMaterialPrimitive3D class
32
33
            This primitive defines a planar 3D tools::PolyPolygon filled with a single color.
34
            This is one of the non-decomposable primitives, so a renderer
35
            should process it.
36
37
            It is assumed here that the PolyPolgon is a single plane in 3D.
38
         */
39
        class DRAWINGLAYER_DLLPUBLIC PolyPolygonMaterialPrimitive3D final : public BasePrimitive3D
40
        {
41
        private:
42
            /// the tools::PolyPolygon geometry
43
            basegfx::B3DPolyPolygon                     maPolyPolygon;
44
45
            /// the fill parameters
46
            attribute::MaterialAttribute3D              maMaterial;
47
48
            bool                                        mbDoubleSided : 1;
49
50
        public:
51
            /// constructor
52
            PolyPolygonMaterialPrimitive3D(
53
                basegfx::B3DPolyPolygon aPolyPolygon,
54
                const attribute::MaterialAttribute3D& rMaterial,
55
                bool bDoubleSided);
56
57
            /// data read access
58
0
            const basegfx::B3DPolyPolygon& getB3DPolyPolygon() const { return maPolyPolygon; }
59
0
            const attribute::MaterialAttribute3D& getMaterial() const { return maMaterial; }
60
0
            bool getDoubleSided() const { return mbDoubleSided; }
61
62
            /// compare operator
63
            virtual bool operator==(const BasePrimitive3D& rPrimitive) const override;
64
65
            /// get range
66
            virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const override;
67
68
            /// provide unique ID
69
            DeclPrimitive3DIDBlock()
70
        };
71
72
} // end of namespace drawinglayer::primitive3d
73
74
75
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */