For now just a wrapper around Math::vec4 for type safety.
- Copyright
- (C) 2025 Individual contributors, see AUTHORS file
|
| Color ()=default |
|
| Color (const Color &c)=default |
|
| Color (float r, float g, float b, float a) |
|
| Color (const Math::vec4 &v) |
| copy constructor from vec4
|
|
| Color (const Math::vec3 &v) |
| copy constructor from vec3, alpha is set to 1
|
|
| Color (uint32_t argb) |
| converts byte order A|R|G|B to 0..1 floats
|
|
| Color (uint8_t r, uint8_t g, uint8_t b, uint8_t a) |
|
| vec4 ()=default |
| default constructor, NOTE: does NOT setup components!
|
|
| vec4 (scalar x, scalar y, scalar z, scalar w) |
| construct from values
|
|
| vec4 (scalar v) |
| construct from single value
|
|
| vec4 (const vec4 &rhs)=default |
| copy constructor
|
|
| vec4 (const vec3 &rhs, float w) |
| copy constructor from vec3
|
|
| vec4 (const __m128 &rhs) |
| construct from SSE 128 byte float array
|
|
void | operator= (const __m128 &rhs) |
| assign an vmVector4
|
|
void | operator+= (const vec4 &rhs) |
| inplace add
|
|
void | operator-= (const vec4 &rhs) |
| inplace sub
|
|
void | operator*= (scalar s) |
| inplace scalar multiply
|
|
void | operator*= (const vec4 &rhs) |
| muliply by a vector component-wise
|
|
void | operator/= (const vec4 &rhs) |
| divide by a vector component-wise
|
|
bool | operator== (const vec4 &rhs) const |
| equality operator
|
|
bool | operator!= (const vec4 &rhs) const |
| inequality operator
|
|
void | load (const scalar *ptr) |
| load content from 16-byte-aligned memory
|
|
void | loadu (const scalar *ptr) |
| load content from unaligned memory
|
|
void | store (scalar *ptr) const |
| write content to 16-byte-aligned memory through the write cache
|
|
void | storeu (scalar *ptr) const |
| write content to unaligned memory through the write cache
|
|
void | store3 (scalar *ptr) const |
| write content to 16-byte-aligned memory through the write cache
|
|
void | storeu3 (scalar *ptr) const |
| write content to unaligned memory through the write cache
|
|
void | stream (scalar *ptr) const |
| stream content to 16-byte-aligned memory circumventing the write-cache
|
|
void | load_float3 (const void *ptr, float w) |
| load 3 floats into x,y,z from unaligned memory
|
|
void | load_ubyte4n (const void *ptr) |
| load from UByte4N packed vector
|
|
void | load_byte4n (const void *ptr) |
| load from Byte4N packed vector
|
|
void | set (scalar x, scalar y, scalar z, scalar w) |
| set content
|
|
template<int X, int Y, int Z, int W> |
vec4 | swizzle (const vec4 &v) |
| swizzle vector
|
|
scalar & | operator[] (const int index) |
| read-only access to indexed component
|
|
scalar | operator[] (const int index) const |
| read-only access to indexed component
|
|