PxVec3Padded

Defined in include/foundation/PxVec3.h

Inheritance Relationships

Base Type

  • public PxVec3T< float > (PxVec3T)

class PxVec3Padded : public PxVec3T<float>

A padded version of PxVec3, to safely load its data using SIMD.

Public Functions

inline PxVec3Padded()
inline ~PxVec3Padded()
inline PxVec3Padded(const PxVec3 &p)
inline PxVec3Padded(float f)
inline PxVec3Padded &operator=(const PxVec3Padded &p)

Assignment operator.

To fix this: error: definition of implicit copy assignment operator for ‘PxVec3Padded’ is deprecated because it has a user-declared destructor [-Werror,-Wdeprecated]

inline float &operator[](unsigned int index)

element access

inline const float &operator[](unsigned int index) const

element access

inline bool operator==(const PxVec3T &v) const

returns true if the two vectors are exactly equal.

inline bool operator!=(const PxVec3T &v) const

returns true if the two vectors are not exactly equal.

inline bool isZero() const

tests for exact zero vector

inline bool isFinite() const

returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)

inline bool isNormalized() const

is normalized - used by API parameter validation

inline float magnitudeSquared() const

returns the squared magnitude

Avoids calling PxSqrt()!

inline float magnitude() const

returns the magnitude

inline PxVec3T operator-() const

negation

inline PxVec3T operator-(const PxVec3T &v) const

vector difference

inline PxVec3T operator+(const PxVec3T &v) const

vector addition

inline PxVec3T operator*(float f) const

scalar post-multiplication

inline PxVec3T operator/(float f) const

scalar division

inline PxVec3T &operator+=(const PxVec3T &v)

vector addition

inline PxVec3T &operator-=(const PxVec3T &v)

vector difference

inline PxVec3T &operator*=(float f)

scalar multiplication

inline PxVec3T &operator/=(float f)

scalar division

inline float dot(const PxVec3T &v) const

returns the scalar product of this and other.

inline PxVec3T cross(const PxVec3T &v) const

cross product

inline PxVec3T getNormalized() const

returns a unit vector

inline float normalize()

normalizes the vector in place

inline float 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.

inline float normalizeFast()

normalizes the vector in place.

Asserts if vector magnitude is under PX_NORMALIZATION_EPSILON. returns vector magnitude.

inline PxVec3T multiply(const PxVec3T &a) const

a[i] * b[i], for all i.

inline PxVec3T minimum(const PxVec3T &v) const

element-wise minimum

inline float minElement() const

returns MIN(x, y, z);

inline PxVec3T maximum(const PxVec3T &v) const

element-wise maximum

inline float maxElement() const

returns MAX(x, y, z);

inline PxVec3T abs() const

returns absolute values of components;

Public Members

PxU32 padding
float x
float y
float z