Bump version to 6.4-15
[LibreOffice.git] / include / svx / helperhittest3d.hxx
blobe8a4a9e77aae0fd66ed7ca72f28dcb20c1ec92be
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 <vector>
27 // predefines
29 namespace basegfx {
30 class B2DPoint;
33 namespace drawinglayer { namespace geometry {
34 class ViewInformation3D;
37 class E3dCompoundObject;
38 class E3dScene;
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
47 @param rCandidate
48 The E3dCompoundObject for which the ViewInformation3D shall be
49 prepared
51 @return
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
55 will be used
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
64 @param rPoint
65 2D Point in view coordinates
67 @param rScene
68 The 3D Scene for HitTest
70 @param o_rResult
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 SVX_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
83 @param rPoint
84 2D Point in view coordinates
86 @param rCandidate
87 The 3D Object which needs checking
89 @return
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: */