Coverage Report

Created: 2026-08-14 10:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.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/sdrprimitive3d.hxx>
25
26
27
namespace drawinglayer::primitive3d
28
    {
29
        /** SdrPolyPolygonPrimitive3D class
30
31
            This 3D primitive defines a PolyPolgon in space which may have
32
            Line- and FillStyles and extra 3D surface attributes. It is assumed
33
            that the given 3D PolyPolgon (which may contain texture and normal
34
            information) is planar in 3D.
35
36
            The decomposition will include all needed 3D data for visualisation,
37
            including FatLines and fill styles.
38
         */
39
        class DRAWINGLAYER_DLLPUBLIC SdrPolyPolygonPrimitive3D final : public SdrPrimitive3D
40
        {
41
        private:
42
            /// the planar polyPolygon evtl with normals and texture coordinates
43
            basegfx::B3DPolyPolygon                 maPolyPolygon3D;
44
45
            /// local decomposition.
46
            virtual Primitive3DContainer create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const override;
47
48
        public:
49
            /// constructor
50
            SdrPolyPolygonPrimitive3D(
51
                basegfx::B3DPolyPolygon aPolyPolygon3D,
52
                const basegfx::B3DHomMatrix& rTransform,
53
                const basegfx::B2DVector& rTextureSize,
54
                const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
55
                const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
56
57
            /// data access
58
0
            const basegfx::B3DPolyPolygon& getPolyPolygon3D() const { return maPolyPolygon3D; }
59
60
            /// compare operator
61
            virtual bool operator==(const BasePrimitive3D& rPrimitive) const override;
62
63
            /// get range
64
            virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const override;
65
66
            /// provide unique ID
67
            DeclPrimitive3DIDBlock()
68
        };
69
70
} // end of namespace drawinglayer::primitive3d
71
72
73
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */