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
;
42 /** support for getting a ViewInformation3D for a given CompoudObject3D
43 with correct ObjectTransformation filled out
45 @param o_rViewInformation3D
46 The ViewInformation3D created which will be overwritten
49 The E3dCompoundObject for which the ViewInformation3D shall be
53 A pointer to the found and used root scene. This is also a hint
54 if the operation succeeded or not, since when object has no root
55 scene (is not inserted to a model), an empty ViewInformation3D
58 E3dScene
* fillViewInformation3DForCompoundObject(
59 drawinglayer::geometry::ViewInformation3D
& o_rViewInformation3D
,
60 const E3dCompoundObject
& rCandidate
);
62 /** support for getting all from a 2d position hit objects in a 3d scene
63 in a depth sorted array
66 2D Point in view coordinates
69 The 3D Scene for HitTest
72 Output parameter which contains all hit 3D objects inside rScene. This
73 vector will be changed in any case. If it's empty, no hit exists. If it's
74 not empty, the first object is the object closest to the viewer
77 SVX_DLLPUBLIC
void getAllHit3DObjectsSortedFrontToBack(
78 const basegfx::B2DPoint
& rPoint
,
79 const E3dScene
& rScene
,
80 ::std::vector
< const E3dCompoundObject
* >& o_rResult
);
82 /** support for checking if the single given 3d object is hit at position
85 2D Point in view coordinates
88 The 3D Object which needs checking
91 true if hit, false if not
93 bool checkHitSingle3DObject(
94 const basegfx::B2DPoint
& rPoint
,
95 const E3dCompoundObject
& rCandidate
);
98 #endif // INCLUDED_SVX_HELPERHITTEST3D_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */