Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: geometry ::

unpublished struct AffineMatrix3D
Usage Restrictions
not published
Description
This structure defines a 3 by 4 affine matrix.

The matrix defined by this structure constitutes an affine mapping of a point in 3D to another point in 3D. The last line of a complete 4 by 4 matrix is omitted, since it is implicitely assumed to be [0,0,0,1].

An affine mapping, as performed by this matrix, can be written out as follows, where xs, ys and zs are the source, and xd, yd and zd the corresponding result coordinates: xd = m00*xs + m01*ys + m02*zs + m03; yd = m10*xs + m11*ys + m12*zs + m13; zd = m20*xs + m21*ys + m22*zs + m23;

Thus, in common matrix language, with M being the AffineMatrix3D and vs=[xs,ys,zs]^T, vd=[xd,yd,zd]^T two 3D vectors, the affine transformation is written as vd=M*vs. Concatenation of transformations amounts to multiplication of matrices, i.e. a translation, given by T, followed by a rotation, given by R, is expressed as vd=R*(T*vs) in the above notation. Since matrix multiplication is associative, this can be shortened to vd=(R*T)*vs=M'*vs. Therefore, a set of consecutive transformations can be accumulated into a single AffineMatrix3D, by multiplying the current transformation with the additional transformation from the left.

Due to this transformational approach, all geometry data types are points in abstract integer or real coordinate spaces, without any physical dimensions attached to them. This physical measurement units are typically only added when using these data types to render something onto a physical output device. For 3D coordinates there is also a projection from 3D to 2D device coordiantes needed. Only then the total transformation matrix (oncluding projection to 2D) and the device resolution determine the actual measurement unit in 3D.

Since
OOo 2.0

Elements' Summary
m00 The top, left matrix entry. 
m01 The top, left middle matrix entry. 
m02 The top, right middle matrix entry. 
m03 The top, right matrix entry. 
m10 The middle, left matrix entry. 
m11 The middle, middle left matrix entry. 
m12 The middle, middle right matrix entry. 
m13 The middle, right matrix entry. 
m20 The bottom, left matrix entry. 
m21 The bottom, middle left matrix entry. 
m22 The bottom, middle right matrix entry. 
m23 The bottom, right matrix entry. 
Elements' Details
m00
double m00;
Description
The top, left matrix entry.
m01
double m01;
Description
The top, left middle matrix entry.
m02
double m02;
Description
The top, right middle matrix entry.
m03
double m03;
Description
The top, right matrix entry.
m10
double m10;
Description
The middle, left matrix entry.
m11
double m11;
Description
The middle, middle left matrix entry.
m12
double m12;
Description
The middle, middle right matrix entry.
m13
double m13;
Description
The middle, right matrix entry.
m20
double m20;
Description
The bottom, left matrix entry.
m21
double m21;
Description
The bottom, middle left matrix entry.
m22
double m22;
Description
The bottom, middle right matrix entry.
m23
double m23;
Description
The bottom, right matrix entry.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.