Debian Codegraph @

include/drawinglayer/processor3d/cutfindprocessor3d.hxx

raw
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 #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
21 #define INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
22
23 #include <drawinglayer/drawinglayerdllapi.h>
24 #include <drawinglayer/processor3d/baseprocessor3d.hxx>
25
26 #include <basegfx/matrix/b3dhommatrix.hxx>
27
28 namespace drawinglayer::processor3d
29 {
30 /** CutFindProcessor class
31
32 This processor extracts all cuts of 3D plane geometries in the fed primitives
33 with the given cut vector, based on the ViewInformation3D given.
34 */
35 class DRAWINGLAYER_DLLPUBLIC CutFindProcessor final : public BaseProcessor3D
36 {
37 private:
38 /// the start and stop point for the cut vector
39 basegfx::B3DPoint maFront;
40 basegfx::B3DPoint maBack;
41
42 /// the found cut points
43 ::std::vector< basegfx::B3DPoint > maResult;
44
45 /* #i102956# the transformation change from TransformPrimitive3D processings
46 needs to be remembered to be able to transform found cuts to the
47 basic coordinate system the processor starts with
48 */
49 basegfx::B3DHomMatrix maCombinedTransform;
50
51 bool mbAnyHit : 1;
52
53 /* as tooling, the process() implementation takes over API handling and calls this
54 virtual render method when the primitive implementation is BasePrimitive3D-based.
55 */
56 virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) override;
57
58 public:
59 CutFindProcessor(const geometry::ViewInformation3D& rViewInformation,
60 const basegfx::B3DPoint& rFront,
61 const basegfx::B3DPoint& rBack,
62 bool bAnyHit);
63
64 /// data read access
65 const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; }
66 };
67
68 } // end of namespace drawinglayer::processor3d
69
70
71 #endif //INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
72
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */