|
| SLVec3 () |
|
| SLVec3 (const T V) |
|
| SLVec3 (const T X, const T Y, const T Z=0) |
|
| SLVec3 (const T v[3]) |
|
| SLVec3 (const SLVec2< T > &v) |
|
| SLVec3 (const SLVec3< T > &v) |
|
| SLVec3 (const SLstring &threeFloatsWithDelimiter) |
|
void | set (const T X, const T Y, const T Z) |
|
void | set (const T X, const T Y) |
|
void | set (const T v[3]) |
|
void | set (const SLVec2< T > &v) |
|
void | set (const SLVec3< T > &v) |
|
SLbool | operator== (const SLVec3 &v) const |
|
SLbool | operator!= (const SLVec3 &v) const |
|
SLbool | operator<= (const SLVec3 &v) const |
|
SLbool | operator>= (const SLVec3 &v) const |
|
SLbool | operator< (const SLVec3 &v) const |
|
SLbool | operator> (const SLVec3 &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 |
|
SLVec3 | operator- () const |
|
SLVec3 | operator+ (const SLVec3 &v) const |
|
SLVec3 | operator- (const SLVec3 &v) const |
|
T | operator* (const SLVec3 &v) const |
|
SLVec3 | operator^ (const SLVec3 &v) const |
|
SLVec3 | operator* (const T s) const |
|
SLVec3 | operator/ (const T s) const |
|
SLVec3 | operator& (const SLVec3 &v) const |
|
SLVec3 & | operator= (const SLVec2< T > &v) |
|
SLVec3 & | operator= (const SLVec3 &v) |
|
SLVec3 & | operator+= (const SLVec3 &v) |
|
SLVec3 & | operator-= (const SLVec3 &v) |
|
SLVec3 & | operator+= (const T s) |
|
SLVec3 & | operator-= (const T s) |
|
SLVec3 & | operator*= (const T s) |
|
SLVec3 & | operator/= (const T s) |
|
SLVec3 & | operator&= (const SLVec3 &v) |
|
void | add (const SLVec3 &a, const SLVec3 &b) |
|
void | add (const SLVec3 &a) |
|
void | sub (const SLVec3 &a, const SLVec3 &b) |
|
void | sub (const SLVec3 &a) |
|
void | scale (const T s) |
|
T | dot (const SLVec3 &v) const |
|
void | cross (const SLVec3 &a, const SLVec3 &b) |
|
T | length () const |
|
T | lengthSqr () const |
|
SLVec3 & | normalize () |
|
SLVec3 | normalized () const |
|
void | clampMinMax (const T min, const T max) |
|
T | diff (const SLVec3 &v) |
|
void | mix (const SLVec3 &a, const SLVec3 &b, const T factor_b) |
|
void | setMin (const SLVec3 &v) |
|
void | setMax (const SLVec3 &v) |
|
T | maxXYZ () |
|
T | minXYZ () |
|
T | maxXYZ (SLint &comp) |
|
T | minXYZ (SLint &comp) |
|
SLint | maxComp () |
|
SLbool | isZero () |
|
T | distance (const SLVec3 &p) const |
| Calculate the distance to point p. More...
|
|
T | distSquared (const SLVec3 &q) |
| Calculate the squared distance from the vector to point q. More...
|
|
void | toSpherical (T &r, T &theta, T &phi) |
| Calculates the spherical coords into r, theta & phi in radians. More...
|
|
void | fromSpherical (T r, T theta, T phi) |
| Calculates the vector from spherical coords r, theta & phi in radians. More...
|
|
void | gammaCorrect (T oneOverGamma) |
| Gamma correction. More...
|
|
void | print (const SLchar *str=nullptr) |
| Prints the vector to std out. More...
|
|
SLstring | toString (SLstring delimiter=", ", int decimals=2) |
| Conversion to string. More...
|
|
void | fromString (const SLstring &threeFloatsWithDelimiter, SLchar delimiter=',') |
| Conversion from string. More...
|
|
void | hsv2rgb (const SLVec3 &hsv) |
| HSV (0-1) to RGB (0-1) color conversion (http://www.rapidtables.com/convert/color/hsv-to-rgb.htm) More...
|
|
void | ecef2LatLonAlt (const SLVec3 &ecef) |
| Earth Centered Earth Fixed (ecef) to Latitude Longitude Altitude (LatLonAlt) using the WGS84 model. More...
|
|
void | latlonAlt2ecef (const SLVec3 &latDegLonDegAltM) |
| Latitude Longitude Altitude (LatLonAlt) to Earth Centered Earth Fixed (ecef) using the WGS84 model. More...
|
|
|
static SLVec3 | ZERO = SLVec3<T>(0.0f, 0.0f, 0.0f) |
|
static SLVec3 | BLACK = SLVec3<T>(0.0f, 0.0f, 0.0f) |
|
static SLVec3 | GRAY = SLVec3<T>(0.5f, 0.5f, 0.5f) |
|
static SLVec3 | WHITE = SLVec3<T>(1.0f, 1.0f, 1.0f) |
|
static SLVec3 | RED = SLVec3<T>(1.0f, 0.0f, 0.0f) |
|
static SLVec3 | GREEN = SLVec3<T>(0.0f, 1.0f, 0.0f) |
|
static SLVec3 | BLUE = SLVec3<T>(0.0f, 0.0f, 1.0f) |
|
static SLVec3 | CYAN = SLVec3<T>(0.0f, 1.0f, 1.0f) |
|
static SLVec3 | MAGENTA = SLVec3<T>(1.0f, 0.0f, 1.0f) |
|
static SLVec3 | YELLOW = SLVec3<T>(1.0f, 1.0f, 0.0f) |
|
static SLVec3 | ORANGE = SLVec3<T>(0.5f, 0.5f, 0.0f) |
|
static SLVec3 | COLBFH = SLVec3<T>(0.8f, 0.5f, 0.0f) |
|
static SLVec3 | AXISX = SLVec3<T>(1.0f, 0.0f, 0.0f) |
|
static SLVec3 | AXISY = SLVec3<T>(0.0f, 1.0f, 0.0f) |
|
static SLVec3 | AXISZ = SLVec3<T>(0.0f, 0.0f, 1.0f) |
|
template<class T>
class SLVec3< T >
3D vector template class for standard 3D vector algebra.
3D vector template class with type definitions for 3D vectors and colors:
Use SLVec3f for a specific float type vector
Use SLVec3d for a specific double type vector
Use SLVec3r for a precision independent real type.
Definition at line 39 of file SLVec3.h.