Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
skgpu::wangs_formula::VectorXform Class Reference

#include <WangsFormula.h>

Public Member Functions

AI VectorXform ()
 
AI VectorXform (const SkMatrix &m)
 
AI VectorXform (const SkM44 &m)
 
AI VectorXformoperator= (const SkMatrix &m)
 
AI VectorXformoperator= (const SkM44 &m)
 
AI skvx::float2 operator() (skvx::float2 vector) const
 
AI skvx::float4 operator() (skvx::float4 vectors) const
 

Detailed Description

Definition at line 105 of file WangsFormula.h.

Constructor & Destructor Documentation

◆ VectorXform() [1/3]

AI skgpu::wangs_formula::VectorXform::VectorXform ( )
inline

Definition at line 107 of file WangsFormula.h.

107: fC0{1.0f, 0.f}, fC1{0.f, 1.f} {}

◆ VectorXform() [2/3]

AI skgpu::wangs_formula::VectorXform::VectorXform ( const SkMatrix m)
inlineexplicit

Definition at line 108 of file WangsFormula.h.

◆ VectorXform() [3/3]

AI skgpu::wangs_formula::VectorXform::VectorXform ( const SkM44 m)
inlineexplicit

Definition at line 109 of file WangsFormula.h.

109{ *this = m; }

Member Function Documentation

◆ operator()() [1/2]

AI skvx::float2 skgpu::wangs_formula::VectorXform::operator() ( skvx::float2  vector) const
inline

Definition at line 123 of file WangsFormula.h.

123 {
124 return fC0 * vector.x() + fC1 * vector.y();
125 }

◆ operator()() [2/2]

AI skvx::float4 skgpu::wangs_formula::VectorXform::operator() ( skvx::float4  vectors) const
inline

Definition at line 126 of file WangsFormula.h.

126 {
127 return join(fC0 * vectors.x() + fC1 * vectors.y(),
128 fC0 * vectors.z() + fC1 * vectors.w());
129 }
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741

◆ operator=() [1/2]

AI VectorXform & skgpu::wangs_formula::VectorXform::operator= ( const SkM44 m)
inline

Definition at line 117 of file WangsFormula.h.

117 {
118 SkASSERT(m.rc(3,0) == 0.f && m.rc(3,1) == 0.f && m.rc(3,2) == 0.f && m.rc(3,3) == 1.f);
119 fC0 = {m.rc(0,0), m.rc(1,0)};
120 fC1 = {m.rc(0,1), m.rc(1,1)};
121 return *this;
122 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ operator=() [2/2]

AI VectorXform & skgpu::wangs_formula::VectorXform::operator= ( const SkMatrix m)
inline

Definition at line 111 of file WangsFormula.h.

111 {
112 SkASSERT(!m.hasPerspective());
113 fC0 = {m.rc(0,0), m.rc(1,0)};
114 fC1 = {m.rc(0,1), m.rc(1,1)};
115 return *this;
116 }

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