Class implementing camera matrix named constructors. More...
#include </home/chochlik/devel/oglplus/include/oglplus/math/matrix.hpp>
Public Member Functions | |
CameraMatrix (void) | |
Constructs an identity matrix. | |
const T * | Data (void) const |
Returns a pointer to the matrix elements in row major order. | |
std::size_t | Size (void) const |
Returns the number of elements of the matrix. | |
T | At (std::size_t i, std::size_t j) const |
Returns the value of the element at position i, j. More... | |
void | Set (std::size_t i, std::size_t j, T v) |
Sets the value of the element at position i, j. More... | |
Vector< T, Cols > | Row (std::size_t i) const |
Returns the i-th row of this matrix. More... | |
Vector< T, Rows > | Col (std::size_t j) const |
Return the j-th column of this matrix. More... | |
Matrix< T, R, C > | Submatrix (void) const |
Submatrix extraction. | |
Static Public Member Functions | |
static CameraMatrix | Perspective (T x_left, T x_right, T y_bottom, T y_top, T z_near, T z_far) |
Constructs a perspective projection matrix. More... | |
static CameraMatrix | PerspectiveX (Angle< T > xfov, T aspect, T z_near, T z_far) |
Constructs a perspective projection matrix. More... | |
static CameraMatrix | PerspectiveY (Angle< T > yfov, T aspect, T z_near, T z_far) |
Constructs a perspective projection matrix. More... | |
static CameraMatrix | Ortho (T x_left, T x_right, T y_bottom, T y_top, T z_near, T z_far) |
Constructs an orthographic projection matrix. More... | |
static CameraMatrix | OrthoX (T width, T aspect, T z_near, T z_far) |
Constructs an orthographic projection matrix. More... | |
static CameraMatrix | OrthoY (T height, T aspect, T z_near, T z_far) |
Constructs an orthographic projection matrix. More... | |
static CameraMatrix | ScreenStretch (T x_left, T x_right, T y_bottom, T y_top) |
Constructs a matrix for stretching NDCs after projection. More... | |
static CameraMatrix | ScreenTile (unsigned x, unsigned y, unsigned nx, unsigned ny) |
Constructs a matrix for stretching NDCs after projection. More... | |
static CameraMatrix | LookingAt (const Vector< T, 3 > &eye, const Vector< T, 3 > &target) |
Constructs a 'look-at' matrix from eye and target positions. | |
static CameraMatrix | LookingAt (const Vector< T, 3 > &eye, const Vector< T, 3 > &target, const Vector< T, 3 > &up) |
Constructs 'look-at' matrix from eye and target positions and up vector. | |
static CameraMatrix | Orbiting (const Vector< T, 3 > &target, T radius, Angle< T > azimuth, Angle< T > elevation) |
Constructs a matrix from target, radius, azimuth and elevation. | |
static CameraMatrix | Pitch (Angle< T > angle) |
Constructs a X-axis rotation (Pitch/Elevation) matrix. More... | |
static CameraMatrix | Yaw (Angle< T > angle) |
Constructs a Y-axis rotation (Heading/Yaw) matrix. More... | |
static CameraMatrix | Roll (Angle< T > angle) |
Constructs a Z-axis rotation (Bank/Roll) matrix. More... | |
Class implementing camera matrix named constructors.
The static methods of this class can be used for the construction of various camera matrices.
|
inherited |
Returns the value of the element at position i, j.
Return the j-th column of this matrix.
|
static |
Constructs an orthographic projection matrix.
Creates a new orthographic matrix from the x-axis x_left
, x_right
, y-axis y_bottom
, y_top
and z-axis z_near
and z_far
values
|
static |
Constructs an orthographic projection matrix.
Creates a new orthographic matrix from x-axis width
, x/y aspect
ratio and z-axis z_near
and z_far
planes
|
static |
Constructs an orthographic projection matrix.
Creates a new orthographic matrix from y-axis height
, x/y aspect
ratio and z-axis z_near
and z_far
planes
|
static |
Constructs a perspective projection matrix.
Creates a new perspective matrix from x_left
, x_right
, y_botton
, y_top
, z_near
and z_far
values.
|
static |
Constructs a perspective projection matrix.
Creates a new perspective matrix from x-axis xfov
angle, x/y aspect
ratio and z-axis z_near
and z_far
planes
|
static |
Constructs a perspective projection matrix.
Creates a new perspective matrix from y-axis yfov
angle, x/y aspect
ratio and z-axis z_near
and z_far
planes
|
static |
Constructs a X-axis rotation (Pitch/Elevation) matrix.
The initial heading is the negative Z-axis, y_top is the Y-axis, x_right is X-axis. Positive angle values do counter-clockwise rotation (looking up), negative angles cause clockwise changes in pitch (looking down).
|
static |
Constructs a Z-axis rotation (Bank/Roll) matrix.
The initial position is that y_top is the Y-axis, heading in the negative Z-axis direction, x_right is X-axis. Positive angle values do counter-clockwise banking, negative angles do clockwise banking.
Returns the i-th row of this matrix.
|
static |
Constructs a matrix for stretching NDCs after projection.
ScreenStretch constructs a matrix that can be used to stretch the normalized device coordinates after projection is applied.
|
static |
Constructs a matrix for stretching NDCs after projection.
ScreenTile constructs a matrix, that divides the screen into rectangular tiles with the specified divisions and stretches the normalized device coordinates to show the specified tile.
|
inherited |
Sets the value of the element at position i, j.
|
static |
Constructs a Y-axis rotation (Heading/Yaw) matrix.
The initial heading is the negative Z-axix, y_top is the Y-axis, x_right is X-axis. Positive angle values do counter-clockwise rotation, negative angles cause clockwise changes in heading.