1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dragmt3d.hxx,v $
10 * $Revision: 1.8.18.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _E3D_DRAGMT3D_HXX
32 #define _E3D_DRAGMT3D_HXX
34 #include <svx/svddrgmt.hxx>
35 #include <svx/view3d.hxx>
36 #include <basegfx/polygon/b3dpolypolygon.hxx>
37 #include <vcl/timer.hxx>
38 #include <basegfx/matrix/b3dhommatrix.hxx>
42 /*************************************************************************
44 |* Parameter fuer Interaktion eines 3D-Objektes
46 \************************************************************************/
47 class E3dDragMethodUnit
51 basegfx::B3DPolyPolygon maWireframePoly
;
52 basegfx::B3DHomMatrix maDisplayTransform
;
53 basegfx::B3DHomMatrix maInvDisplayTransform
;
54 basegfx::B3DHomMatrix maInitTransform
;
55 basegfx::B3DHomMatrix maTransform
;
56 sal_Int32 mnStartAngle
;
57 sal_Int32 mnLastAngle
;
63 maInvDisplayTransform(),
71 /*************************************************************************
73 |* Ableitung von SdrDragMethod fuer 3D-Objekte
75 \************************************************************************/
77 class E3dDragMethod
: public SdrDragMethod
80 ::std::vector
< E3dDragMethodUnit
> maGrp
;
81 E3dDragConstraint meConstraint
;
83 Rectangle maFullBound
;
91 const SdrMarkList
& rMark
,
92 E3dDragConstraint eConstr
= E3DDRAG_CONSTR_XYZ
,
95 virtual void TakeSdrDragComment(String
& rStr
) const;
96 virtual bool BeginSdrDrag();
97 virtual void MoveSdrDrag(const Point
& rPnt
);
98 virtual void CancelSdrDrag();
99 virtual bool EndSdrDrag(bool bCopy
);
101 E3dView
& Get3DView() { return (E3dView
&)getSdrDragView(); }
103 // for migration from XOR to overlay
104 virtual void CreateOverlayGeometry(::sdr::overlay::OverlayManager
& rOverlayManager
);
108 /*************************************************************************
110 |* Ableitung von SdrDragMethod zum Drehen von 3D-Objekten
112 \************************************************************************/
114 class E3dDragRotate
: public E3dDragMethod
116 basegfx::B3DPoint maGlobalCenter
;
122 const SdrMarkList
& rMark
,
123 E3dDragConstraint eConstr
= E3DDRAG_CONSTR_XYZ
,
126 virtual void MoveSdrDrag(const Point
& rPnt
);
127 virtual Pointer
GetSdrDragPointer() const;
131 /*************************************************************************
133 |* Ableitung von SdrDragMethod zum Verschieben von 3D-Subobjekten
135 \************************************************************************/
137 class E3dDragMove
: public E3dDragMethod
139 SdrHdlKind meWhatDragHdl
;
146 const SdrMarkList
& rMark
,
147 SdrHdlKind eDrgHdl
= HDL_MOVE
,
148 E3dDragConstraint eConstr
= E3DDRAG_CONSTR_XYZ
,
151 virtual void MoveSdrDrag(const Point
& rPnt
);
152 virtual Pointer
GetSdrDragPointer() const;
156 #endif // _E3D_DRAGMT3D_HXX