| Flutter Impeller |

Public Types | Public Member Functions | Public Attributes | List of all members
impeller::MatrixDecomposition Struct Reference

`#include <matrix_decomposition.h>`

## Public Types
enum | Component { Component::kTranslation = 1 << 0, Component::kScale = 1 << 1, Component::kShear = 1 << 2, Component::kPerspective = 1 << 3, Component::kRotation = 1 << 4 }

## Public Member Functions
uint64_t | GetComponentsMask () const

## Public Attributes
Vector3 | translation
Vector3 | scale
Shear | shear
Vector4 | perspective
Quaternion | rotation

## Detailed Description

Definition at line 15 of file matrix_decomposition.h.

## Member Enumeration Documentation

## ◆ Component

enum impeller::MatrixDecomposition::Component
| strong

Enumerator
kTranslation |
kScale |
kShear |
kPerspective |
kRotation |

Definition at line 22 of file matrix_decomposition.h.

22 {
23 kTranslation = 1 << 0,
24 kScale = 1 << 1,
25 kShear = 1 << 2,
26 kPerspective = 1 << 3,
27 kRotation = 1 << 4,
28 };

## Member Function Documentation

## ◆ GetComponentsMask()

uint64_t impeller::MatrixDecomposition::GetComponentsMask | ( |  | ) | const

Definition at line 361 of file matrix.cc.

361 {
362 uint64_t mask = 0;
363
364 Quaternion noRotation(0.0, 0.0, 0.0, 1.0);
365 if (rotation != noRotation) {
366 mask = mask | static_cast<uint64_t>(Component::kRotation);
367 }
368
369 Vector4 defaultPerspective(0.0, 0.0, 0.0, 1.0);
370 if (perspective != defaultPerspective) {
371 mask = mask | static_cast<uint64_t>(Component::kPerspective);
372 }
373
374 Shear noShear(0.0, 0.0, 0.0);
375 if (shear != noShear) {
376 mask = mask | static_cast<uint64_t>(Component::kShear);
377 }
378
379 Vector3 defaultScale(1.0, 1.0, 1.0);
380 if (scale != defaultScale) {
381 mask = mask | static_cast<uint64_t>(Component::kScale);
382 }
383
384 Vector3 defaultTranslation(0.0, 0.0, 0.0);
385 if (translation != defaultTranslation) {
386 mask = mask | static_cast<uint64_t>(Component::kTranslation);
387 }
388
389 return mask;
390 }

References kPerspective, kRotation, kScale, kShear, kTranslation, perspective, rotation, scale, shear, and translation.

## Member Data Documentation

## ◆ perspective

Vector4 impeller::MatrixDecomposition::perspective

Definition at line 19 of file matrix_decomposition.h.

Referenced by impeller::Matrix::Decompose(), GetComponentsMask(), and impeller::Matrix::Matrix().

## ◆ rotation

Quaternion impeller::MatrixDecomposition::rotation

Definition at line 20 of file matrix_decomposition.h.

Referenced by impeller::Matrix::Decompose(), GetComponentsMask(), impeller::Matrix::Matrix(), and impeller::testing::TEST().

## ◆ scale

Vector3 impeller::MatrixDecomposition::scale

Definition at line 17 of file matrix_decomposition.h.

Referenced by impeller::Matrix::Decompose(), GetComponentsMask(), impeller::Matrix::Matrix(), and impeller::testing::TEST().

## ◆ shear

Shear impeller::MatrixDecomposition::shear

Definition at line 18 of file matrix_decomposition.h.

Referenced by impeller::Matrix::Decompose(), GetComponentsMask(), and impeller::Matrix::Matrix().

## ◆ translation

Vector3 impeller::MatrixDecomposition::translation

Definition at line 16 of file matrix_decomposition.h.

Referenced by impeller::Matrix::Decompose(), GetComponentsMask(), impeller::Matrix::Matrix(), and impeller::testing::TEST().

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

- impeller/geometry/matrix_decomposition.h
- impeller/geometry/matrix.cc

impeller::MatrixDecomposition::Component::kPerspective
@ kPerspective
impeller::MatrixDecomposition::shear
Shear shear
Definition: matrix_decomposition.h:18
impeller::MatrixDecomposition::Component::kScale
@ kScale
impeller::MatrixDecomposition::Component::kTranslation
@ kTranslation
impeller::MatrixDecomposition::perspective
Vector4 perspective
Definition: matrix_decomposition.h:19
impeller::MatrixDecomposition::translation
Vector3 translation
Definition: matrix_decomposition.h:16
impeller::MatrixDecomposition::Component::kShear
@ kShear
impeller::MatrixDecomposition::rotation
Quaternion rotation
Definition: matrix_decomposition.h:20
impeller::MatrixDecomposition::scale
Vector3 scale
Definition: matrix_decomposition.h:17
impeller::MatrixDecomposition::Component::kRotation
@ kRotation