Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
30 : : #define INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
31 : :
32 : : #include <drawinglayer/drawinglayerdllapi.h>
33 : :
34 : : #include <drawinglayer/processor3d/defaultprocessor3d.hxx>
35 : :
36 : : //////////////////////////////////////////////////////////////////////////////
37 : :
38 : : namespace drawinglayer
39 : : {
40 : : namespace processor3d
41 : : {
42 : : /** CutFindProcessor class
43 : :
44 : : This processor extracts all cuts of 3D plane geometries in the feeded primitives
45 : : with the given cut vector, based on the ViewInformation3D given.
46 : : */
47 [ # # ][ # # ]: 0 : class DRAWINGLAYER_DLLPUBLIC CutFindProcessor : public BaseProcessor3D
48 : : {
49 : : private:
50 : : /// the start and stop point for the cut vector
51 : : basegfx::B3DPoint maFront;
52 : : basegfx::B3DPoint maBack;
53 : :
54 : : /// the found cut points
55 : : ::std::vector< basegfx::B3DPoint > maResult;
56 : :
57 : : /* #i102956# the transformation change from TransformPrimitive3D processings
58 : : needs to be remembered to be able to transform found cuts to the
59 : : basic coordinate system the processor starts with
60 : : */
61 : : basegfx::B3DHomMatrix maCombinedTransform;
62 : :
63 : : /// bitfield
64 : : bool mbAnyHit : 1;
65 : :
66 : : /* this flag decides if primitives which are invisible will be taken into account for
67 : : HitTesting or not.
68 : : */
69 : : bool mbUseInvisiblePrimitiveContent : 1;
70 : :
71 : : /* as tooling, the process() implementation takes over API handling and calls this
72 : : virtual render method when the primitive implementation is BasePrimitive3D-based.
73 : : */
74 : : virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
75 : :
76 : : public:
77 : : CutFindProcessor(const geometry::ViewInformation3D& rViewInformation,
78 : : const basegfx::B3DPoint& rFront,
79 : : const basegfx::B3DPoint& rBack,
80 : : bool bAnyHit);
81 : :
82 : : /// data write access
83 : : void setUseInvisiblePrimitiveContent(bool bNew)
84 : : {
85 : : if((bool)mbUseInvisiblePrimitiveContent != bNew) mbUseInvisiblePrimitiveContent = bNew;
86 : : }
87 : :
88 : : /// data read access
89 : 0 : const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; }
90 : 0 : bool getAnyHit() const { return mbAnyHit; }
91 : 0 : bool getUseInvisiblePrimitiveContent() const { return mbUseInvisiblePrimitiveContent;}
92 : : };
93 : : } // end of namespace processor3d
94 : : } // end of namespace drawinglayer
95 : :
96 : : //////////////////////////////////////////////////////////////////////////////
97 : :
98 : : #endif //INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
99 : :
100 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|