|
| | SLVec4 () |
| |
| | SLVec4 (const T V) |
| |
| | SLVec4 (const T X, const T Y, const T Z=0, const T W=1) |
| |
| | SLVec4 (const T v[4]) |
| |
| | SLVec4 (const SLVec2< T > &v) |
| |
| | SLVec4 (const SLVec3< T > &v) |
| |
| | SLVec4 (const SLVec4< T > &v) |
| |
| | SLVec4 (const SLstring &fourFloatsWithDelimiter) |
| |
| void | set (const T X, const T Y, const T Z, const T W=1) |
| |
| void | set (const T xyz) |
| |
| void | set (const T v[4]) |
| |
| void | set (const SLVec2< T > &v) |
| |
| void | set (const SLVec3< T > &v) |
| |
| void | set (const SLVec4< T > &v) |
| |
| SLbool | operator== (const SLVec4 &v) const |
| |
| SLbool | operator!= (const SLVec4 &v) const |
| |
| SLbool | operator<= (const SLVec4 &v) const |
| |
| SLbool | operator>= (const SLVec4 &v) const |
| |
| SLbool | operator< (const SLVec4 &v) const |
| |
| SLbool | operator> (const SLVec4 &v) const |
| |
| SLbool | operator<= (const T v) const |
| |
| SLbool | operator>= (const T v) const |
| |
| SLbool | operator< (const T v) const |
| |
| SLbool | operator> (const T v) const |
| |
| SLVec4 | operator+ (const SLVec4 &v) const |
| |
| SLVec4 | operator- (const SLVec4 &v) const |
| |
| SLVec4 | operator- () const |
| |
| T | operator* (const SLVec4 &v) const |
| |
| SLVec4 | operator* (const T s) const |
| |
| SLVec4 | operator/ (const T s) const |
| |
| SLVec4 | operator& (const SLVec4 &v) const |
| |
| SLVec4 & | operator= (const SLVec2< T > &v) |
| |
| SLVec4 & | operator= (const SLVec3< T > &v) |
| |
| SLVec4 & | operator= (const SLVec4 &v) |
| |
| SLVec4 & | operator+= (const SLVec4 &v) |
| |
| SLVec4 & | operator+= (const SLVec3< T > &v) |
| |
| SLVec4 & | operator-= (const SLVec4 &v) |
| |
| SLVec4 & | operator-= (const SLVec3< T > &v) |
| |
| SLVec4 & | operator*= (const T s) |
| |
| SLVec4 & | operator/= (const T s) |
| |
| SLVec4 & | operator&= (const SLVec4 &v) |
| |
| SLVec4 & | operator&= (const SLVec3< T > &v) |
| |
| void | add (const SLVec4 &a, const SLVec4 &b) |
| |
| void | sub (const SLVec4 &a, const SLVec4 &b) |
| |
| void | scale (const T s) |
| |
| T | dot (const SLVec4 &v) |
| |
| void | cross (const SLVec4 &a, const SLVec4 &b) |
| |
| SLVec3< T > | vec3 () const |
| |
| SLVec2< T > | vec2 () const |
| |
| T | length () const |
| |
| T | lengthSqr () const |
| |
| SLVec4 & | normalize () |
| |
| void | wdiv () |
| |
| void | clampMinMax (const T min, const T max) |
| |
| T | diff (const SLVec4 &v) |
| |
| T | diffRGB (const SLVec4 &v) |
| |
| void | mix (const SLVec4 &a, const SLVec4 &b, const T factor_b) |
| |
| T | minXYZ () |
| |
| T | maxXYZ () |
| |
| T | minXYZW () |
| |
| T | maxXYZW () |
| |
| SLint | maxComp () |
| |
| SLint | minComp () |
| |
| SLbool | isZero () |
| |
| void | gammaCorrect (T oneOverGamma) |
| | Gamma correction. More...
|
| |
| void | print (const SLchar *str=nullptr) |
| |
| SLstring | toString (SLstring delimiter=", ") |
| | Conversion to string. More...
|
| |
| void | fromString (const SLstring &fourFloatsWithDelimiter, SLchar delimiter=',') |
| | Conversion from string. More...
|
| |
| void | hsva2rgba (const SLVec4 &hsva) |
| | HSVA to RGBA color conversion (http://www.rapidtables.com/convert/color/hsv-to-rgb.htm) More...
|
| |
|
| static SLVec4 | ZERO = SLVec4<T>(0.0f, 0.0f, 0.0f, 1.0f) |
| |
| static SLVec4 | BLACK = SLVec4<T>(0.0f, 0.0f, 0.0f, 1.0f) |
| |
| static SLVec4 | GRAY = SLVec4<T>(0.5f, 0.5f, 0.5f, 1.0f) |
| |
| static SLVec4 | WHITE = SLVec4<T>(1.0f, 1.0f, 1.0f, 1.0f) |
| |
| static SLVec4 | RED = SLVec4<T>(1.0f, 0.0f, 0.0f, 1.0f) |
| |
| static SLVec4 | GREEN = SLVec4<T>(0.0f, 1.0f, 0.0f, 1.0f) |
| |
| static SLVec4 | BLUE = SLVec4<T>(0.0f, 0.0f, 1.0f, 1.0f) |
| |
| static SLVec4 | YELLOW = SLVec4<T>(1.0f, 1.0f, 0.0f, 1.0f) |
| |
| static SLVec4 | CYAN = SLVec4<T>(0.0f, 1.0f, 1.0f, 1.0f) |
| |
| static SLVec4 | MAGENTA = SLVec4<T>(1.0f, 0.0f, 1.0f, 1.0f) |
| |
template<class T>
class SLVec4< T >
4D vector template class for standard 4D vector algebra.
4D vector template class with type definitions for 4D vectors and colors:
Use SLVec4f for a specific float type vector
Use SLVec4d for a specific double type vector
Use SLVec4r for a precision independent real type.