|
| Vec3 ()=default |
| Constructor. More...
|
|
| Vec3 (const Vec3 &inRHS)=default |
|
Vec3 & | operator= (const Vec3 &inRHS)=default |
|
JPH_INLINE | Vec3 (Vec4Arg inRHS) |
|
JPH_INLINE | Vec3 (Type inRHS) |
|
JPH_INLINE | Vec3 (const Float3 &inV) |
| Load 3 floats from memory. More...
|
|
JPH_INLINE | Vec3 (float inX, float inY, float inZ) |
| Create a vector from 3 components. More...
|
|
JPH_INLINE float | GetX () const |
| Get individual components. More...
|
|
JPH_INLINE float | GetY () const |
|
JPH_INLINE float | GetZ () const |
|
JPH_INLINE void | SetX (float inX) |
| Set individual components. More...
|
|
JPH_INLINE void | SetY (float inY) |
|
JPH_INLINE void | SetZ (float inZ) |
|
JPH_INLINE void | Set (float inX, float inY, float inZ) |
| Set all components. More...
|
|
JPH_INLINE float | operator[] (uint inCoordinate) const |
| Get float component by index. More...
|
|
JPH_INLINE void | SetComponent (uint inCoordinate, float inValue) |
| Set float component by index. More...
|
|
JPH_INLINE bool | operator== (Vec3Arg inV2) const |
| Comparison. More...
|
|
JPH_INLINE bool | operator!= (Vec3Arg inV2) const |
|
JPH_INLINE bool | IsClose (Vec3Arg inV2, float inMaxDistSq=1.0e-12f) const |
| Test if two vectors are close. More...
|
|
JPH_INLINE bool | IsNearZero (float inMaxDistSq=1.0e-12f) const |
| Test if vector is near zero. More...
|
|
JPH_INLINE bool | IsNormalized (float inTolerance=1.0e-6f) const |
| Test if vector is normalized. More...
|
|
JPH_INLINE bool | IsNaN () const |
| Test if vector contains NaN elements. More...
|
|
JPH_INLINE Vec3 | operator* (Vec3Arg inV2) const |
| Multiply two float vectors (component wise) More...
|
|
JPH_INLINE Vec3 | operator* (float inV2) const |
| Multiply vector with float. More...
|
|
JPH_INLINE Vec3 | operator/ (float inV2) const |
| Divide vector by float. More...
|
|
JPH_INLINE Vec3 & | operator*= (float inV2) |
| Multiply vector with float. More...
|
|
JPH_INLINE Vec3 & | operator*= (Vec3Arg inV2) |
| Multiply vector with vector. More...
|
|
JPH_INLINE Vec3 & | operator/= (float inV2) |
| Divide vector by float. More...
|
|
JPH_INLINE Vec3 | operator+ (Vec3Arg inV2) const |
| Add two float vectors (component wise) More...
|
|
JPH_INLINE Vec3 & | operator+= (Vec3Arg inV2) |
| Add two float vectors (component wise) More...
|
|
JPH_INLINE Vec3 | operator- () const |
| Negate. More...
|
|
JPH_INLINE Vec3 | operator- (Vec3Arg inV2) const |
| Subtract two float vectors (component wise) More...
|
|
JPH_INLINE Vec3 & | operator-= (Vec3Arg inV2) |
| Add two float vectors (component wise) More...
|
|
JPH_INLINE Vec3 | operator/ (Vec3Arg inV2) const |
| Divide (component wise) More...
|
|
template<uint32 SwizzleX, uint32 SwizzleY, uint32 SwizzleZ> |
JPH_INLINE Vec3 | Swizzle () const |
| Swizzle the elements in inV. More...
|
|
JPH_INLINE Vec4 | SplatX () const |
| Replicate the X component to all components. More...
|
|
JPH_INLINE Vec4 | SplatY () const |
| Replicate the Y component to all components. More...
|
|
JPH_INLINE Vec4 | SplatZ () const |
| Replicate the Z component to all components. More...
|
|
JPH_INLINE int | GetLowestComponentIndex () const |
| Get index of component with lowest value. More...
|
|
JPH_INLINE int | GetHighestComponentIndex () const |
| Get index of component with highest value. More...
|
|
JPH_INLINE Vec3 | Abs () const |
| Return the absolute value of each of the components. More...
|
|
JPH_INLINE Vec3 | Reciprocal () const |
| Reciprocal vector (1 / value) for each of the components. More...
|
|
JPH_INLINE Vec3 | Cross (Vec3Arg inV2) const |
| Cross product. More...
|
|
JPH_INLINE Vec3 | DotV (Vec3Arg inV2) const |
| Dot product, returns the dot product in X, Y and Z components. More...
|
|
JPH_INLINE Vec4 | DotV4 (Vec3Arg inV2) const |
| Dot product, returns the dot product in X, Y, Z and W components. More...
|
|
JPH_INLINE float | Dot (Vec3Arg inV2) const |
| Dot product. More...
|
|
JPH_INLINE float | LengthSq () const |
| Squared length of vector. More...
|
|
JPH_INLINE float | Length () const |
| Length of vector. More...
|
|
JPH_INLINE Vec3 | Normalized () const |
| Normalize vector. More...
|
|
JPH_INLINE Vec3 | NormalizedOr (Vec3Arg inZeroValue) const |
| Normalize vector or return inZeroValue if the length of the vector is zero. More...
|
|
JPH_INLINE void | StoreFloat3 (Float3 *outV) const |
| Store 3 floats to memory. More...
|
|
JPH_INLINE UVec4 | ToInt () const |
| Convert each component from a float to an int. More...
|
|
JPH_INLINE UVec4 | ReinterpretAsInt () const |
| Reinterpret Vec3 as a UVec4 (doesn't change the bits) More...
|
|
JPH_INLINE float | ReduceMin () const |
| Get the minimum of X, Y and Z. More...
|
|
JPH_INLINE float | ReduceMax () const |
| Get the maximum of X, Y and Z. More...
|
|
JPH_INLINE Vec3 | Sqrt () const |
| Component wise square root. More...
|
|
JPH_INLINE Vec3 | GetNormalizedPerpendicular () const |
| Get normalized vector that is perpendicular to this vector. More...
|
|
JPH_INLINE Vec3 | GetSign () const |
| Get vector that contains the sign of each element (returns 1.0f if positive, -1.0f if negative) More...
|
|
JPH_INLINE void | CheckW () const |
| Internal helper function that checks that W is equal to Z, so e.g. dividing by it should not generate div by 0. More...
|
|
template<uint32 SwizzleX, uint32 SwizzleY, uint32 SwizzleZ> |
Vec3 | Swizzle () const |
|
|
static JPH_INLINE Vec3 | sZero () |
| Vector with all zeros. More...
|
|
static JPH_INLINE Vec3 | sNaN () |
| Vector with all NaN's. More...
|
|
static JPH_INLINE Vec3 | sAxisX () |
| Vectors with the principal axis. More...
|
|
static JPH_INLINE Vec3 | sAxisY () |
|
static JPH_INLINE Vec3 | sAxisZ () |
|
static JPH_INLINE Vec3 | sReplicate (float inV) |
| Replicate inV across all components. More...
|
|
static JPH_INLINE Vec3 | sLoadFloat3Unsafe (const Float3 &inV) |
| Load 3 floats from memory (reads 32 bits extra which it doesn't use) More...
|
|
static JPH_INLINE Vec3 | sMin (Vec3Arg inV1, Vec3Arg inV2) |
| Return the minimum value of each of the components. More...
|
|
static JPH_INLINE Vec3 | sMax (Vec3Arg inV1, Vec3Arg inV2) |
| Return the maximum of each of the components. More...
|
|
static JPH_INLINE Vec3 | sClamp (Vec3Arg inV, Vec3Arg inMin, Vec3Arg inMax) |
| Clamp a vector between min and max (component wise) More...
|
|
static JPH_INLINE UVec4 | sEquals (Vec3Arg inV1, Vec3Arg inV2) |
| Equals (component wise) More...
|
|
static JPH_INLINE UVec4 | sLess (Vec3Arg inV1, Vec3Arg inV2) |
| Less than (component wise) More...
|
|
static JPH_INLINE UVec4 | sLessOrEqual (Vec3Arg inV1, Vec3Arg inV2) |
| Less than or equal (component wise) More...
|
|
static JPH_INLINE UVec4 | sGreater (Vec3Arg inV1, Vec3Arg inV2) |
| Greater than (component wise) More...
|
|
static JPH_INLINE UVec4 | sGreaterOrEqual (Vec3Arg inV1, Vec3Arg inV2) |
| Greater than or equal (component wise) More...
|
|
static JPH_INLINE Vec3 | sFusedMultiplyAdd (Vec3Arg inMul1, Vec3Arg inMul2, Vec3Arg inAdd) |
| Calculates inMul1 * inMul2 + inAdd. More...
|
|
static JPH_INLINE Vec3 | sSelect (Vec3Arg inV1, Vec3Arg inV2, UVec4Arg inControl) |
| Component wise select, returns inV1 when highest bit of inControl = 0 and inV2 when highest bit of inControl = 1. More...
|
|
static JPH_INLINE Vec3 | sOr (Vec3Arg inV1, Vec3Arg inV2) |
| Logical or (component wise) More...
|
|
static JPH_INLINE Vec3 | sXor (Vec3Arg inV1, Vec3Arg inV2) |
| Logical xor (component wise) More...
|
|
static JPH_INLINE Vec3 | sAnd (Vec3Arg inV1, Vec3Arg inV2) |
| Logical and (component wise) More...
|
|
static JPH_INLINE Vec3 | sUnitSpherical (float inTheta, float inPhi) |
|
template<class Random > |
static Vec3 | sRandom (Random &inRandom) |
| Get random unit vector. More...
|
|
static JPH_INLINE Type | sFixW (Type inValue) |
| Internal helper function that ensures that the Z component is replicated to the W component to prevent divisions by zero. More...
|
|
3 component vector (stored as 4 vectors). Note that we keep the 4th component the same as the 3rd component to avoid divisions by zero when JPH_FLOATING_POINT_EXCEPTIONS_ENABLED defined