namespace drawinglayer::geometry
{ /** Implementation class for ViewInformation3D
*/ class ImpViewInformation3D
{ private: // ViewInformation3D implementation can change refcount, so we have only // two memory regions for pairs of ViewInformation3D/ImpViewInformation3D friendclass ::drawinglayer::geometry::ViewInformation3D;
// the 3D transformations // Object to World. This may change and being adapted when entering 3D transformation // groups
basegfx::B3DHomMatrix maObjectTransformation;
// World to Camera. This includes VRP, VPN and VUV camera coordinate system
basegfx::B3DHomMatrix maOrientation;
// Camera to Device with X,Y and Z [-1.0 .. 1.0]. This is the // 3D to 2D projection which may be parallel or perspective. When it is perspective, // the last line of the homogen matrix will NOT be unused
basegfx::B3DHomMatrix maProjection;
// Device to View with X,Y and Z [0.0 .. 1.0]. This converts from -1 to 1 coordinates // in camera coordinate system to 0 to 1 in unit 2D coordinates. This way it stays // view-independent. To get discrete coordinates, the 2D transformation of a scene // as 2D object needs to be involved
basegfx::B3DHomMatrix maDeviceToView;
// Object to View is the linear combination of all four transformations. It's // buffered to avoid too much matrix multiplying and created on demand
basegfx::B3DHomMatrix maObjectToView;
// the point in time double mfViewTime;
// the extra PropertyValues; does not contain the transformations
uno::Sequence< beans::PropertyValue > mxExtendedInformation;
// a central PropertyValue parsing method to allow transportation of // all ViewParameters using UNO API void impInterpretPropertyValues(const uno::Sequence< beans::PropertyValue >& rViewParameters)
{ if(!rViewParameters.hasElements()) return;
// prepare extended information for filtering. Maximum size is nCount
mxExtendedInformation.realloc(nCount); auto pExtendedInformation = mxExtendedInformation.getArray();
if(rProp.Name == OBJECT_TRANSFORMATION)
{
css::geometry::AffineMatrix3D aAffineMatrix3D;
rProp.Value >>= aAffineMatrix3D;
maObjectTransformation = basegfx::unotools::homMatrixFromAffineMatrix3D(aAffineMatrix3D);
} elseif(rProp.Name == ORIENTATION)
{
css::geometry::AffineMatrix3D aAffineMatrix3D;
rProp.Value >>= aAffineMatrix3D;
maOrientation = basegfx::unotools::homMatrixFromAffineMatrix3D(aAffineMatrix3D);
} elseif(rProp.Name == PROJECTION)
{ // projection may be defined using a frustum in which case the last line of // the 4x4 matrix is not (0,0,0,1). Since AffineMatrix3D does not support that, // these four values need to be treated extra constdouble f_30(maProjection.get(3, 0)); constdouble f_31(maProjection.get(3, 1)); constdouble f_32(maProjection.get(3, 2)); constdouble f_33(maProjection.get(3, 3));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.