|
CartoType C++ API 9.6-4-g79291b60b
for Windows, Linux, Qt and other platforms supporting C++ development
|
#include <cartotype_transform.h>
Public Member Functions | |
| Transform3D (const AffineTransform &aTransform) | |
| Transform3D (double aA, double aB, double aC, double aD, double aTx, double aTy) | |
| Transform3D (const TransformComponents &aComponents) | |
| Transform3D (const std::array< double, 4 > &aQuaternion, const Point3FP &aTranslation) | |
| bool | operator== (const Transform3D &aOther) const |
| bool | VirtuallyEqual (const Transform3D &aOther) const |
| void | Transform (Point3FP &aPoint) const |
| void | Transform (double &aX, double &aY, double &aZ, double &aW) const |
| void | Concat (const Transform3D &aTransform) |
| void | Prefix (const Transform3D &aTransform) |
| void | Translate (double aX, double aY, double aZ) |
| void | Scale (double aXScale, double aYScale, double aZScale) |
| void | RotateX (double aAngle) |
| void | RotateY (double aAngle) |
| void | RotateZ (double aAngle) |
| void | ReflectY (double aY) |
| bool | Normalize () |
| void | Invert () |
| void | Transpose () |
| double | Determinant () const |
| Result | Perspective (double aFieldOfViewYDegrees, double aAspect, double aNear, double aFar) |
| Result | Frustum (double aLeft, double aRight, double aBottom, double aTop, double aNear, double aFar) |
| AffineTransform | Affine2DTransform () const |
| std::array< double, 16 > & | Data () |
| const std::array< double, 16 > & | Data () const |
A 3D transform.
| CartoTypeCore::Transform3D::Transform3D | ( | const AffineTransform & | aTransform | ) |
Creates a Transform3D object from a 2D transform.
| CartoTypeCore::Transform3D::Transform3D | ( | double | aA, |
| double | aB, | ||
| double | aC, | ||
| double | aD, | ||
| double | aTx, | ||
| double | aTy | ||
| ) |
Creates a 3D transform from the parameters of a 2D affine transform.
| CartoTypeCore::Transform3D::Transform3D | ( | const TransformComponents & | aComponents | ) |
Creates a Transform3D object from a set of components.
| CartoTypeCore::Transform3D::Transform3D | ( | const std::array< double, 4 > & | aQuaternion, |
| const Point3FP & | aTranslation | ||
| ) |
Creates a Transform3D object from a quaternion representing a rotation, and a translation.
| AffineTransform CartoTypeCore::Transform3D::Affine2DTransform | ( | ) | const |
Returns an affine 2D transform derived from the affine 2D part of this transform.
| void CartoTypeCore::Transform3D::Concat | ( | const Transform3D & | aTransform | ) |
Concatenates aTransform to this transform.
|
inline |
Returns a reference to the contiguous array of 16 values representing the 4x4 transformation matrix.
|
inline |
Returns a const reference to the contiguous array of 16 values representing the 4x4 transformation matrix.
| double CartoTypeCore::Transform3D::Determinant | ( | ) | const |
Returns the determinant of the transform's 4x4 matrix.
| Result CartoTypeCore::Transform3D::Frustum | ( | double | aLeft, |
| double | aRight, | ||
| double | aBottom, | ||
| double | aTop, | ||
| double | aNear, | ||
| double | aFar | ||
| ) |
Concatenates a perspective transformation defined by a frustum to this transform.
| void CartoTypeCore::Transform3D::Invert | ( | ) |
Inverts this transform. If the transform cannot be inverted throws KErrorNoInverse.
| bool CartoTypeCore::Transform3D::Normalize | ( | ) |
Normalizes the transform by setting the scale to unity and adjusting the other W values.
|
inline |
The equality operator.
| Result CartoTypeCore::Transform3D::Perspective | ( | double | aFieldOfViewYDegrees, |
| double | aAspect, | ||
| double | aNear, | ||
| double | aFar | ||
| ) |
Concatenates a perspective transformation to this transform.
aFieldOfViewYDegrees is the vertical angle of the field of view: that is, the angle between the top and bottom planes of the view frustum.
aAspect is the ratio between the width and height of the screen and is calculated as width / height.
aNear is the distance from the eye to the near plane of the view frustum.
aFar is the distance from the eye to the far plane of the view frustum.
| void CartoTypeCore::Transform3D::Prefix | ( | const Transform3D & | aTransform | ) |
Prefixes aTransform to this transform.
| void CartoTypeCore::Transform3D::ReflectY | ( | double | aY | ) |
Reflect the transform around the plane Y == aY.
| void CartoTypeCore::Transform3D::RotateX | ( | double | aAngle | ) |
Rotate the transform around the X axis.
| void CartoTypeCore::Transform3D::RotateY | ( | double | aAngle | ) |
Rotate the transform around the Y axis.
| void CartoTypeCore::Transform3D::RotateZ | ( | double | aAngle | ) |
Rotate the transform around the Z axis.
| void CartoTypeCore::Transform3D::Scale | ( | double | aXScale, |
| double | aYScale, | ||
| double | aZScale | ||
| ) |
Scale a transform by aXScale, aYScale and aZScale. Do nothing if either XScale, YScale or aZScale is 0, which creates a non-invertible matrix.
| void CartoTypeCore::Transform3D::Transform | ( | double & | aX, |
| double & | aY, | ||
| double & | aZ, | ||
| double & | aW | ||
| ) | const |
Transforms a point given in projective coordinates.
| void CartoTypeCore::Transform3D::Transform | ( | Point3FP & | aPoint | ) | const |
Transforms a 3D point in place.
| void CartoTypeCore::Transform3D::Translate | ( | double | aX, |
| double | aY, | ||
| double | aZ | ||
| ) |
Concatenates the translation (aX,aY,aZ) to this transform.
| void CartoTypeCore::Transform3D::Transpose | ( | ) |
Transposes the transform.
| bool CartoTypeCore::Transform3D::VirtuallyEqual | ( | const Transform3D & | aOther | ) | const |
Compare for virtually equal, ignoring differences smaller than 1e-10. Use when testing.