|
| DVec3 ()=default |
| Constructor.
|
|
| DVec3 (const DVec3 &inRHS)=default |
|
DVec3 & | operator= (const DVec3 &inRHS)=default |
|
JPH_INLINE | DVec3 (Vec3Arg inRHS) |
|
JPH_INLINE | DVec3 (Vec4Arg inRHS) |
|
JPH_INLINE | DVec3 (TypeArg inRHS) |
|
JPH_INLINE | DVec3 (double inX, double inY, double inZ) |
| Create a vector from 3 components.
|
|
JPH_INLINE | DVec3 (const Double3 &inV) |
| Load 3 doubles from memory.
|
|
JPH_INLINE void | StoreDouble3 (Double3 *outV) const |
| Store 3 doubles to memory.
|
|
JPH_INLINE | operator Vec3 () const |
| Convert to float vector 3 rounding to nearest.
|
|
JPH_INLINE DVec3 | PrepareRoundToZero () const |
| Prepare to convert to float vector 3 rounding towards zero (returns DVec3 that can be converted to a Vec3 to get the rounding)
|
|
JPH_INLINE DVec3 | PrepareRoundToInf () const |
| Prepare to convert to float vector 3 rounding towards positive/negative inf (returns DVec3 that can be converted to a Vec3 to get the rounding)
|
|
JPH_INLINE Vec3 | ToVec3RoundDown () const |
| Convert to float vector 3 rounding down.
|
|
JPH_INLINE Vec3 | ToVec3RoundUp () const |
| Convert to float vector 3 rounding up.
|
|
JPH_INLINE int | GetTrues () const |
| Store if X is true in bit 0, Y in bit 1, Z in bit 2 and W in bit 3 (true is when highest bit of component is set)
|
|
JPH_INLINE bool | TestAnyTrue () const |
| Test if any of the components are true (true is when highest bit of component is set)
|
|
JPH_INLINE bool | TestAllTrue () const |
| Test if all components are true (true is when highest bit of component is set)
|
|
JPH_INLINE double | GetX () const |
| Get individual components.
|
|
JPH_INLINE double | GetY () const |
|
JPH_INLINE double | GetZ () const |
|
JPH_INLINE void | SetX (double inX) |
| Set individual components.
|
|
JPH_INLINE void | SetY (double inY) |
|
JPH_INLINE void | SetZ (double inZ) |
|
JPH_INLINE void | Set (double inX, double inY, double inZ) |
| Set all components.
|
|
JPH_INLINE double | operator[] (uint inCoordinate) const |
| Get double component by index.
|
|
JPH_INLINE void | SetComponent (uint inCoordinate, double inValue) |
| Set double component by index.
|
|
JPH_INLINE bool | operator== (DVec3Arg inV2) const |
| Comparison.
|
|
JPH_INLINE bool | operator!= (DVec3Arg inV2) const |
|
JPH_INLINE bool | IsClose (DVec3Arg inV2, double inMaxDistSq=1.0e-24) const |
| Test if two vectors are close.
|
|
JPH_INLINE bool | IsNearZero (double inMaxDistSq=1.0e-24) const |
| Test if vector is near zero.
|
|
JPH_INLINE bool | IsNormalized (double inTolerance=1.0e-12) const |
| Test if vector is normalized.
|
|
JPH_INLINE bool | IsNaN () const |
| Test if vector contains NaN elements.
|
|
JPH_INLINE DVec3 | operator* (DVec3Arg inV2) const |
| Multiply two double vectors (component wise)
|
|
JPH_INLINE DVec3 | operator* (double inV2) const |
| Multiply vector with double.
|
|
JPH_INLINE DVec3 | operator/ (double inV2) const |
| Divide vector by double.
|
|
JPH_INLINE DVec3 & | operator*= (double inV2) |
| Multiply vector with double.
|
|
JPH_INLINE DVec3 & | operator*= (DVec3Arg inV2) |
| Multiply vector with vector.
|
|
JPH_INLINE DVec3 & | operator/= (double inV2) |
| Divide vector by double.
|
|
JPH_INLINE DVec3 | operator+ (Vec3Arg inV2) const |
| Add two vectors (component wise)
|
|
JPH_INLINE DVec3 | operator+ (DVec3Arg inV2) const |
| Add two double vectors (component wise)
|
|
JPH_INLINE DVec3 & | operator+= (Vec3Arg inV2) |
| Add two vectors (component wise)
|
|
JPH_INLINE DVec3 & | operator+= (DVec3Arg inV2) |
| Add two double vectors (component wise)
|
|
JPH_INLINE DVec3 | operator- () const |
| Negate.
|
|
JPH_INLINE DVec3 | operator- (Vec3Arg inV2) const |
| Subtract two vectors (component wise)
|
|
JPH_INLINE DVec3 | operator- (DVec3Arg inV2) const |
| Subtract two double vectors (component wise)
|
|
JPH_INLINE DVec3 & | operator-= (Vec3Arg inV2) |
| Subtract two vectors (component wise)
|
|
JPH_INLINE DVec3 & | operator-= (DVec3Arg inV2) |
| Subtract two vectors (component wise)
|
|
JPH_INLINE DVec3 | operator/ (DVec3Arg inV2) const |
| Divide (component wise)
|
|
JPH_INLINE DVec3 | Abs () const |
| Return the absolute value of each of the components.
|
|
JPH_INLINE DVec3 | Reciprocal () const |
| Reciprocal vector (1 / value) for each of the components.
|
|
JPH_INLINE DVec3 | Cross (DVec3Arg inV2) const |
| Cross product.
|
|
JPH_INLINE double | Dot (DVec3Arg inV2) const |
| Dot product.
|
|
JPH_INLINE double | LengthSq () const |
| Squared length of vector.
|
|
JPH_INLINE double | Length () const |
| Length of vector.
|
|
JPH_INLINE DVec3 | Normalized () const |
| Normalize vector.
|
|
JPH_INLINE DVec3 | Sqrt () const |
| Component wise square root.
|
|
JPH_INLINE DVec3 | GetSign () const |
| Get vector that contains the sign of each element (returns 1 if positive, -1 if negative)
|
|
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.
|
|
|
static JPH_INLINE DVec3 | sZero () |
| Vector with all zeros.
|
|
static JPH_INLINE DVec3 | sAxisX () |
| Vectors with the principal axis.
|
|
static JPH_INLINE DVec3 | sAxisY () |
|
static JPH_INLINE DVec3 | sAxisZ () |
|
static JPH_INLINE DVec3 | sReplicate (double inV) |
| Replicate inV across all components.
|
|
static JPH_INLINE DVec3 | sNaN () |
| Vector with all NaN's.
|
|
static JPH_INLINE DVec3 | sLoadDouble3Unsafe (const Double3 &inV) |
| Load 3 doubles from memory (reads 64 bits extra which it doesn't use)
|
|
static JPH_INLINE DVec3 | sMin (DVec3Arg inV1, DVec3Arg inV2) |
| Return the minimum value of each of the components.
|
|
static JPH_INLINE DVec3 | sMax (DVec3Arg inV1, DVec3Arg inV2) |
| Return the maximum of each of the components.
|
|
static JPH_INLINE DVec3 | sClamp (DVec3Arg inV, DVec3Arg inMin, DVec3Arg inMax) |
| Clamp a vector between min and max (component wise)
|
|
static JPH_INLINE DVec3 | sEquals (DVec3Arg inV1, DVec3Arg inV2) |
| Equals (component wise)
|
|
static JPH_INLINE DVec3 | sLess (DVec3Arg inV1, DVec3Arg inV2) |
| Less than (component wise)
|
|
static JPH_INLINE DVec3 | sLessOrEqual (DVec3Arg inV1, DVec3Arg inV2) |
| Less than or equal (component wise)
|
|
static JPH_INLINE DVec3 | sGreater (DVec3Arg inV1, DVec3Arg inV2) |
| Greater than (component wise)
|
|
static JPH_INLINE DVec3 | sGreaterOrEqual (DVec3Arg inV1, DVec3Arg inV2) |
| Greater than or equal (component wise)
|
|
static JPH_INLINE DVec3 | sFusedMultiplyAdd (DVec3Arg inMul1, DVec3Arg inMul2, DVec3Arg inAdd) |
| Calculates inMul1 * inMul2 + inAdd.
|
|
static JPH_INLINE DVec3 | sSelect (DVec3Arg inNotSet, DVec3Arg inSet, DVec3Arg inControl) |
| Component wise select, returns inNotSet when highest bit of inControl = 0 and inSet when highest bit of inControl = 1.
|
|
static JPH_INLINE DVec3 | sOr (DVec3Arg inV1, DVec3Arg inV2) |
| Logical or (component wise)
|
|
static JPH_INLINE DVec3 | sXor (DVec3Arg inV1, DVec3Arg inV2) |
| Logical xor (component wise)
|
|
static JPH_INLINE DVec3 | sAnd (DVec3Arg inV1, DVec3Arg inV2) |
| Logical and (component wise)
|
|
static JPH_INLINE Type | sFixW (TypeArg inValue) |
| Internal helper function that ensures that the Z component is replicated to the W component to prevent divisions by zero.
|
|
3 component vector of doubles (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