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>
24 #include <sal/types.h>
34 namespace drawinglayer
{ namespace geometry
{
35 class ViewInformation3D
;
38 class E3dCompoundObject
;
43 /** support for getting a ViewInformation3D for a given CompoudObject3D
44 with correct ObjectTransformation filled out
46 @param o_rViewInformation3D
47 The ViewInformation3D created which will be overwritten
50 The E3dCompoundObject for which the ViewInformation3D shall be
54 A pointer to the found and used root scene. This is also a hint
55 if the operation succeeded or not, since when object has no root
56 scene (is not inserted to a model), an empty ViewInformation3D
59 E3dScene
* fillViewInformation3DForCompoundObject(
60 drawinglayer::geometry::ViewInformation3D
& o_rViewInformation3D
,
61 const E3dCompoundObject
& rCandidate
);
63 /** support for getting all from a 2d position hit objects in a 3d scene
64 in a depth sorted array
67 2D Point in view coordinates
70 The 3D Scene for HitTest
73 Output parameter which contains all hit 3D objects inside rScene. This
74 vector will be changed in any case. If it's empty, no hit exists. If it's
75 not empty, the first object is the object closest to the viewer
78 SVX_DLLPUBLIC
void getAllHit3DObjectsSortedFrontToBack(
79 const basegfx::B2DPoint
& rPoint
,
80 const E3dScene
& rScene
,
81 ::std::vector
< const E3dCompoundObject
* >& o_rResult
);
83 /** support for checking if the single given 3d object is hit at position
86 2D Point in view coordinates
89 The 3D Object which needs checking
92 true if hit, false if not
94 bool checkHitSingle3DObject(
95 const basegfx::B2DPoint
& rPoint
,
96 const E3dCompoundObject
& rCandidate
);
100 #endif // INCLUDED_SVX_HELPERHITTEST3D_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */