tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / offapi / com / sun / star / geometry / AffineMatrix3D.idl
blob63287a84bc2fdff48bcd802ff0a3052a1c11db05
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 module com { module sun { module star { module geometry {
22 /** This structure defines a 3 by 4 affine matrix.<p>
24 The matrix defined by this structure constitutes an affine mapping
25 of a point in 3D to another point in 3D. The last line of a
26 complete 4 by 4 matrix is omitted, since it is implicitly assumed
27 to be [0,0,0,1].<p>
29 An affine mapping, as performed by this matrix, can be written out
30 as follows, where <code>xs, ys</code> and <code>zs</code> are the source, and
31 <code>xd, yd</code> and <code>zd</code> the corresponding result coordinates:
33 <code>
34 xd = m00*xs + m01*ys + m02*zs + m03;
35 yd = m10*xs + m11*ys + m12*zs + m13;
36 zd = m20*xs + m21*ys + m22*zs + m23;
37 </code><p>
39 Thus, in common matrix language, with M being the
40 AffineMatrix3D and vs=[xs,ys,zs]^T, vd=[xd,yd,zd]^T two 3D
41 vectors, the affine transformation is written as
42 vd=M*vs. Concatenation of transformations amounts to
43 multiplication of matrices, i.e. a translation, given by T,
44 followed by a rotation, given by R, is expressed as vd=R*(T*vs) in
45 the above notation. Since matrix multiplication is associative,
46 this can be shortened to vd=(R*T)*vs=M'*vs. Therefore, a set of
47 consecutive transformations can be accumulated into a single
48 AffineMatrix3D, by multiplying the current transformation with the
49 additional transformation from the left.<p>
51 Due to this transformational approach, all geometry data types are
52 points in abstract integer or real coordinate spaces, without any
53 physical dimensions attached to them. This physical measurement
54 units are typically only added when using these data types to
55 render something onto a physical output device. For 3D coordinates
56 there is also a projection from 3D to 2D device coordinates needed.
57 Only then the total transformation matrix (including projection to 2D)
58 and the device resolution determine the actual measurement unit in 3D.<p>
60 @since OOo 2.0
62 struct AffineMatrix3D
64 /// The top, left matrix entry.
65 double m00;
67 /// The top, left middle matrix entry.
68 double m01;
70 /// The top, right middle matrix entry.
71 double m02;
73 /// The top, right matrix entry.
74 double m03;
76 /// The middle, left matrix entry.
77 double m10;
79 /// The middle, middle left matrix entry.
80 double m11;
82 /// The middle, middle right matrix entry.
83 double m12;
85 /// The middle, right matrix entry.
86 double m13;
88 /// The bottom, left matrix entry.
89 double m20;
91 /// The bottom, middle left matrix entry.
92 double m21;
94 /// The bottom, middle right matrix entry.
95 double m22;
97 /// The bottom, right matrix entry.
98 double m23;
101 }; }; }; };
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */