Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::datatypes::Mat4x4 Struct Reference

Datatype: A 4x4 Matrix. More...

#include <rerun/datatypes/mat4x4.hpp>

Public Member Functions

 Mat4x4 (const Vec4D(&columns)[4])
 Creates a new 4x4 matrix from 3 columns of 4 elements each.
 
 Mat4x4 (const float *elements)
 Construct a new 4x4 matrix from a pointer to 16 floats (in row major order).
 
 Mat4x4 (std::array< float, 16 > flat_columns_)
 
Mat4x4operator= (std::array< float, 16 > flat_columns_)
 

Public Attributes

std::array< float, 16 > flat_columns
 Flat list of matrix coefficients in column-major order.
 

Static Public Attributes

static const Mat4x4 IDENTITY
 

Detailed Description

Datatype: A 4x4 Matrix.

Matrices in Rerun are stored as flat list of coefficients in column-major order:

column 0 column 1 column 2 column 3
--------------------------------------------------------------------
row 0 | flat_columns[0] flat_columns[4] flat_columns[8] flat_columns[12]
row 1 | flat_columns[1] flat_columns[5] flat_columns[9] flat_columns[13]
row 2 | flat_columns[2] flat_columns[6] flat_columns[10] flat_columns[14]
row 3 | flat_columns[3] flat_columns[7] flat_columns[11] flat_columns[15]

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