#include <vector.h>
Definition at line 20 of file vector.h.
◆ Vector3() [1/6]
constexpr impeller::Vector3::Vector3 |
( |
| ) |
|
|
inlineconstexpr |
◆ Vector3() [2/6]
constexpr impeller::Vector3::Vector3 |
( |
const Color & |
c | ) |
|
|
inlineconstexpr |
Definition at line 32 of file vector.h.
32:
x(c.red),
y(c.green),
z(c.blue) {}
◆ Vector3() [3/6]
constexpr impeller::Vector3::Vector3 |
( |
const Point & |
p | ) |
|
|
inlineconstexpr |
◆ Vector3() [4/6]
constexpr impeller::Vector3::Vector3 |
( |
const Size & |
s | ) |
|
|
inlineconstexpr |
Definition at line 36 of file vector.h.
36:
x(
s.width),
y(
s.height) {}
◆ Vector3() [5/6]
◆ Vector3() [6/6]
◆ Abs()
constexpr Vector3 impeller::Vector3::Abs |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 58 of file vector.h.
58 {
59 return {std::fabs(
x), std::fabs(
y), std::fabs(
z)};
60 }
◆ Ceil()
constexpr Vector3 impeller::Vector3::Ceil |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 82 of file vector.h.
82 {
84 }
SIN Vec< N, float > ceil(const Vec< N, float > &x)
◆ Combine()
Make a linear combination of two vectors and return the result.
- Parameters
-
a | the first vector. |
aScale | the scale to use for the first vector. |
b | the second vector. |
bScale | the scale to use for the second vector. |
- Returns
- the combined vector.
Definition at line 192 of file vector.h.
195 {
196 return {
197 aScale *
a.
x + bScale *
b.x,
198 aScale *
a.
y + bScale *
b.y,
199 aScale *
a.z + bScale *
b.z,
200 };
201 }
◆ Cross()
constexpr Vector3 impeller::Vector3::Cross |
( |
const Vector3 & |
other | ) |
const |
|
inlineconstexpr |
Definition at line 62 of file vector.h.
62 {
63 return {
64 (
y * other.z) - (
z * other.y),
65 (
z * other.x) - (
x * other.z),
66 (
x * other.y) - (
y * other.x)
67 };
68 }
◆ Dot()
constexpr Scalar impeller::Vector3::Dot |
( |
const Vector3 & |
other | ) |
const |
|
inlineconstexpr |
Definition at line 54 of file vector.h.
54 {
55 return ((
x * other.x) + (
y * other.y) + (
z * other.z));
56 }
◆ Floor()
constexpr Vector3 impeller::Vector3::Floor |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 78 of file vector.h.
78 {
80 }
SIN Vec< N, float > floor(const Vec< N, float > &x)
◆ Length()
constexpr Scalar impeller::Vector3::Length |
( |
| ) |
const |
|
inlineconstexpr |
The length (or magnitude of the vector).
- Returns
- the calculated length.
Definition at line 47 of file vector.h.
SIN Vec< N, float > sqrt(const Vec< N, float > &x)
◆ Lerp()
Definition at line 178 of file vector.h.
178 {
179 return *this + (v - *this) * t;
180 }
◆ Max()
Definition at line 74 of file vector.h.
74 {
76 }
static float max(float r, float g, float b)
◆ Min()
Definition at line 70 of file vector.h.
70 {
72 }
static float min(float r, float g, float b)
◆ Normalize()
constexpr Vector3 impeller::Vector3::Normalize |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 49 of file vector.h.
49 {
52 }
constexpr Scalar Length() const
◆ operator!=()
constexpr bool impeller::Vector3::operator!= |
( |
const Vector3 & |
v | ) |
const |
|
inlineconstexpr |
Definition at line 94 of file vector.h.
94 {
95 return v.x !=
x || v.y !=
y || v.z !=
z;
96 }
◆ operator*() [1/2]
constexpr Vector3 impeller::Vector3::operator* |
( |
const Vector3 & |
v | ) |
const |
|
inlineconstexpr |
◆ operator*() [2/2]
template<class U , class = std::enable_if_t<std::is_arithmetic_v<U>>>
constexpr Vector3 impeller::Vector3::operator* |
( |
U |
scale | ) |
const |
|
inlineconstexpr |
◆ operator*=() [1/2]
Definition at line 112 of file vector.h.
112 {
116 return *this;
117 }
◆ operator*=() [2/2]
template<class U , class = std::enable_if_t<std::is_arithmetic_v<U>>>
constexpr Vector3 impeller::Vector3::operator*= |
( |
U |
scale | ) |
|
|
inlineconstexpr |
Definition at line 120 of file vector.h.
120 {
124 return *this;
125 }
◆ operator+() [1/2]
constexpr Vector3 impeller::Vector3::operator+ |
( |
const Vector3 & |
v | ) |
const |
|
inlineconstexpr |
◆ operator+() [2/2]
◆ operator+=()
Definition at line 98 of file vector.h.
98 {
102 return *this;
103 }
◆ operator-() [1/3]
constexpr Vector3 impeller::Vector3::operator- |
( |
| ) |
const |
|
inlineconstexpr |
◆ operator-() [2/3]
constexpr Vector3 impeller::Vector3::operator- |
( |
const Vector3 & |
v | ) |
const |
|
inlineconstexpr |
◆ operator-() [3/3]
◆ operator-=()
Definition at line 105 of file vector.h.
105 {
109 return *this;
110 }
◆ operator/() [1/2]
constexpr Vector3 impeller::Vector3::operator/ |
( |
const Vector3 & |
v | ) |
const |
|
inlineconstexpr |
◆ operator/() [2/2]
template<class U , class = std::enable_if_t<std::is_arithmetic_v<U>>>
constexpr Vector3 impeller::Vector3::operator/ |
( |
U |
scale | ) |
const |
|
inlineconstexpr |
◆ operator/=() [1/2]
Definition at line 127 of file vector.h.
127 {
131 return *this;
132 }
◆ operator/=() [2/2]
template<class U , class = std::enable_if_t<std::is_arithmetic_v<U>>>
constexpr Vector3 impeller::Vector3::operator/= |
( |
U |
scale | ) |
|
|
inlineconstexpr |
Definition at line 135 of file vector.h.
135 {
139 return *this;
140 }
◆ operator==()
constexpr bool impeller::Vector3::operator== |
( |
const Vector3 & |
v | ) |
const |
|
inlineconstexpr |
Definition at line 90 of file vector.h.
90 {
91 return v.x ==
x && v.y ==
y && v.z ==
z;
92 }
◆ Round()
constexpr Vector3 impeller::Vector3::Round |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 86 of file vector.h.
86 {
88 }
static void round(SkPoint *p)
◆ ToString()
std::string impeller::Vector3::ToString |
( |
| ) |
const |
Definition at line 10 of file vector.cc.
10 {
12 stream <<
"{" <<
x <<
", " <<
y <<
", " <<
z <<
"}";
14}
union { ... } impeller::Vector3::@39 |
Scalar impeller::Vector3::e[3] |
Scalar impeller::Vector3::x = 0.0f |
Scalar impeller::Vector3::y = 0.0f |
Scalar impeller::Vector3::z = 0.0f |
The documentation for this struct was generated from the following files: