#include <vector.h>
Public Member Functions | |
constexpr | Vector3 () |
constexpr | Vector3 (const Color &c) |
constexpr | Vector3 (const Point &p) |
constexpr | Vector3 (const Size &s) |
constexpr | Vector3 (Scalar x, Scalar y) |
constexpr | Vector3 (Scalar x, Scalar y, Scalar z) |
Scalar | GetLength () const |
Vector3 | Normalize () const |
constexpr Scalar | Dot (const Vector3 &other) const |
Vector3 | Abs () const |
constexpr Vector3 | Cross (const Vector3 &other) const |
Vector3 | Min (const Vector3 &p) const |
Vector3 | Max (const Vector3 &p) const |
Vector3 | Floor () const |
Vector3 | Ceil () const |
Vector3 | Round () const |
constexpr bool | operator== (const Vector3 &v) const |
constexpr bool | operator!= (const Vector3 &v) const |
constexpr Vector3 | operator+= (const Vector3 &p) |
constexpr Vector3 | operator-= (const Vector3 &p) |
constexpr Vector3 | operator*= (const Vector3 &p) |
template<class U , class = std::enable_if_t<std::is_arithmetic_v<U>>> | |
constexpr Vector3 | operator*= (U scale) |
constexpr Vector3 | operator/= (const Vector3 &p) |
template<class U , class = std::enable_if_t<std::is_arithmetic_v<U>>> | |
constexpr Vector3 | operator/= (U scale) |
constexpr Vector3 | operator- () const |
constexpr Vector3 | operator+ (const Vector3 &v) const |
constexpr Vector3 | operator- (const Vector3 &v) const |
constexpr Vector3 | operator+ (Scalar s) const |
constexpr Vector3 | operator- (Scalar s) const |
constexpr Vector3 | operator* (const Vector3 &v) const |
template<class U , class = std::enable_if_t<std::is_arithmetic_v<U>>> | |
constexpr Vector3 | operator* (U scale) const |
constexpr Vector3 | operator/ (const Vector3 &v) const |
template<class U , class = std::enable_if_t<std::is_arithmetic_v<U>>> | |
constexpr Vector3 | operator/ (U scale) const |
constexpr Vector3 | Lerp (const Vector3 &v, Scalar t) const |
std::string | ToString () const |
Static Public Member Functions | |
static constexpr Vector3 | Combine (const Vector3 &a, Scalar aScale, const Vector3 &b, Scalar bScale) |
Public Attributes | |
union { | |
struct { | |
Scalar x = 0.0f | |
Scalar y = 0.0f | |
Scalar z = 0.0f | |
} | |
Scalar e [3] | |
}; | |
|
inlineconstexpr |
Definition at line 30 of file vector.h.
Referenced by operator*(), operator+(), operator-(), and operator/().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inline |
|
inlinestaticconstexpr |
Make a linear combination of two vectors and return the result.
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. |
Definition at line 192 of file vector.h.
References impeller::saturated::b, x, y, and z.
Referenced by impeller::Matrix::Decompose().
Definition at line 54 of file vector.h.
Referenced by impeller::Matrix::Decompose(), impeller::Matrix::MakeLookAt(), and impeller::Quaternion::operator*().
|
inline |
|
inline |
The length (or magnitude of the vector).
Definition at line 47 of file vector.h.
Referenced by impeller::Paint::MaskBlurDescriptor::CreateMaskBlur(), impeller::Matrix::Decompose(), impeller::Matrix::GetDirectionScale(), and Normalize().
Definition at line 178 of file vector.h.
Referenced by impeller::testing::TEST().
Definition at line 74 of file vector.h.
Referenced by impeller::Color::Blend(), and impeller::testing::TEST().
Definition at line 70 of file vector.h.
Referenced by impeller::Color::Blend(), and impeller::testing::TEST().
|
inline |
Definition at line 49 of file vector.h.
References GetLength(), x, y, and z.
Referenced by impeller::Matrix::Decompose(), and impeller::Matrix::GetDirectionScale().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
std::string impeller::Vector3::ToString | ( | ) | const |
union { ... } |
Scalar impeller::Vector3::e[3] |
Definition at line 27 of file vector.h.
Referenced by impeller::Matrix::Decompose(), and impeller::Matrix::Matrix().
Scalar impeller::Vector3::x = 0.0f |
Definition at line 23 of file vector.h.
Referenced by Abs(), impeller::Color::Blend(), Ceil(), impeller::ClipColor(), Combine(), impeller::ComponentChoose(), Cross(), impeller::Matrix::Decompose(), Dot(), Floor(), impeller::FromRGB(), impeller::GaussianBlurFilterContents::GetFilterSourceCoverage(), GetLength(), impeller::Luminosity(), impeller::Matrix::MakeLookAt(), impeller::Matrix::MakeScale(), impeller::Matrix::MakeTranslateScale(), impeller::Matrix::MakeTranslation(), Max(), Min(), Normalize(), operator!=(), impeller::Matrix::operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), impeller::operator/(), operator/=(), std::operator<<(), operator==(), impeller::Quaternion::Quaternion(), impeller::testing::RGBToYUV(), Round(), impeller::Saturation(), impeller::Matrix::Scale(), impeller::SetSaturation(), impeller::testing::TEST(), impeller::testing::TEST_P(), ToString(), impeller::Matrix::TransformDirection(), impeller::Matrix::Translate(), and Vector3Near().
Scalar impeller::Vector3::y = 0.0f |
Definition at line 24 of file vector.h.
Referenced by Abs(), impeller::Color::Blend(), Ceil(), impeller::ClipColor(), Combine(), impeller::ComponentChoose(), Cross(), impeller::Matrix::Decompose(), Dot(), impeller::DlDispatcherBase::drawShadow(), Floor(), impeller::FromRGB(), impeller::GaussianBlurFilterContents::GetFilterSourceCoverage(), GetLength(), impeller::Luminosity(), impeller::Matrix::MakeLookAt(), impeller::Matrix::MakeScale(), impeller::Matrix::MakeTranslateScale(), impeller::Matrix::MakeTranslation(), Max(), Min(), Normalize(), operator!=(), impeller::Matrix::operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), impeller::operator/(), operator/=(), std::operator<<(), operator==(), impeller::Quaternion::Quaternion(), impeller::testing::RGBToYUV(), Round(), impeller::Saturation(), impeller::Matrix::Scale(), impeller::SetSaturation(), impeller::testing::TEST(), impeller::testing::TEST_P(), ToString(), impeller::Matrix::TransformDirection(), impeller::Matrix::Translate(), and Vector3Near().
Scalar impeller::Vector3::z = 0.0f |
Definition at line 25 of file vector.h.
Referenced by Abs(), impeller::Color::Blend(), Ceil(), impeller::ClipColor(), Combine(), impeller::ComponentChoose(), Cross(), impeller::Matrix::Decompose(), Dot(), Floor(), impeller::FromRGB(), GetLength(), impeller::Luminosity(), impeller::Matrix::MakeLookAt(), impeller::Matrix::MakeScale(), impeller::Matrix::MakeTranslateScale(), impeller::Matrix::MakeTranslation(), Max(), Min(), Normalize(), operator!=(), impeller::Matrix::operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), impeller::operator/(), operator/=(), std::operator<<(), operator==(), impeller::Quaternion::Quaternion(), impeller::testing::RGBToYUV(), Round(), impeller::Saturation(), impeller::Matrix::Scale(), impeller::SetSaturation(), impeller::testing::TEST(), impeller::testing::TEST_P(), ToString(), impeller::Matrix::TransformDirection(), impeller::Matrix::Translate(), and Vector3Near().