1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _E3D_SCENEUPDATER_HXX 29 #define _E3D_SCENEUPDATER_HXX 30 31 #include <svx/svxdllapi.h> 32 33 ////////////////////////////////////////////////////////////////////////////// 34 // predeclarations 35 36 class SdrObject; 37 class E3dScene; 38 namespace drawinglayer { namespace geometry { 39 class ViewInformation3D; 40 }} 41 42 ////////////////////////////////////////////////////////////////////////////// 43 // This class is a helper to encapsulate 3D object changes which shall change the 44 // scene's 2D geometry. E.g. when moving one 3D object in a scene, the visualisation 45 // would not change since the scene's 2D attributes are defined by it's 2D object 46 // transformation and the changed content would be projected to the same 2D bounds 47 // as before. To reflect the fact that the 2D positions may 'change' for the user's 48 // imagination, it is necessary to calculate a new 2D object transformation of the scene 49 // (the SnapRect) using the old 3D transformation stack and the eventually changed 50 // 3D content and tu use it. This is only wanted if changes to the scene's 51 // content are intended to change the scene's 2D geometry attributes 52 53 class SVX_DLLPUBLIC E3DModifySceneSnapRectUpdater 54 { 55 // the scene which may be changed. This gets set to the outmost scene 56 // of the to-be-changed 3D object when the scene has a 3d transformation 57 // stack at construction time. In all other cases it's set to zero and 58 // no action needs to be taken 59 E3dScene* mpScene; 60 61 // the 3d transformation stack at the time of construction, valid when 62 // mpScene is not zero 63 drawinglayer::geometry::ViewInformation3D* mpViewInformation3D; 64 65 public: 66 // the constructor evaluates and sets the members at construction time 67 E3DModifySceneSnapRectUpdater(const SdrObject* pObject); 68 69 // the destructor will take action if mpScene is not zero and modify the 70 // 2D geomeztry of the target scene 71 ~E3DModifySceneSnapRectUpdater(); 72 }; 73 74 #endif // _E3D_SCENEUPDATER_HXX 75