xref: /aoo41x/main/tools/inc/tools/b3dtrans.hxx (revision 8b851043)
1*8b851043SAndrew Rist /**************************************************************
2*8b851043SAndrew Rist  *
3*8b851043SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*8b851043SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*8b851043SAndrew Rist  * distributed with this work for additional information
6*8b851043SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*8b851043SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*8b851043SAndrew Rist  * "License"); you may not use this file except in compliance
9*8b851043SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*8b851043SAndrew Rist  *
11*8b851043SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*8b851043SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*8b851043SAndrew Rist  * software distributed under the License is distributed on an
15*8b851043SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*8b851043SAndrew Rist  * KIND, either express or implied.  See the License for the
17*8b851043SAndrew Rist  * specific language governing permissions and limitations
18*8b851043SAndrew Rist  * under the License.
19*8b851043SAndrew Rist  *
20*8b851043SAndrew Rist  *************************************************************/
21*8b851043SAndrew Rist 
22*8b851043SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _B3D_B3DTRANS_HXX
25cdf0e10cSrcweir #define _B3D_B3DTRANS_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir // Zu verwendender DephRange des Z-Buffers
28cdf0e10cSrcweir #define ZBUFFER_DEPTH_RANGE			((double)(256L * 256L * 256L))
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <basegfx/matrix/b3dhommatrix.hxx>
31cdf0e10cSrcweir #include <basegfx/range/b3drange.hxx>
32cdf0e10cSrcweir #include <tools/gen.hxx>
33cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx>
34cdf0e10cSrcweir #include <basegfx/point/b2dpoint.hxx>
35cdf0e10cSrcweir #include <tools/toolsdllapi.h>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir // Vorausdeklarationen
38cdf0e10cSrcweir 
39cdf0e10cSrcweir /*************************************************************************
40cdf0e10cSrcweir |*
41cdf0e10cSrcweir |* Unterstuetzte Methoden, um das Seitenverhaeltnis einzuhalten
42cdf0e10cSrcweir |*
43cdf0e10cSrcweir \************************************************************************/
44cdf0e10cSrcweir 
45cdf0e10cSrcweir enum Base3DRatio
46cdf0e10cSrcweir {
47cdf0e10cSrcweir 	Base3DRatioGrow = 1,
48cdf0e10cSrcweir 	Base3DRatioShrink,
49cdf0e10cSrcweir 	Base3DRatioMiddle
50cdf0e10cSrcweir };
51cdf0e10cSrcweir 
52cdf0e10cSrcweir /*************************************************************************
53cdf0e10cSrcweir |*
54cdf0e10cSrcweir |* Typ der Projektion
55cdf0e10cSrcweir |*
56cdf0e10cSrcweir \************************************************************************/
57cdf0e10cSrcweir 
58cdf0e10cSrcweir enum Base3DProjectionType
59cdf0e10cSrcweir {
60cdf0e10cSrcweir 	Base3DProjectionTypeParallel = 1,
61cdf0e10cSrcweir 	Base3DProjectionTypePerspective
62cdf0e10cSrcweir };
63cdf0e10cSrcweir 
64cdf0e10cSrcweir /*************************************************************************
65cdf0e10cSrcweir |*
66cdf0e10cSrcweir |* Transformationen fuer alle 3D Ausgaben
67cdf0e10cSrcweir |*
68cdf0e10cSrcweir \************************************************************************/
69cdf0e10cSrcweir 
70cdf0e10cSrcweir class TOOLS_DLLPUBLIC B3dTransformationSet
71cdf0e10cSrcweir {
72cdf0e10cSrcweir private:
73cdf0e10cSrcweir 	// Object Matrix Object -> World
74cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maObjectTrans;
75cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maInvObjectTrans;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	// Orientation Matrix
78cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maOrientation;
79cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maInvOrientation;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	// Projection Matrix
82cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maProjection;
83cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maInvProjection;
84cdf0e10cSrcweir 
85cdf0e10cSrcweir 	// Texture Matrices
86cdf0e10cSrcweir 	basegfx::B2DHomMatrix			maTexture;
87cdf0e10cSrcweir 
88cdf0e10cSrcweir 	// Speziell zum Umwandeln von Punkten Objekt -> Device
89cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maObjectToDevice;
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 	// Transponierte Inverse fuer Vectortransformationen
92cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maInvTransObjectToEye;
93cdf0e10cSrcweir 
94cdf0e10cSrcweir 	// Transformation World->View
95cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maMatFromWorldToView;
96cdf0e10cSrcweir 	basegfx::B3DHomMatrix			maInvMatFromWorldToView;
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 	// Parameters for ViewportTransformation
99cdf0e10cSrcweir 	basegfx::B3DVector			maScale;
100cdf0e10cSrcweir 	basegfx::B3DVector			maTranslate;
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	// ViewPlane DeviceRectangle (vom Benutzer gesetzt)
103cdf0e10cSrcweir 	double							mfLeftBound;
104cdf0e10cSrcweir 	double							mfRightBound;
105cdf0e10cSrcweir 	double							mfBottomBound;
106cdf0e10cSrcweir 	double							mfTopBound;
107cdf0e10cSrcweir 
108cdf0e10cSrcweir 	// Near and far clipping planes
109cdf0e10cSrcweir 	double							mfNearBound;
110cdf0e10cSrcweir 	double							mfFarBound;
111cdf0e10cSrcweir 
112cdf0e10cSrcweir 	// Seitenverhaeltnis der 3D Abbildung (Y / X)
113cdf0e10cSrcweir 	// default ist 1:1 -> 1.0
114cdf0e10cSrcweir 	// Deaktivieren mit 0.0 als Wert
115cdf0e10cSrcweir 	double							mfRatio;
116cdf0e10cSrcweir 
117cdf0e10cSrcweir 	// Der gesetzte Ausgabebereich (in logischen Koordinaten)
118cdf0e10cSrcweir 	// und der dazugehoerige sichtbare Bereich
119cdf0e10cSrcweir 	Rectangle						maViewportRectangle;
120cdf0e10cSrcweir 	Rectangle						maVisibleRectangle;
121cdf0e10cSrcweir 
122cdf0e10cSrcweir 	// Die tatsaechlich von CalcViewport gesetzten Abmessungen
123cdf0e10cSrcweir 	// des sichtbaren Bereichs (in logischen Koordinaten)
124cdf0e10cSrcweir 	Rectangle						maSetBound;
125cdf0e10cSrcweir 
126cdf0e10cSrcweir 	// Methode zur Aufrechterhaltung des Seitenverhaeltnisses
127cdf0e10cSrcweir 	// default ist Base3DRatioGrow
128cdf0e10cSrcweir 	Base3DRatio						meRatio;
129cdf0e10cSrcweir 
130cdf0e10cSrcweir 	// Flags
131cdf0e10cSrcweir 	unsigned						mbPerspective				: 1;
132cdf0e10cSrcweir 	unsigned						mbWorldToViewValid			: 1;
133cdf0e10cSrcweir 	unsigned						mbInvTransObjectToEyeValid	: 1;
134cdf0e10cSrcweir 	unsigned						mbObjectToDeviceValid		: 1;
135cdf0e10cSrcweir 	unsigned						mbProjectionValid			: 1;
136cdf0e10cSrcweir 
137cdf0e10cSrcweir public:
138cdf0e10cSrcweir 	B3dTransformationSet();
139cdf0e10cSrcweir 	virtual ~B3dTransformationSet();
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 	// Zurueck auf Standard
142cdf0e10cSrcweir 	void Reset();
143cdf0e10cSrcweir 
144cdf0e10cSrcweir 	// ObjectTrans
145cdf0e10cSrcweir 	void SetObjectTrans(const basegfx::B3DHomMatrix& rObj);
GetObjectTrans()146cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetObjectTrans() { return maObjectTrans; }
GetInvObjectTrans()147cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetInvObjectTrans() { return maInvObjectTrans; }
148cdf0e10cSrcweir 
149cdf0e10cSrcweir 	// Orientation
150cdf0e10cSrcweir 	void SetOrientation(
151cdf0e10cSrcweir 		basegfx::B3DPoint aVRP = basegfx::B3DPoint(0.0,0.0,1.0),
152cdf0e10cSrcweir 		basegfx::B3DVector aVPN = basegfx::B3DVector(0.0,0.0,1.0),
153cdf0e10cSrcweir 		basegfx::B3DVector aVUP = basegfx::B3DVector(0.0,1.0,0.0));
154cdf0e10cSrcweir 	void SetOrientation(basegfx::B3DHomMatrix& mOrient);
GetOrientation()155cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetOrientation() { return maOrientation; }
GetInvOrientation()156cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetInvOrientation() { return maInvOrientation; }
157cdf0e10cSrcweir 
158cdf0e10cSrcweir 	// Projection
159cdf0e10cSrcweir 	void SetProjection(const basegfx::B3DHomMatrix& mProject);
160cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetProjection();
161cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetInvProjection();
162cdf0e10cSrcweir 
163cdf0e10cSrcweir 	// Texture
164cdf0e10cSrcweir 	void SetTexture(const basegfx::B2DHomMatrix& rTxt);
GetTexture()165cdf0e10cSrcweir 	const basegfx::B2DHomMatrix& GetTexture() { return maTexture; }
166cdf0e10cSrcweir 
167cdf0e10cSrcweir 	// Seitenverhaeltnis und Modus zu dessen Aufrechterhaltung
GetRatio()168cdf0e10cSrcweir 	double GetRatio() { return mfRatio; }
169cdf0e10cSrcweir 	void SetRatio(double fNew=1.0);
GetRatioMode()170cdf0e10cSrcweir 	Base3DRatio GetRatioMode() { return meRatio; }
171cdf0e10cSrcweir 	void SetRatioMode(Base3DRatio eNew=Base3DRatioGrow);
172cdf0e10cSrcweir 
173cdf0e10cSrcweir 	// Parameter der ViewportTransformation
174cdf0e10cSrcweir 	void SetDeviceRectangle(double fL=-1.0, double fR=1.0, double fB=-1.0, double fT=1.0, sal_Bool bBroadCastChange=sal_True);
175cdf0e10cSrcweir 	void SetDeviceVolume(const basegfx::B3DRange& rVol, sal_Bool bBroadCastChange=sal_True);
176cdf0e10cSrcweir 	void GetDeviceRectangle(double &fL, double &fR, double& fB, double& fT);
177cdf0e10cSrcweir 	basegfx::B3DRange GetDeviceVolume();
GetDeviceRectangleWidth() const178cdf0e10cSrcweir 	double GetDeviceRectangleWidth() const { return mfRightBound - mfLeftBound; }
GetDeviceRectangleHeight() const179cdf0e10cSrcweir 	double GetDeviceRectangleHeight() const { return mfTopBound - mfBottomBound; }
180cdf0e10cSrcweir 	void SetFrontClippingPlane(double fF=0.0);
GetFrontClippingPlane()181cdf0e10cSrcweir 	double GetFrontClippingPlane() { return mfNearBound; }
182cdf0e10cSrcweir 	void SetBackClippingPlane(double fB=1.0);
GetBackClippingPlane()183cdf0e10cSrcweir 	double GetBackClippingPlane() { return mfFarBound; }
184cdf0e10cSrcweir 	void SetPerspective(sal_Bool bNew);
GetPerspective()185cdf0e10cSrcweir 	sal_Bool GetPerspective() { return mbPerspective; }
186cdf0e10cSrcweir 	void SetViewportRectangle(Rectangle& rRect, Rectangle& rVisible);
SetViewportRectangle(Rectangle & rRect)187cdf0e10cSrcweir 	void SetViewportRectangle(Rectangle& rRect) { SetViewportRectangle(rRect, rRect); }
GetViewportRectangle()188cdf0e10cSrcweir 	const Rectangle& GetViewportRectangle() { return maViewportRectangle; }
189cdf0e10cSrcweir 	void CalcViewport();
190cdf0e10cSrcweir 
191cdf0e10cSrcweir 	// Spezielle Matritzen anfordern
192cdf0e10cSrcweir 	basegfx::B3DHomMatrix GetMatFromObjectToView();
193cdf0e10cSrcweir 
194cdf0e10cSrcweir 	// Transponierte Inverse fuer Vectortransformationen
195cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetInvTransObjectToEye();
196cdf0e10cSrcweir 
197cdf0e10cSrcweir 	// Speziell zum Umwandeln von Punkten Objekt -> Device
198cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetObjectToDevice();
199cdf0e10cSrcweir 
200cdf0e10cSrcweir 	// Speziell zum Umwandeln von Punkten World -> View
201cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetMatFromWorldToView();
202cdf0e10cSrcweir 	const basegfx::B3DHomMatrix& GetInvMatFromWorldToView();
203cdf0e10cSrcweir 
204cdf0e10cSrcweir 	// Bounds des Viewports lesen
205cdf0e10cSrcweir 	const Rectangle& GetLogicalViewportBounds();
206cdf0e10cSrcweir 	const basegfx::B3DVector& GetScale();
207cdf0e10cSrcweir 	const basegfx::B3DVector& GetTranslate();
208cdf0e10cSrcweir 
209cdf0e10cSrcweir 	// Direkter Zugriff auf verschiedene Transformationen
210cdf0e10cSrcweir 	const basegfx::B3DPoint WorldToEyeCoor(const basegfx::B3DPoint& rVec);
211cdf0e10cSrcweir 	const basegfx::B3DPoint EyeToWorldCoor(const basegfx::B3DPoint& rVec);
212cdf0e10cSrcweir 	const basegfx::B3DPoint EyeToViewCoor(const basegfx::B3DPoint& rVec);
213cdf0e10cSrcweir 	const basegfx::B3DPoint ViewToEyeCoor(const basegfx::B3DPoint& rVec);
214cdf0e10cSrcweir 	const basegfx::B3DPoint WorldToViewCoor(const basegfx::B3DPoint& rVec);
215cdf0e10cSrcweir 	const basegfx::B3DPoint ViewToWorldCoor(const basegfx::B3DPoint& rVec);
216cdf0e10cSrcweir 	const basegfx::B3DPoint DeviceToViewCoor(const basegfx::B3DPoint& rVec);
217cdf0e10cSrcweir 	const basegfx::B3DPoint ViewToDeviceCoor(const basegfx::B3DPoint& rVec);
218cdf0e10cSrcweir 	const basegfx::B3DPoint ObjectToWorldCoor(const basegfx::B3DPoint& rVec);
219cdf0e10cSrcweir 	const basegfx::B3DPoint WorldToObjectCoor(const basegfx::B3DPoint& rVec);
220cdf0e10cSrcweir 	const basegfx::B3DPoint ObjectToViewCoor(const basegfx::B3DPoint& rVec);
221cdf0e10cSrcweir 	const basegfx::B3DPoint ViewToObjectCoor(const basegfx::B3DPoint& rVec);
222cdf0e10cSrcweir 	const basegfx::B3DPoint ObjectToEyeCoor(const basegfx::B3DPoint& rVec);
223cdf0e10cSrcweir 	const basegfx::B3DPoint EyeToObjectCoor(const basegfx::B3DPoint& rVec);
224cdf0e10cSrcweir 	const basegfx::B3DPoint DeviceToEyeCoor(const basegfx::B3DPoint& rVec);
225cdf0e10cSrcweir 	const basegfx::B3DPoint EyeToDeviceCoor(const basegfx::B3DPoint& rVec);
226cdf0e10cSrcweir 
227cdf0e10cSrcweir 	const basegfx::B3DPoint InvTransObjectToEye(const basegfx::B3DPoint& rVec);
228cdf0e10cSrcweir 	const basegfx::B2DPoint TransTextureCoor(const basegfx::B2DPoint& rVec);
229cdf0e10cSrcweir 
230cdf0e10cSrcweir 	static void Frustum(
231cdf0e10cSrcweir 		basegfx::B3DHomMatrix& rTarget,
232cdf0e10cSrcweir 		double fLeft = -1.0, double fRight = 1.0,
233cdf0e10cSrcweir 		double fBottom = -1.0, double fTop = 1.0,
234cdf0e10cSrcweir 		double fNear = 0.001, double fFar = 1.0);
235cdf0e10cSrcweir 	static void Ortho(
236cdf0e10cSrcweir 		basegfx::B3DHomMatrix& rTarget,
237cdf0e10cSrcweir 		double fLeft = -1.0, double fRight = 1.0,
238cdf0e10cSrcweir 		double fBottom = -1.0, double fTop = 1.0,
239cdf0e10cSrcweir 		double fNear = 0.0, double fFar = 1.0);
240cdf0e10cSrcweir 	static void Orientation(
241cdf0e10cSrcweir 		basegfx::B3DHomMatrix& rTarget,
242cdf0e10cSrcweir 		basegfx::B3DPoint aVRP = basegfx::B3DPoint(0.0,0.0,1.0),
243cdf0e10cSrcweir 		basegfx::B3DVector aVPN = basegfx::B3DVector(0.0,0.0,1.0),
244cdf0e10cSrcweir 		basegfx::B3DVector aVUP = basegfx::B3DVector(0.0,1.0,0.0));
245cdf0e10cSrcweir 
246cdf0e10cSrcweir protected:
247cdf0e10cSrcweir 	void PostSetObjectTrans();
248cdf0e10cSrcweir 	void PostSetOrientation();
249cdf0e10cSrcweir 	void PostSetProjection();
250cdf0e10cSrcweir 	void PostSetTexture();
251cdf0e10cSrcweir 	void PostSetViewport();
252cdf0e10cSrcweir 
253cdf0e10cSrcweir 	void CalcMatObjectToDevice();
254cdf0e10cSrcweir 	void CalcMatFromWorldToView();
255cdf0e10cSrcweir 	void CalcMatInvTransObjectToEye();
256cdf0e10cSrcweir 
257cdf0e10cSrcweir 	virtual void DeviceRectangleChange();
258cdf0e10cSrcweir };
259cdf0e10cSrcweir 
260cdf0e10cSrcweir /*************************************************************************
261cdf0e10cSrcweir |*
262cdf0e10cSrcweir |* Viewport fuer B3D
263cdf0e10cSrcweir |*
264cdf0e10cSrcweir |* Verwendet wird hier ein vereinfachtes System, bei dem der abzubildende
265cdf0e10cSrcweir |* Punkt durch VRP repraesentiert wird
266cdf0e10cSrcweir |*
267cdf0e10cSrcweir \************************************************************************/
268cdf0e10cSrcweir 
269cdf0e10cSrcweir class TOOLS_DLLPUBLIC B3dViewport : public B3dTransformationSet
270cdf0e10cSrcweir {
271cdf0e10cSrcweir private:
272cdf0e10cSrcweir 	basegfx::B3DPoint				aVRP;			// View Reference Point
273cdf0e10cSrcweir 	basegfx::B3DVector			aVPN;			// View Plane Normal
274cdf0e10cSrcweir 	basegfx::B3DVector			aVUV;			// View Up Vector
275cdf0e10cSrcweir 
276cdf0e10cSrcweir public:
277cdf0e10cSrcweir 	B3dViewport();
278cdf0e10cSrcweir 	virtual ~B3dViewport();
279cdf0e10cSrcweir 
280cdf0e10cSrcweir 	void SetVRP(const basegfx::B3DPoint& rNewVRP);
281cdf0e10cSrcweir 	void SetVPN(const basegfx::B3DVector& rNewVPN);
282cdf0e10cSrcweir 	void SetVUV(const basegfx::B3DVector& rNewVUV);
283cdf0e10cSrcweir 	void SetViewportValues(
284cdf0e10cSrcweir 		const basegfx::B3DPoint& rNewVRP,
285cdf0e10cSrcweir 		const basegfx::B3DVector& rNewVPN,
286cdf0e10cSrcweir 		const basegfx::B3DVector& rNewVUV);
287cdf0e10cSrcweir 
GetVRP() const288cdf0e10cSrcweir 	const basegfx::B3DPoint&	GetVRP() const	{ return aVRP; }
GetVPN() const289cdf0e10cSrcweir 	const basegfx::B3DVector&	GetVPN() const	{ return aVPN; }
GetVUV() const290cdf0e10cSrcweir 	const basegfx::B3DVector&	GetVUV() const	{ return aVUV; }
291cdf0e10cSrcweir 
292cdf0e10cSrcweir protected:
293cdf0e10cSrcweir 	void CalcOrientation();
294cdf0e10cSrcweir };
295cdf0e10cSrcweir 
296cdf0e10cSrcweir /*************************************************************************
297cdf0e10cSrcweir |*
298cdf0e10cSrcweir |* Kamera fuer B3D
299cdf0e10cSrcweir |*
300cdf0e10cSrcweir \************************************************************************/
301cdf0e10cSrcweir 
302cdf0e10cSrcweir class TOOLS_DLLPUBLIC B3dCamera : public B3dViewport
303cdf0e10cSrcweir {
304cdf0e10cSrcweir private:
305cdf0e10cSrcweir 	basegfx::B3DPoint		aPosition;
306cdf0e10cSrcweir 	basegfx::B3DPoint		aCorrectedPosition;
307cdf0e10cSrcweir 	basegfx::B3DVector	aLookAt;
308cdf0e10cSrcweir 	double					fFocalLength;
309cdf0e10cSrcweir 	double					fBankAngle;
310cdf0e10cSrcweir 
311cdf0e10cSrcweir 	unsigned				bUseFocalLength			: 1;
312cdf0e10cSrcweir 
313cdf0e10cSrcweir public:
314cdf0e10cSrcweir 	B3dCamera(
315cdf0e10cSrcweir 		const basegfx::B3DPoint& rPos = basegfx::B3DPoint(0.0, 0.0, 1.0),
316cdf0e10cSrcweir 		const basegfx::B3DVector& rLkAt = basegfx::B3DVector(0.0, 0.0, 0.0),
317cdf0e10cSrcweir 		double fFocLen = 35.0, double fBnkAng = 0.0,
318cdf0e10cSrcweir 		sal_Bool bUseFocLen = sal_False);
319cdf0e10cSrcweir 	virtual ~B3dCamera();
320cdf0e10cSrcweir 
321cdf0e10cSrcweir 	// Positionen
322cdf0e10cSrcweir 	void SetPosition(const basegfx::B3DPoint& rNewPos);
GetPosition() const323cdf0e10cSrcweir 	const basegfx::B3DPoint& GetPosition() const { return aPosition; }
324cdf0e10cSrcweir 	void SetLookAt(const basegfx::B3DVector& rNewLookAt);
GetLookAt() const325cdf0e10cSrcweir 	const basegfx::B3DVector& GetLookAt() const { return aLookAt; }
326cdf0e10cSrcweir 	void SetPositionAndLookAt(const basegfx::B3DPoint& rNewPos, const basegfx::B3DVector& rNewLookAt);
327cdf0e10cSrcweir 
328cdf0e10cSrcweir 	// Brennweite in mm
329cdf0e10cSrcweir 	void SetFocalLength(double fLen);
GetFocalLength() const330cdf0e10cSrcweir 	double GetFocalLength() const { return fFocalLength; }
331cdf0e10cSrcweir 
332cdf0e10cSrcweir 	// Neigung links/rechts
333cdf0e10cSrcweir 	void SetBankAngle(double fAngle);
GetBankAngle() const334cdf0e10cSrcweir 	double GetBankAngle() const { return fBankAngle; }
335cdf0e10cSrcweir 
336cdf0e10cSrcweir 	// FocalLength Flag
337cdf0e10cSrcweir 	void SetUseFocalLength(sal_Bool bNew);
GetUseFocalLength() const338cdf0e10cSrcweir 	sal_Bool GetUseFocalLength() const { return (sal_Bool)bUseFocalLength; }
339cdf0e10cSrcweir 
340cdf0e10cSrcweir protected:
341cdf0e10cSrcweir 	void CalcNewViewportValues();
342cdf0e10cSrcweir 	sal_Bool CalcFocalLength();
343cdf0e10cSrcweir 
344cdf0e10cSrcweir 	virtual void DeviceRectangleChange();
345cdf0e10cSrcweir };
346cdf0e10cSrcweir 
347cdf0e10cSrcweir 
348cdf0e10cSrcweir #endif          // _B3D_B3DTRANS_HXX
349