| Flutter Impeller |

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

`#include <matrix_decomposition.h>`

## Public Types
enum class | Component { kTranslation = 1 << 0 , kScale = 1 << 1 , kShear = 1 << 2 , kPerspective = 1 << 3 , 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 433 of file matrix.cc.

433 {
434 uint64_t mask = 0;
435
436 Quaternion noRotation(0.0, 0.0, 0.0, 1.0);
437 if (rotation != noRotation) {
438 mask = mask | static_cast<uint64_t>(Component::kRotation);
439 }
440
441 Vector4 defaultPerspective(0.0, 0.0, 0.0, 1.0);
442 if (perspective != defaultPerspective) {
443 mask = mask | static_cast<uint64_t>(Component::kPerspective);
444 }
445
446 Shear noShear(0.0, 0.0, 0.0);
447 if (shear != noShear) {
448 mask = mask | static_cast<uint64_t>(Component::kShear);
449 }
450
451 Vector3 defaultScale(1.0, 1.0, 1.0);
452 if (scale != defaultScale) {
453 mask = mask | static_cast<uint64_t>(Component::kScale);
454 }
455
456 Vector3 defaultTranslation(0.0, 0.0, 0.0);
457 if (translation != defaultTranslation) {
458 mask = mask | static_cast<uint64_t>(Component::kTranslation);
459 }
460
461 return mask;
462 }
impeller::MatrixDecomposition::shear
Shear shear
Definition: matrix_decomposition.h:18
impeller::MatrixDecomposition::scale
Vector3 scale
Definition: matrix_decomposition.h:17
impeller::MatrixDecomposition::Component::kTranslation
@ kTranslation
impeller::MatrixDecomposition::Component::kScale
@ kScale
impeller::MatrixDecomposition::Component::kRotation
@ kRotation
impeller::MatrixDecomposition::Component::kPerspective
@ kPerspective
impeller::MatrixDecomposition::Component::kShear
@ kShear
impeller::MatrixDecomposition::perspective
Vector4 perspective
Definition: matrix_decomposition.h:19
impeller::MatrixDecomposition::rotation
Quaternion rotation
Definition: matrix_decomposition.h:20
impeller::MatrixDecomposition::translation
Vector3 translation
Definition: matrix_decomposition.h:16

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