CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
|
#include <cartotype_transform.h>
Public Member Functions | |
TTransform3D (const TTransform &aTransform) | |
bool | operator== (const TTransform3D &aOther) const |
void | Transform (TPoint3FP &aPoint) const |
void | Transform (double &aX, double &aY, double &aZ, double &aW) const |
void | Concat (const TTransform3D &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) |
void | Invert () |
double | Determinant () const |
TResult | Perspective (double aFieldOfViewYDegrees, double aAspect, double aNear, double aFar) |
TResult | Frustum (double aLeft, double aRight, double aBottom, double aTop, double aNear, double aFar) |
TTransform | Affine2DTransform () const |
const double * | Data () const |
A 3D transformation.
CartoType::TTransform3D::TTransform3D | ( | const TTransform & | aTransform | ) |
Creates a TTransform3FP object from a 2D transform.
TTransform CartoType::TTransform3D::Affine2DTransform | ( | ) | const |
Returns an affine 2D transform derived from the affine 2D part of this transform.
void CartoType::TTransform3D::Concat | ( | const TTransform3D & | aTransform | ) |
Concatenates aTransform to this transform.
|
inline |
Returns a pointer to the contiguous array of 16 values representing the 4x4 transformation matrix.
double CartoType::TTransform3D::Determinant | ( | ) | const |
Returns the determinant of the transform's 4x4 matrix.
TResult CartoType::TTransform3D::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 CartoType::TTransform3D::Invert | ( | ) |
Inverts this transform. If the transform cannot be inverted throws KErrorNoInverse.
|
inline |
The equality operator.
TResult CartoType::TTransform3D::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 CartoType::TTransform3D::ReflectY | ( | double | aY | ) |
Reflect the transform around the plane Y == aY.
void CartoType::TTransform3D::RotateX | ( | double | aAngle | ) |
Rotate the transform around the X axis.
void CartoType::TTransform3D::RotateY | ( | double | aAngle | ) |
Rotate the transform around the Y axis.
void CartoType::TTransform3D::RotateZ | ( | double | aAngle | ) |
Rotate the transform around the Z axis.
void CartoType::TTransform3D::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 CartoType::TTransform3D::Transform | ( | double & | aX, |
double & | aY, | ||
double & | aZ, | ||
double & | aW | ||
) | const |
Transforms a point given in projective coordinates.
void CartoType::TTransform3D::Transform | ( | TPoint3FP & | aPoint | ) | const |
Transforms a 3D point in place.
void CartoType::TTransform3D::Translate | ( | double | aX, |
double | aY, | ||
double | aZ | ||
) |
Concatenates the translation (aX,aY,aZ) to this transform.