|
RavEngine
|
3 Element vector class. More...
#include <PxVec3.h>
Public Member Functions | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec3T () |
| default constructor leaves data uninitialized. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec3T (PxZERO) |
| zero constructor. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec3T (Type a) |
| Assigns scalar parameter to all elements. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec3T (Type nx, Type ny, Type nz) |
| Initializes from 3 scalar parameters. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec3T (const PxVec3T &v) |
| Copy ctor. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T & | operator= (const PxVec3T &p) |
| Assignment operator. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type & | operator[] (unsigned int index) |
| element access | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE const Type & | operator[] (unsigned int index) const |
| element access | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE bool | operator== (const PxVec3T &v) const |
| returns true if the two vectors are exactly equal. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE bool | operator!= (const PxVec3T &v) const |
| returns true if the two vectors are not exactly equal. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE bool | isZero () const |
| tests for exact zero vector | |
| PX_CUDA_CALLABLE PX_INLINE bool | isFinite () const |
| returns true if all 3 elems of the vector are finite (not NAN or INF, etc.) | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE bool | isNormalized () const |
| is normalized - used by API parameter validation | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type | magnitudeSquared () const |
| returns the squared magnitude | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type | magnitude () const |
| returns the magnitude | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | operator- () const |
| negation | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | operator+ (const PxVec3T &v) const |
| vector addition | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | operator- (const PxVec3T &v) const |
| vector difference | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | operator* (Type f) const |
| scalar post-multiplication | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | operator/ (Type f) const |
| scalar division | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T & | operator+= (const PxVec3T &v) |
| vector addition | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T & | operator-= (const PxVec3T &v) |
| vector difference | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T & | operator*= (Type f) |
| scalar multiplication | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T & | operator/= (Type f) |
| scalar division | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type | dot (const PxVec3T &v) const |
| returns the scalar product of this and other. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | cross (const PxVec3T &v) const |
| cross product | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | getNormalized () const |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type | normalize () |
| normalizes the vector in place | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type | normalizeSafe () |
| normalizes the vector in place. Does nothing if vector magnitude is under PX_NORMALIZATION_EPSILON. Returns vector magnitude if >= PX_NORMALIZATION_EPSILON and 0.0f otherwise. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type | normalizeFast () |
| normalizes the vector in place. Asserts if vector magnitude is under PX_NORMALIZATION_EPSILON. returns vector magnitude. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | multiply (const PxVec3T &a) const |
| a[i] * b[i], for all i. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | minimum (const PxVec3T &v) const |
| element-wise minimum | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type | minElement () const |
| returns MIN(x, y, z); | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | maximum (const PxVec3T &v) const |
| element-wise maximum | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE Type | maxElement () const |
| returns MAX(x, y, z); | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3T | abs () const |
| returns absolute values of components; | |
Public Attributes | |
| Type | x |
| Type | y |
| Type | z |
3 Element vector class.
This is a 3-dimensional vector class with public data members.
|
inlineexplicit |
Assigns scalar parameter to all elements.
Useful to initialize to zero or one.
| [in] | a | Value to assign to elements. |
|
inline |
Initializes from 3 scalar parameters.
| [in] | nx | Value to initialize X component. |
| [in] | ny | Value to initialize Y component. |
| [in] | nz | Value to initialize Z component. |
|
inline |
returns a unit vector
|
inline |
returns the squared magnitude
Avoids calling PxSqrt()!