1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SVX_HELPERHITTEST3D_HXX
21 #define INCLUDED_SVX_HELPERHITTEST3D_HXX
23 #include <svx/svxdllapi.h>
33 namespace drawinglayer::geometry
{
34 class ViewInformation3D
;
37 class E3dCompoundObject
;
41 /** support for getting a ViewInformation3D for a given CompoudObject3D
42 with correct ObjectTransformation filled out
44 @param o_rViewInformation3D
45 The ViewInformation3D created which will be overwritten
48 The E3dCompoundObject for which the ViewInformation3D shall be
52 A pointer to the found and used root scene. This is also a hint
53 if the operation succeeded or not, since when object has no root
54 scene (is not inserted to a model), an empty ViewInformation3D
57 E3dScene
* fillViewInformation3DForCompoundObject(
58 drawinglayer::geometry::ViewInformation3D
& o_rViewInformation3D
,
59 const E3dCompoundObject
& rCandidate
);
61 /** support for getting all from a 2d position hit objects in a 3d scene
62 in a depth sorted array
65 2D Point in view coordinates
68 The 3D Scene for HitTest
71 Output parameter which contains all hit 3D objects inside rScene. This
72 vector will be changed in any case. If it's empty, no hit exists. If it's
73 not empty, the first object is the object closest to the viewer
76 SVXCORE_DLLPUBLIC
void getAllHit3DObjectsSortedFrontToBack(
77 const basegfx::B2DPoint
& rPoint
,
78 const E3dScene
& rScene
,
79 ::std::vector
< const E3dCompoundObject
* >& o_rResult
);
81 /** support for checking if the single given 3d object is hit at position
84 2D Point in view coordinates
87 The 3D Object which needs checking
90 true if hit, false if not
92 bool checkHitSingle3DObject(
93 const basegfx::B2DPoint
& rPoint
,
94 const E3dCompoundObject
& rCandidate
);
97 #endif // INCLUDED_SVX_HELPERHITTEST3D_HXX
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */