Flutter Engine
The Flutter Engine
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

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 370 of file matrix.cc.

370 {
371 uint64_t mask = 0;
372
373 Quaternion noRotation(0.0, 0.0, 0.0, 1.0);
374 if (rotation != noRotation) {
375 mask = mask | static_cast<uint64_t>(Component::kRotation);
376 }
377
378 Vector4 defaultPerspective(0.0, 0.0, 0.0, 1.0);
379 if (perspective != defaultPerspective) {
380 mask = mask | static_cast<uint64_t>(Component::kPerspective);
381 }
382
383 Shear noShear(0.0, 0.0, 0.0);
384 if (shear != noShear) {
385 mask = mask | static_cast<uint64_t>(Component::kShear);
386 }
387
388 Vector3 defaultScale(1.0, 1.0, 1.0);
389 if (scale != defaultScale) {
390 mask = mask | static_cast<uint64_t>(Component::kScale);
391 }
392
393 Vector3 defaultTranslation(0.0, 0.0, 0.0);
394 if (translation != defaultTranslation) {
395 mask = mask | static_cast<uint64_t>(Component::kTranslation);
396 }
397
398 return mask;
399}

Member Data Documentation

◆ perspective

Vector4 impeller::MatrixDecomposition::perspective

Definition at line 19 of file matrix_decomposition.h.

◆ rotation

Quaternion impeller::MatrixDecomposition::rotation

Definition at line 20 of file matrix_decomposition.h.

◆ scale

Vector3 impeller::MatrixDecomposition::scale

Definition at line 17 of file matrix_decomposition.h.

◆ shear

Shear impeller::MatrixDecomposition::shear

Definition at line 18 of file matrix_decomposition.h.

◆ translation

Vector3 impeller::MatrixDecomposition::translation

Definition at line 16 of file matrix_decomposition.h.


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