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_INC_DRAGMT3D_HXX
21 #define INCLUDED_SVX_INC_DRAGMT3D_HXX
23 #include <svx/def3d.hxx>
24 #include <svx/svddrgmt.hxx>
25 #include <svx/view3d.hxx>
26 #include <basegfx/polygon/b3dpolypolygon.hxx>
27 #include <basegfx/matrix/b3dhommatrix.hxx>
29 // Parameters for the interaction of a 3D object
30 class E3dDragMethodUnit
34 basegfx::B3DPolyPolygon maWireframePoly
;
35 basegfx::B3DHomMatrix maDisplayTransform
;
36 basegfx::B3DHomMatrix maInvDisplayTransform
;
37 basegfx::B3DHomMatrix maInitTransform
;
38 basegfx::B3DHomMatrix maTransform
;
39 Degree100 mnStartAngle
;
40 Degree100 mnLastAngle
;
42 E3dDragMethodUnit(E3dObject
& r3DObj
)
46 maInvDisplayTransform(),
55 // Derivative of SdrDragMethod for 3D objects
56 class E3dDragMethod
: public SdrDragMethod
59 ::std::vector
< E3dDragMethodUnit
> maGrp
;
60 E3dDragConstraint meConstraint
;
62 tools::Rectangle maFullBound
;
69 const SdrMarkList
& rMark
,
70 E3dDragConstraint eConstr
,
73 virtual OUString
GetSdrDragComment() const override
;
74 virtual bool BeginSdrDrag() override
;
75 virtual void MoveSdrDrag(const Point
& rPnt
) override
;
76 virtual void CancelSdrDrag() override
;
77 virtual bool EndSdrDrag(bool bCopy
) override
;
79 // for migration from XOR to overlay
80 virtual void CreateOverlayGeometry(
81 sdr::overlay::OverlayManager
& rOverlayManager
,
82 const sdr::contact::ObjectContact
& rObjectContact
) override
;
85 // Derivative of SdrDragMethod for spinning 3D objects
86 class E3dDragRotate final
: public E3dDragMethod
88 basegfx::B3DPoint maGlobalCenter
;
93 const SdrMarkList
& rMark
,
94 E3dDragConstraint eConstr
,
97 virtual void MoveSdrDrag(const Point
& rPnt
) override
;
98 virtual PointerStyle
GetSdrDragPointer() const override
;
101 // Derivative of SdrDragMethod for moving 3D sub-objects
102 class E3dDragMove final
: public E3dDragMethod
104 SdrHdlKind meWhatDragHdl
;
110 const SdrMarkList
& rMark
,
112 E3dDragConstraint eConstr
,
115 virtual void MoveSdrDrag(const Point
& rPnt
) override
;
116 virtual PointerStyle
GetSdrDragPointer() const override
;
120 #endif // INCLUDED_SVX_INC_DRAGMT3D_HXX
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */