struct new in Git master
#include <Magnum/Shaders/Generic.h>
TransformationUniform2D 2D transformation uniform common for all shaders
Contains the per-draw transformation matrix.
Constructors, destructors, conversion operators
- TransformationUniform2D(DefaultInitT = DefaultInit) explicit constexpr noexcept
- Construct with default parameters.
- TransformationUniform2D(NoInitT) explicit noexcept
- Construct without initializing the contents.
Public variables
- Matrix3x4 transformationMatrix
- Transformation matrix.
Convenience setters
Provided to allow the use of method chaining for populating a structure in a single expression, otherwise equivalent to accessing the fields directly. Also guaranteed to provide backwards compatibility when packing of the actual fields changes.
- auto setTransformationMatrix(const Matrix3& matrix) -> TransformationUniform2D&
- Set the transformationMatrix field.
Function documentation
TransformationUniform2D& Magnum:: Shaders:: TransformationUniform2D:: setTransformationMatrix(const Matrix3& matrix)
Set the transformationMatrix field.
Returns | Reference to self (for method chaining) |
---|
The matrix is expanded to Matrix3x4, with the bottom row being zeros.
Variable documentation
Matrix3x4 Magnum:: Shaders:: TransformationUniform2D:: transformationMatrix
Transformation matrix.
Default value is an identity matrix. The bottom row is unused and acts only as a padding to match uniform buffer packing rules.