4 Element vector class. More...
#include <PxVec4.h>
Public Member Functions | |
PX_CUDA_CALLABLE PX_INLINE | PxVec4 () |
default constructor leaves data uninitialized. More... | |
PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec4 (PxZERO r) |
zero constructor. More... | |
PX_CUDA_CALLABLE PX_INLINE | PxVec4 (float a) |
Assigns scalar parameter to all elements. More... | |
PX_CUDA_CALLABLE PX_INLINE | PxVec4 (float nx, float ny, float nz, float nw) |
Initializes from 3 scalar parameters. More... | |
PX_CUDA_CALLABLE PX_INLINE | PxVec4 (const PxVec3 &v, float nw) |
Initializes from 3 scalar parameters. More... | |
PX_CUDA_CALLABLE PX_INLINE | PxVec4 (const float v[]) |
Initializes from an array of scalar parameters. More... | |
PX_CUDA_CALLABLE PX_INLINE | PxVec4 (const PxVec4 &v) |
Copy ctor. More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 & | operator= (const PxVec4 &p) |
Assignment operator. More... | |
PX_CUDA_CALLABLE PX_INLINE float & | operator[] (unsigned int index) |
element access More... | |
PX_CUDA_CALLABLE PX_INLINE const float & | operator[] (unsigned int index) const |
element access More... | |
PX_CUDA_CALLABLE PX_INLINE bool | operator== (const PxVec4 &v) const |
returns true if the two vectors are exactly equal. More... | |
PX_CUDA_CALLABLE PX_INLINE bool | operator!= (const PxVec4 &v) const |
returns true if the two vectors are not exactly equal. More... | |
PX_CUDA_CALLABLE PX_INLINE bool | isZero () const |
tests for exact zero vector More... | |
PX_CUDA_CALLABLE PX_INLINE bool | isFinite () const |
returns true if all 3 elems of the vector are finite (not NAN or INF, etc.) More... | |
PX_CUDA_CALLABLE PX_INLINE bool | isNormalized () const |
is normalized - used by API parameter validation More... | |
PX_CUDA_CALLABLE PX_INLINE float | magnitudeSquared () const |
returns the squared magnitude More... | |
PX_CUDA_CALLABLE PX_INLINE float | magnitude () const |
returns the magnitude More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | operator- () const |
negation More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | operator+ (const PxVec4 &v) const |
vector addition More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | operator- (const PxVec4 &v) const |
vector difference More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | operator* (float f) const |
scalar post-multiplication More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | operator/ (float f) const |
scalar division More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 & | operator+= (const PxVec4 &v) |
vector addition More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 & | operator-= (const PxVec4 &v) |
vector difference More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 & | operator*= (float f) |
scalar multiplication More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 & | operator/= (float f) |
scalar division More... | |
PX_CUDA_CALLABLE PX_INLINE float | dot (const PxVec4 &v) const |
returns the scalar product of this and other. More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | getNormalized () const |
PX_CUDA_CALLABLE PX_INLINE float | normalize () |
normalizes the vector in place More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | multiply (const PxVec4 &a) const |
a[i] * b[i], for all i. More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | minimum (const PxVec4 &v) const |
element-wise minimum More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec4 | maximum (const PxVec4 &v) const |
element-wise maximum More... | |
PX_CUDA_CALLABLE PX_INLINE PxVec3 | getXYZ () const |
PX_CUDA_CALLABLE PX_INLINE void | setZero () |
set vector elements to zero More... | |
Public Attributes | |
float | x |
float | y |
float | z |
float | w |
4 Element vector class.
This is a 4-dimensional vector class with public data members.
|
inline |
default constructor leaves data uninitialized.
|
inline |
zero constructor.
References PX_UNUSED().
|
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. |
[in] | nw | Value to initialize W component. |
|
inline |
Initializes from 3 scalar parameters.
[in] | v | Value to initialize the X, Y, and Z components. |
[in] | nw | Value to initialize W component. |
|
inlineexplicit |
Initializes from an array of scalar parameters.
[in] | v | Value to initialize with. |
|
inline |
Copy ctor.
|
inline |
|
inline |
return a unit vector
References PxRecipSqrt().
|
inline |
|
inline |
returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
References PxIsFinite().
|
inline |
is normalized - used by API parameter validation
References physx::intrinsics::isFinite(), and PxAbs().
|
inline |
tests for exact zero vector
|
inline |
returns the magnitude
References PxSqrt().
|
inline |
returns the squared magnitude
Avoids calling PxSqrt()!
|
inline |
|
inline |
|
inline |
|
inline |
normalizes the vector in place
|
inline |
|
inline |
scalar post-multiplication
|
inline |
scalar multiplication
|
inline |
|
inline |
|
inline |
negation
|
inline |
|
inline |
|
inline |
scalar division
|
inline |
scalar division
|
inline |
|
inline |
|
inline |
element access
References PX_SHARED_ASSERT.
|
inline |
element access
References PX_SHARED_ASSERT.
|
inline |
set vector elements to zero
float PxVec4::w |
Referenced by dot(), maximum(), minimum(), multiply(), operator!=(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), PxMat44::scale(), and PxMat44::transform().
float PxVec4::x |
float PxVec4::y |
float PxVec4::z |