1*3334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*3334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3334a7e6SAndrew Rist * distributed with this work for additional information 6*3334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 9*3334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 10*3334a7e6SAndrew Rist * 11*3334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*3334a7e6SAndrew Rist * 13*3334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3334a7e6SAndrew Rist * software distributed under the License is distributed on an 15*3334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 17*3334a7e6SAndrew Rist * specific language governing permissions and limitations 18*3334a7e6SAndrew Rist * under the License. 19*3334a7e6SAndrew Rist * 20*3334a7e6SAndrew Rist *************************************************************/ 21*3334a7e6SAndrew Rist 22*3334a7e6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _E3D_SCENEUPDATER_HXX 25cdf0e10cSrcweir #define _E3D_SCENEUPDATER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <svx/svxdllapi.h> 28cdf0e10cSrcweir 29cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 30cdf0e10cSrcweir // predeclarations 31cdf0e10cSrcweir 32cdf0e10cSrcweir class SdrObject; 33cdf0e10cSrcweir class E3dScene; 34cdf0e10cSrcweir namespace drawinglayer { namespace geometry { 35cdf0e10cSrcweir class ViewInformation3D; 36cdf0e10cSrcweir }} 37cdf0e10cSrcweir 38cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 39cdf0e10cSrcweir // This class is a helper to encapsulate 3D object changes which shall change the 40cdf0e10cSrcweir // scene's 2D geometry. E.g. when moving one 3D object in a scene, the visualisation 41cdf0e10cSrcweir // would not change since the scene's 2D attributes are defined by it's 2D object 42cdf0e10cSrcweir // transformation and the changed content would be projected to the same 2D bounds 43cdf0e10cSrcweir // as before. To reflect the fact that the 2D positions may 'change' for the user's 44cdf0e10cSrcweir // imagination, it is necessary to calculate a new 2D object transformation of the scene 45cdf0e10cSrcweir // (the SnapRect) using the old 3D transformation stack and the eventually changed 46cdf0e10cSrcweir // 3D content and tu use it. This is only wanted if changes to the scene's 47cdf0e10cSrcweir // content are intended to change the scene's 2D geometry attributes 48cdf0e10cSrcweir 49cdf0e10cSrcweir class SVX_DLLPUBLIC E3DModifySceneSnapRectUpdater 50cdf0e10cSrcweir { 51cdf0e10cSrcweir // the scene which may be changed. This gets set to the outmost scene 52cdf0e10cSrcweir // of the to-be-changed 3D object when the scene has a 3d transformation 53cdf0e10cSrcweir // stack at construction time. In all other cases it's set to zero and 54cdf0e10cSrcweir // no action needs to be taken 55cdf0e10cSrcweir E3dScene* mpScene; 56cdf0e10cSrcweir 57cdf0e10cSrcweir // the 3d transformation stack at the time of construction, valid when 58cdf0e10cSrcweir // mpScene is not zero 59cdf0e10cSrcweir drawinglayer::geometry::ViewInformation3D* mpViewInformation3D; 60cdf0e10cSrcweir 61cdf0e10cSrcweir public: 62cdf0e10cSrcweir // the constructor evaluates and sets the members at construction time 63cdf0e10cSrcweir E3DModifySceneSnapRectUpdater(const SdrObject* pObject); 64cdf0e10cSrcweir 65cdf0e10cSrcweir // the destructor will take action if mpScene is not zero and modify the 66cdf0e10cSrcweir // 2D geomeztry of the target scene 67cdf0e10cSrcweir ~E3DModifySceneSnapRectUpdater(); 68cdf0e10cSrcweir }; 69cdf0e10cSrcweir 70cdf0e10cSrcweir #endif // _E3D_SCENEUPDATER_HXX 71