CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoType::TTransform3D Class Reference

#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
 

Detailed Description

A 3D transformation.

Constructor & Destructor Documentation

◆ TTransform3D()

CartoType::TTransform3D::TTransform3D ( const TTransform aTransform)

Creates a TTransform3FP object from a 2D transform.

Member Function Documentation

◆ Affine2DTransform()

TTransform CartoType::TTransform3D::Affine2DTransform ( ) const

Returns an affine 2D transform derived from the affine 2D part of this transform.

◆ Concat()

void CartoType::TTransform3D::Concat ( const TTransform3D aTransform)

Concatenates aTransform to this transform.

◆ Data()

const double * CartoType::TTransform3D::Data ( ) const
inline

Returns a pointer to the contiguous array of 16 values representing the 4x4 transformation matrix.

◆ Determinant()

double CartoType::TTransform3D::Determinant ( ) const

Returns the determinant of the transform's 4x4 matrix.

◆ Frustum()

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.

◆ Invert()

void CartoType::TTransform3D::Invert ( )

Inverts this transform. If the transform cannot be inverted throws KErrorNoInverse.

◆ operator==()

bool CartoType::TTransform3D::operator== ( const TTransform3D aOther) const
inline

The equality operator.

◆ Perspective()

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.

◆ ReflectY()

void CartoType::TTransform3D::ReflectY ( double  aY)

Reflect the transform around the plane Y == aY.

◆ RotateX()

void CartoType::TTransform3D::RotateX ( double  aAngle)

Rotate the transform around the X axis.

◆ RotateY()

void CartoType::TTransform3D::RotateY ( double  aAngle)

Rotate the transform around the Y axis.

◆ RotateZ()

void CartoType::TTransform3D::RotateZ ( double  aAngle)

Rotate the transform around the Z axis.

◆ Scale()

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.

◆ Transform() [1/2]

void CartoType::TTransform3D::Transform ( double &  aX,
double &  aY,
double &  aZ,
double &  aW 
) const

Transforms a point given in projective coordinates.

◆ Transform() [2/2]

void CartoType::TTransform3D::Transform ( TPoint3FP aPoint) const

Transforms a 3D point in place.

◆ Translate()

void CartoType::TTransform3D::Translate ( double  aX,
double  aY,
double  aZ 
)

Concatenates the translation (aX,aY,aZ) to this transform.


The documentation for this class was generated from the following files: