#include <UT_Vector4.h>
Public Member Functions | |
| UT_Vector4 (void) | |
| UT_Vector4 (fpreal vx, fpreal vy, fpreal vz, fpreal vw=1.0f) | |
| UT_Vector4 (const fpreal32 v[4]) | |
| UT_Vector4 (const fpreal64 v[4]) | |
| UT_Vector4 (const UT_Vector3 &v, float w=1.f) | |
| ~UT_Vector4 (void) | |
| UT_Vector4 & | operator= (const UT_Vector3 &v) |
| UT_Vector4 & | operator+= (const UT_Vector4 &v) |
| UT_Vector4 & | operator-= (const UT_Vector4 &v) |
| unsigned | operator== (const UT_Vector4 &v) const |
| unsigned | operator!= (const UT_Vector4 &v) const |
| int | equalZero (fpreal tol=0.00001f) const |
| int | equalZero3 (fpreal tol=0.00001f) const |
| void | clampZero (fpreal tol=0.00001f) |
| void | clampZero3 (fpreal tol=0.00001f) |
| void | negate3 () |
| void | negate () |
| void | multiplyComponents (const UT_Vector4 &v) |
| int | isEqual (const UT_Vector4 &v, fpreal tol=0.00001f) const |
| int | isEqual (const UT_Vector3 &vect, fpreal tol=0.00001f) const |
| UT_Vector4 & | operator= (fpreal scalar) |
| UT_Vector4 & | operator+= (fpreal scalar) |
| UT_Vector4 & | operator-= (fpreal scalar) |
| UT_Vector4 & | operator*= (fpreal scalar) |
| UT_Vector4 & | operator*= (const UT_Vector4 &v) |
| UT_Vector4 & | operator/= (fpreal scalar) |
| UT_Vector4 & | operator/= (const UT_Vector4 &v) |
| fpreal | maxComponent () const |
| fpreal | minComponent () const |
| fpreal | avgComponent () const |
| fpreal | dot (const UT_Vector4 &v) const |
| void | normalize (void) |
| fpreal | length (void) const |
| The vector length (not to be confused with the vector dimension). | |
| fpreal | length2 (void) const |
| The vector length squared. | |
| void | assign (fpreal xx=0.0f, fpreal yy=0.0f, fpreal zz=0.0f, fpreal ww=1.0f) |
| Set the values of the vector components. | |
| void | assign (const float *v, int size=4) |
| Set the values of the vector components. | |
| void | save (ostream &os, int binary=0) const |
| bool | load (UT_IStream &is) |
| void | rowVecMult (const UT_Matrix4 &m) |
| void | rowVecMult (const UT_DMatrix4 &m) |
| void | colVecMult (const UT_Matrix4 &m) |
| void | colVecMult (const UT_DMatrix4 &m) |
| void | rowVecMult3 (const UT_Matrix4 &m) |
| void | rowVecMult3 (const UT_DMatrix4 &m) |
| UT_Vector4 & | operator*= (const UT_Matrix4 &mat) |
| UT_Vector4 & | operator*= (const UT_DMatrix4 &mat) |
| void | multiply3 (const UT_Matrix4 &mat) |
| void | multiply3 (const UT_DMatrix4 &mat) |
| void | multiply3 (UT_Vector4 &dest, const UT_Matrix4 &mat) const |
| int | findMinAbsAxis () const |
| These allow you to find out what indices to use for different axes. | |
| int | findMaxAbsAxis () const |
| These allow you to find out what indices to use for different axes. | |
| const float * | data (void) const |
| float * | data (void) |
| float & | x (void) |
| float | x (void) const |
| float & | y (void) |
| float | y (void) const |
| float & | z (void) |
| float | z (void) const |
| float & | w (void) |
| float | w (void) const |
| float & | operator() (unsigned i) |
| float | operator() (unsigned i) const |
| float & | operator[] (unsigned i) |
| float | operator[] (unsigned i) const |
| std::vector< float > | asStdVector () const |
| void | homogenize (void) |
| Express the point in homogeneous coordinates or vice-versa. | |
| void | dehomogenize (void) |
| Express the point in homogeneous coordinates or vice-versa. | |
Friends | |
| ostream & | operator<< (ostream &os, const UT_Vector4 &v) |
| I/O friends. | |
COP2/COP2_SampleGenerator.h, POP/POP_RadialBirth.C, SIM/SIM_ForceOrbit.C, SIM/SIM_SolverHair.C, SOP/MSS_CustomBrushState.C, SOP/SOP_CPPWave.C, SOP/SOP_PointWave.C, and standalone/i3ddsmgen.C.
Definition at line 110 of file UT_Vector4.h.
| UT_Vector4::UT_Vector4 | ( | void | ) | [inline] |
Default constructor. No data is initialized! Use it for extra speed.
Definition at line 114 of file UT_Vector4.h.
Definition at line 119 of file UT_Vector4.h.
| UT_Vector4::UT_Vector4 | ( | const fpreal32 | v[4] | ) | [inline] |
Definition at line 123 of file UT_Vector4.h.
| UT_Vector4::UT_Vector4 | ( | const fpreal64 | v[4] | ) | [inline] |
Definition at line 127 of file UT_Vector4.h.
| UT_Vector4::UT_Vector4 | ( | const UT_Vector3 & | v, | |
| float | w = 1.f | |||
| ) | [inline, explicit] |
Definition at line 511 of file UT_Vector4.h.
| UT_Vector4::~UT_Vector4 | ( | void | ) | [inline] |
Definition at line 138 of file UT_Vector4.h.
| void UT_Vector4::assign | ( | const float * | v, | |
| int | size = 4 | |||
| ) | [inline] |
| void UT_Vector4::assign | ( | fpreal | xx = 0.0f, |
|
| fpreal | yy = 0.0f, |
|||
| fpreal | zz = 0.0f, |
|||
| fpreal | ww = 1.0f | |||
| ) | [inline] |
Set the values of the vector components.
Definition at line 461 of file UT_Vector4.h.
| std::vector<float> UT_Vector4::asStdVector | ( | ) | const |
Return the components of the vector. The () operator does NOT check for the boundary condition.
| fpreal UT_Vector4::avgComponent | ( | ) | const [inline] |
Definition at line 341 of file UT_Vector4.h.
| void UT_Vector4::clampZero | ( | fpreal | tol = 0.00001f |
) | [inline] |
Definition at line 197 of file UT_Vector4.h.
| void UT_Vector4::clampZero3 | ( | fpreal | tol = 0.00001f |
) | [inline] |
Definition at line 205 of file UT_Vector4.h.
| void UT_Vector4::colVecMult | ( | const UT_DMatrix4 & | m | ) | [inline] |
If you need a multiplication operator that left multiplies the vector by a matrix (M * v), use the following colVecMult() functions. If you'd rather not use operator*=() for right-multiplications (v * M), use the following rowVecMult() functions.
Definition at line 245 of file UT_Vector4.h.
| void UT_Vector4::colVecMult | ( | const UT_Matrix4 & | m | ) | [inline] |
If you need a multiplication operator that left multiplies the vector by a matrix (M * v), use the following colVecMult() functions. If you'd rather not use operator*=() for right-multiplications (v * M), use the following rowVecMult() functions.
Definition at line 243 of file UT_Vector4.h.
| float* UT_Vector4::data | ( | void | ) | [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 426 of file UT_Vector4.h.
| const float* UT_Vector4::data | ( | void | ) | const [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 425 of file UT_Vector4.h.
| void UT_Vector4::dehomogenize | ( | void | ) | [inline] |
Express the point in homogeneous coordinates or vice-versa.
Definition at line 483 of file UT_Vector4.h.
| fpreal UT_Vector4::dot | ( | const UT_Vector4 & | v | ) | const [inline] |
Definition at line 401 of file UT_Vector4.h.
| int UT_Vector4::equalZero | ( | fpreal | tol = 0.00001f |
) | const [inline] |
Definition at line 183 of file UT_Vector4.h.
| int UT_Vector4::equalZero3 | ( | fpreal | tol = 0.00001f |
) | const [inline] |
Definition at line 190 of file UT_Vector4.h.
| int UT_Vector4::findMaxAbsAxis | ( | ) | const [inline] |
These allow you to find out what indices to use for different axes.
Definition at line 373 of file UT_Vector4.h.
| int UT_Vector4::findMinAbsAxis | ( | ) | const [inline] |
These allow you to find out what indices to use for different axes.
Definition at line 348 of file UT_Vector4.h.
| void UT_Vector4::homogenize | ( | void | ) | [inline] |
Express the point in homogeneous coordinates or vice-versa.
Definition at line 477 of file UT_Vector4.h.
| int UT_Vector4::isEqual | ( | const UT_Vector3 & | vect, | |
| fpreal | tol = 0.00001f | |||
| ) | const [inline] |
Definition at line 520 of file UT_Vector4.h.
| int UT_Vector4::isEqual | ( | const UT_Vector4 & | v, | |
| fpreal | tol = 0.00001f | |||
| ) | const [inline] |
Definition at line 225 of file UT_Vector4.h.
| fpreal UT_Vector4::length | ( | void | ) | const [inline] |
The vector length (not to be confused with the vector dimension).
Definition at line 415 of file UT_Vector4.h.
| fpreal UT_Vector4::length2 | ( | void | ) | const [inline] |
| bool UT_Vector4::load | ( | UT_IStream & | is | ) |
| fpreal UT_Vector4::maxComponent | ( | ) | const [inline] |
Definition at line 325 of file UT_Vector4.h.
| fpreal UT_Vector4::minComponent | ( | ) | const [inline] |
Definition at line 333 of file UT_Vector4.h.
| void UT_Vector4::multiply3 | ( | UT_Vector4 & | dest, | |
| const UT_Matrix4 & | mat | |||
| ) | const [inline] |
Definition at line 275 of file UT_Vector4.h.
| void UT_Vector4::multiply3 | ( | const UT_DMatrix4 & | mat | ) | [inline] |
Definition at line 273 of file UT_Vector4.h.
| void UT_Vector4::multiply3 | ( | const UT_Matrix4 & | mat | ) | [inline] |
Definition at line 271 of file UT_Vector4.h.
| void UT_Vector4::multiplyComponents | ( | const UT_Vector4 & | v | ) | [inline] |
Definition at line 217 of file UT_Vector4.h.
| void UT_Vector4::negate | ( | void | ) | [inline] |
Definition at line 214 of file UT_Vector4.h.
| void UT_Vector4::negate3 | ( | ) | [inline] |
Definition at line 212 of file UT_Vector4.h.
| void UT_Vector4::normalize | ( | void | ) | [inline] |
Definition at line 405 of file UT_Vector4.h.
| unsigned UT_Vector4::operator!= | ( | const UT_Vector4 & | v | ) | const [inline] |
Definition at line 181 of file UT_Vector4.h.
| float UT_Vector4::operator() | ( | unsigned | i | ) | const [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 440 of file UT_Vector4.h.
| float& UT_Vector4::operator() | ( | unsigned | i | ) | [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 435 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator*= | ( | const UT_Vector4 & | v | ) | [inline] |
Definition at line 302 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator*= | ( | fpreal | scalar | ) | [inline] |
Definition at line 295 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator*= | ( | const UT_DMatrix4 & | mat | ) | [inline] |
Definition at line 268 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator*= | ( | const UT_Matrix4 & | mat | ) | [inline] |
Definition at line 266 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator+= | ( | fpreal | scalar | ) | [inline] |
Definition at line 284 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator+= | ( | const UT_Vector4 & | v | ) | [inline] |
Definition at line 158 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator-= | ( | fpreal | scalar | ) | [inline] |
Definition at line 290 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator-= | ( | const UT_Vector4 & | v | ) | [inline] |
Definition at line 167 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator/= | ( | const UT_Vector4 & | v | ) | [inline] |
Definition at line 316 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator/= | ( | fpreal | scalar | ) | [inline] |
Definition at line 311 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator= | ( | fpreal | scalar | ) | [inline] |
Definition at line 279 of file UT_Vector4.h.
| UT_Vector4& UT_Vector4::operator= | ( | const UT_Vector3 & | v | ) |
Assignment operator that creates a V4 from a V3 by adding a '1' element.
| unsigned UT_Vector4::operator== | ( | const UT_Vector4 & | v | ) | const [inline] |
Definition at line 175 of file UT_Vector4.h.
| float UT_Vector4::operator[] | ( | unsigned | i | ) | const [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 450 of file UT_Vector4.h.
| float& UT_Vector4::operator[] | ( | unsigned | i | ) | [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 445 of file UT_Vector4.h.
| void UT_Vector4::rowVecMult | ( | const UT_DMatrix4 & | m | ) | [inline] |
If you need a multiplication operator that left multiplies the vector by a matrix (M * v), use the following colVecMult() functions. If you'd rather not use operator*=() for right-multiplications (v * M), use the following rowVecMult() functions.
Definition at line 241 of file UT_Vector4.h.
| void UT_Vector4::rowVecMult | ( | const UT_Matrix4 & | m | ) | [inline] |
If you need a multiplication operator that left multiplies the vector by a matrix (M * v), use the following colVecMult() functions. If you'd rather not use operator*=() for right-multiplications (v * M), use the following rowVecMult() functions.
Definition at line 239 of file UT_Vector4.h.
| void UT_Vector4::rowVecMult3 | ( | const UT_DMatrix4 & | m | ) | [inline] |
This multiply will ignore the 4th component both in the vector an in the matrix. This helps when you want to avoid affecting the 'w' component. This in turns annihilates the translation components (row 4) in mat, so be careful.
Definition at line 256 of file UT_Vector4.h.
| void UT_Vector4::rowVecMult3 | ( | const UT_Matrix4 & | m | ) | [inline] |
This multiply will ignore the 4th component both in the vector an in the matrix. This helps when you want to avoid affecting the 'w' component. This in turns annihilates the translation components (row 4) in mat, so be careful.
Definition at line 254 of file UT_Vector4.h.
| void UT_Vector4::save | ( | ostream & | os, | |
| int | binary = 0 | |||
| ) | const |
| float UT_Vector4::w | ( | void | ) | const [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 434 of file UT_Vector4.h.
| float& UT_Vector4::w | ( | void | ) | [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 433 of file UT_Vector4.h.
| float UT_Vector4::x | ( | void | ) | const [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 428 of file UT_Vector4.h.
| float& UT_Vector4::x | ( | void | ) | [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 427 of file UT_Vector4.h.
| float UT_Vector4::y | ( | void | ) | const [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 430 of file UT_Vector4.h.
| float& UT_Vector4::y | ( | void | ) | [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 429 of file UT_Vector4.h.
| float UT_Vector4::z | ( | void | ) | const [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 432 of file UT_Vector4.h.
| float& UT_Vector4::z | ( | void | ) | [inline] |
Return the components of the vector. The () operator does NOT check for the boundary condition.
Definition at line 431 of file UT_Vector4.h.
| ostream& operator<< | ( | ostream & | os, | |
| const UT_Vector4 & | v | |||
| ) | [friend] |
1.5.9