+#include <PxVec2.h>
+
+ +
Public Member Functions | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec2 () |
| default constructor leaves data uninitialized. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec2 (PxZERO r) |
| zero constructor. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec2 (float a) |
| Assigns scalar parameter to all elements. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec2 (float nx, float ny) |
| Initializes from 2 scalar parameters. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxVec2 (const PxVec2 &v) |
| Copy ctor. | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 & | operator= (const PxVec2 &p) |
| Assignment operator. | |
| PX_DEPRECATED PX_CUDA_CALLABLE +PX_FORCE_INLINE float & | operator[] (int index) |
| element access | |
| PX_DEPRECATED PX_CUDA_CALLABLE +PX_FORCE_INLINE const float & | operator[] (int index) const |
| element access | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE bool | operator== (const PxVec2 &v) const |
| returns true if the two vectors are exactly equal. | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE bool | operator!= (const PxVec2 &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 2 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 float | magnitudeSquared () const |
| returns the squared magnitude | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE float | magnitude () const |
| returns the magnitude | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | operator- () const |
| negation | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | operator+ (const PxVec2 &v) const |
| vector addition | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | operator- (const PxVec2 &v) const |
| vector difference | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | operator* (float f) const |
| scalar post-multiplication | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | operator/ (float f) const |
| scalar division | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 & | operator+= (const PxVec2 &v) |
| vector addition | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 & | operator-= (const PxVec2 &v) |
| vector difference | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 & | operator*= (float f) |
| scalar multiplication | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 & | operator/= (float f) |
| scalar division | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE float | dot (const PxVec2 &v) const |
| returns the scalar product of this and other. | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | getNormalized () const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE float | normalize () |
| normalizes the vector in place | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | multiply (const PxVec2 &a) const |
| a[i] * b[i], for all i. | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | minimum (const PxVec2 &v) const |
| element-wise minimum | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE float | minElement () const |
| returns MIN(x, y); | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec2 | maximum (const PxVec2 &v) const |
| element-wise maximum | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE float | maxElement () const |
| returns MAX(x, y); | |
Public Attributes | |
| float | x |
| float | y |
+This is a 2-dimensional vector class with public data members.
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2::PxVec2 | +( | ++ | ) | + [inline] |
+
+default constructor leaves data uninitialized. +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2::PxVec2 | +( | +PxZERO | +r | +) | + [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2::PxVec2 | +( | +float | +a | +) | + [inline, explicit] |
+
+Assigns scalar parameter to all elements. +
+Useful to initialize to zero or one.
+
| [in] | a | Value to assign to elements. |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2::PxVec2 | +( | +float | +nx, | +|
| + | + | float | +ny | + |
| + | ) | + [inline] |
+
+Initializes from 2 scalar parameters. +
+
| [in] | nx | Value to initialize X component. |
| [in] | ny | Value to initialize Y component. |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2::PxVec2 | +( | +const PxVec2 & | +v | +) | + [inline] |
+
+Copy ctor. +
+ +
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE float PxVec2::dot | +( | +const PxVec2 & | +v | +) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2 PxVec2::getNormalized | +( | ++ | ) | + const [inline] |
+
+return a unit vector +
References PxRecipSqrt().
+ +| PX_CUDA_CALLABLE PX_INLINE bool PxVec2::isFinite | +( | ++ | ) | + const [inline] |
+
+returns true if all 2 elems of the vector are finite (not NAN or INF, etc.) +
+ +
References PxIsFinite().
+ +| PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxVec2::isNormalized | +( | ++ | ) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxVec2::isZero | +( | ++ | ) | + const [inline] |
+
+tests for exact zero vector +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE float PxVec2::magnitude | +( | ++ | ) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE float PxVec2::magnitudeSquared | +( | ++ | ) | + const [inline] |
+
+returns the squared magnitude +
+Avoids calling PxSqrt()! +
| PX_CUDA_CALLABLE PX_FORCE_INLINE float PxVec2::maxElement | +( | ++ | ) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE float PxVec2::minElement | +( | ++ | ) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE float PxVec2::normalize | +( | ++ | ) | + [inline] |
+
+normalizes the vector in place +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxVec2::operator!= | +( | +const PxVec2 & | +v | +) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2 PxVec2::operator* | +( | +float | +f | +) | + const [inline] |
+
+scalar post-multiplication +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2& PxVec2::operator*= | +( | +float | +f | +) | + [inline] |
+
+scalar multiplication +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2 PxVec2::operator- | +( | ++ | ) | + const [inline] |
+
+negation +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2 PxVec2::operator/ | +( | +float | +f | +) | + const [inline] |
+
+scalar division +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec2& PxVec2::operator/= | +( | +float | +f | +) | + [inline] |
+
+scalar division +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxVec2::operator== | +( | +const PxVec2 & | +v | +) | + const [inline] |
+
| PX_DEPRECATED PX_CUDA_CALLABLE PX_FORCE_INLINE const float& PxVec2::operator[] | +( | +int | +index | +) | + const [inline] |
+
| PX_DEPRECATED PX_CUDA_CALLABLE PX_FORCE_INLINE float& PxVec2::operator[] | +( | +int | +index | +) | + [inline] |
+
+
| float PxVec2::x | +
+ +
Referenced by dot(), maximum(), minimum(), multiply(), operator!=(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
+ +| float PxVec2::y | +
+ +
Referenced by dot(), maximum(), minimum(), multiply(), operator!=(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
+ ++