NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
Matrix4X4T< _SDKMatrix4X4 > Class Template Reference

This class represents a 3D transformation. The matrix is laid out as follows: More...

#include <matrix4x4.h>

Inherits _SDKMatrix4X4.

Public Member Functions

_MyType & SetIdentity ()
 Sets to identity.
 
double Determinant () const noexcept
 Returns the matrix determinant.
 
_MyType & LookAt (const PointF3D &camera_pos, const PointF3D &look_pos, const PointF3D &camera_up) noexcept
 Look at position matrix camera_pos - Camera position look_pos - Camera look position camera_up - Camera up direction.
 
_MyType & Rotate (const coordinate_type angle_deg) noexcept
 Rotate around the center on specified angle. Negative angle - clockwise rotation in SDK coordinate system, positive - counter clockwise.
 
_MyType & Scale (const coordinate_type scale_x, const coordinate_type scale_y, const coordinate_type scale_z=1) noexcept
 Creates the scale transformation matrix.
 
_MyType & Translate (const coordinate_type x, const coordinate_type y, const coordinate_type z=0) noexcept
 Creates a translation transformation that has the specified x and y displacements.
 
_MyType & operator*= (const SDKMatrix4X4 &m2)
 Multiplication of this matrix to a specified one.
 
PointD2D Transform (const SDKPointD2D &point) const
 Transforms a 2D double point by this matrix.
 
PointF2D Transform (const SDKPointF2D &point) const
 Transforms a 2D float point by this matrix.
 
PointI2D Transform (const SDKPointI2D &point) const
 Transforms a 2D integer point by this matrix.
 
PointD3D Transform3D (const SDKPointD3D &point) const
 Transforms a 3D double point by this matrix.
 
PointF3D Transform3D (const SDKPointF3D &point) const
 Transforms a 3D float point by this matrix.
 
bool Invert () noexcept
 Inverts matrix, if possible.
 

Detailed Description

template<class _SDKMatrix4X4>
class sdk::Matrix4X4T< _SDKMatrix4X4 >

This class represents a 3D transformation. The matrix is laid out as follows:

_11 _12 _13 _14 _21 _22 _23 _24 _31 _32 _33 _34 _41 _42 _43 _44

This matrix is treated as row-major. Assuming we consider our vectors row vectors, this matrix type will be identical in memory to the OpenGL and D3D matrices. OpenGL matrices are column-major, however OpenGL also treats vectors as column vectors, the double transposition makes everything work out nicely.


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