SCL
1.0
Standard Control Library : Control, dynamics, physics, and simulation
|
3x1 vector classThis is a C++ wrapper class of deVector3f. More...
#include <TaoDeVector3.h>
Public Member Functions | |
deVector3 () | |
deVector3 (deFloat v0, deFloat v1, deFloat v2) | |
deVector3 (deVector3 const &orig) | |
deFloat & | operator[] (const deInt i) |
return this[i] More... | |
const deFloat & | operator[] (const deInt i) const |
return const this[i] More... | |
operator deFloat * () | |
(deVector3& )this More... | |
operator const deFloat * () const | |
(const deVector3& )this More... | |
deFloat & | elementAt (const deInt i) |
return this[i] More... | |
const deFloat & | elementAt (const deInt i) const |
return const this[i] More... | |
DE_MATH_API void | operator= (const deVector3 &v) |
this = v; More... | |
DE_MATH_API deInt | operator== (const deVector3 &v) const |
return (this == v) More... | |
DE_MATH_API void | operator+= (const deVector3 &v) |
this += v More... | |
DE_MATH_API void | operator-= (const deVector3 &v) |
this -= v More... | |
DE_MATH_API void | operator*= (const deVector3 &v) |
this[i] *= v[i] More... | |
DE_MATH_API void | operator*= (const deFloat s) |
this[i] *= s More... | |
DE_MATH_API void | operator+= (const deFloat s) |
this[i] += s More... | |
DE_MATH_API void | zero () |
this = 0 More... | |
DE_MATH_API deFloat | dot (const deVector3 &v) const |
return this^T * v More... | |
DE_MATH_API deFloat | magnitude () const |
return sqrt(this^T * this) More... | |
DE_MATH_API void | normalize () |
this[i] *= (1 / magnitude()) More... | |
DE_MATH_API void | set (const deFloat x, const deFloat y, const deFloat z) |
this = (x, y, z) More... | |
DE_MATH_API void | set (const deFloat *v) |
this = [x y z] More... | |
DE_MATH_API void | get (deFloat *v) const |
[x y z] = this More... | |
DE_MATH_API void | minimum (const deVector3 &v) |
this[i] = min(this[i], v[i]) More... | |
DE_MATH_API void | maximum (const deVector3 &v) |
this[i] = max(this[i], v[i]) More... | |
DE_MATH_API void | negate (const deVector3 &v) |
this = -v More... | |
DE_MATH_API void | add (const deVector3 &v1, const deVector3 &v2) |
this = v1 + v2 More... | |
DE_MATH_API void | subtract (const deVector3 &v1, const deVector3 &v2) |
this = v1 - v2 More... | |
DE_MATH_API void | multiply (const deVector3 &v1, const deVector3 &v2) |
this[i] = v1[i] * v2[i] More... | |
DE_MATH_API void | multiply (const deVector3 &v, const deFloat s) |
this[i] = v[i] * s More... | |
DE_MATH_API void | add (const deVector3 &v, const deFloat s) |
this[i] = v[i] + s More... | |
DE_MATH_API void | crossMultiply (const deVector3 &v1, const deVector3 &v2) |
this = v1 x v2 More... | |
DE_MATH_API void | multiply (const deMatrix3 &m, const deVector3 &v) |
this = m * v More... | |
DE_MATH_API void | transposedMultiply (const deMatrix3 &m, const deVector3 &v) |
this = m^T * v More... | |
DE_MATH_API void | multiply (const deTransform &t, const deVector3 &v) |
this = [r,p]v = r*v + p More... | |
DE_MATH_API void | inversedMultiply (const deTransform &t, const deVector3 &v) |
this = ~[r,p]*v = [~r, -(~r*p)]*v = ~r*v -~r*p = ~r*(v-p) More... | |
DE_MATH_API void | diagonal (const deMatrix3 &m) |
this = diag(m) More... | |
DE_MATH_API void | column (const deMatrix3 &m, const deInt col) |
this = col of m More... | |
DE_MATH_API void | angularError (const deMatrix3 &R, const deMatrix3 &Rd) |
this = dPhi = R - Rd More... | |
DE_MATH_API void | eulerXYZ (const deMatrix3 &m) |
this = XYZ Euler angles of m More... | |
DE_MATH_API void | eulerZYX (const deMatrix3 &m) |
this = ZYX Euler angles of m More... | |
DE_MATH_API void | eulerZYX (const deMatrix3 &m, const deVector3 &v) |
this = ZYX Euler angles of m using v for singularity More... | |
DE_MATH_API void | eulerZYX (const deQuaternion &q) |
this = ZYX Euler angles of q More... | |
DE_MATH_API void | backSub (const deMatrix3 &LU, const deVector3 &y) |
this = x where y = LU x More... | |
DE_MATH_API void | multiply (const deQuaternion &q, const deVector3 &v) |
this = q * v More... | |
DE_MATH_API void | inversedMultiply (const deQuaternion &q, const deVector3 &v) |
this = q^-1 * v More... | |
DE_MATH_API void | column (const deQuaternion &q, const deInt col) |
this = col of q More... | |
DE_MATH_API void | angularError (const deQuaternion &q, const deQuaternion &qd) |
DE_MATH_API void | multiply (const deFrame &f, const deVector3 &v) |
this = [r,p]v = r*v + p More... | |
DE_MATH_API void | inversedMultiply (const deFrame &f, const deVector3 &v) |
this = ~[r,p]*v = [~r, -(~r*p)]*v = ~r*v -~r*p = ~r*(v-p) More... | |
DE_MATH_API void | lerp (const deVector3 &v, const deVector3 &vg, const deFloat t) |
this = LERP More... | |
Private Attributes | |
deFloat | _data [DE_VECTOR3_SIZE] |
3x1 vector class
This is a C++ wrapper class of deVector3f.
|
inline |
default ctor zeros all elements
|
inline |
init elements from three ctor args
DE_MATH_API void deVector3::add | ( | const deVector3 & | v, |
const deFloat | s | ||
) |
this[i] = v[i] + s
this = dPhi = R - Rd
this = x where y = LU x
DE_MATH_API void deVector3::column | ( | const deMatrix3 & | m, |
const deInt | col | ||
) |
this = col of m
DE_MATH_API void deVector3::column | ( | const deQuaternion & | q, |
const deInt | col | ||
) |
this = col of q
this = v1 x v2
DE_MATH_API void deVector3::diagonal | ( | const deMatrix3 & | m | ) |
this = diag(m)
DE_MATH_API deFloat deVector3::dot | ( | const deVector3 & | v | ) | const |
return this^T * v
|
inline |
return this[i]
|
inline |
return const this[i]
DE_MATH_API void deVector3::eulerXYZ | ( | const deMatrix3 & | m | ) |
this = XYZ Euler angles of m
DE_MATH_API void deVector3::eulerZYX | ( | const deMatrix3 & | m | ) |
this = ZYX Euler angles of m
this = ZYX Euler angles of m using v for singularity
DE_MATH_API void deVector3::eulerZYX | ( | const deQuaternion & | q | ) |
this = ZYX Euler angles of q
DE_MATH_API void deVector3::get | ( | deFloat * | v | ) | const |
[x y z] = this
DE_MATH_API void deVector3::inversedMultiply | ( | const deTransform & | t, |
const deVector3 & | v | ||
) |
this = ~[r,p]*v = [~r, -(~r*p)]*v = ~r*v -~r*p = ~r*(v-p)
DE_MATH_API void deVector3::inversedMultiply | ( | const deQuaternion & | q, |
const deVector3 & | v | ||
) |
this = q^-1 * v
this = ~[r,p]*v = [~r, -(~r*p)]*v = ~r*v -~r*p = ~r*(v-p)
this = LERP
DE_MATH_API deFloat deVector3::magnitude | ( | ) | const |
return sqrt(this^T * this)
DE_MATH_API void deVector3::maximum | ( | const deVector3 & | v | ) |
this[i] = max(this[i], v[i])
DE_MATH_API void deVector3::minimum | ( | const deVector3 & | v | ) |
this[i] = min(this[i], v[i])
this[i] = v1[i] * v2[i]
DE_MATH_API void deVector3::multiply | ( | const deVector3 & | v, |
const deFloat | s | ||
) |
this[i] = v[i] * s
DE_MATH_API void deVector3::multiply | ( | const deTransform & | t, |
const deVector3 & | v | ||
) |
this = [r,p]v = r*v + p
DE_MATH_API void deVector3::multiply | ( | const deQuaternion & | q, |
const deVector3 & | v | ||
) |
this = q * v
this = [r,p]v = r*v + p
DE_MATH_API void deVector3::negate | ( | const deVector3 & | v | ) |
this = -v
DE_MATH_API void deVector3::normalize | ( | ) |
this[i] *= (1 / magnitude())
|
inline |
(const deVector3& )this
|
inline |
(deVector3& )this
DE_MATH_API void deVector3::operator*= | ( | const deVector3 & | v | ) |
this[i] *= v[i]
DE_MATH_API void deVector3::operator*= | ( | const deFloat | s | ) |
this[i] *= s
DE_MATH_API void deVector3::operator+= | ( | const deVector3 & | v | ) |
this += v
DE_MATH_API void deVector3::operator+= | ( | const deFloat | s | ) |
this[i] += s
DE_MATH_API void deVector3::operator-= | ( | const deVector3 & | v | ) |
this -= v
DE_MATH_API void deVector3::operator= | ( | const deVector3 & | v | ) |
this = v;
DE_MATH_API deInt deVector3::operator== | ( | const deVector3 & | v | ) | const |
return (this == v)
This is a C++ inline class of deVector3.
|
inline |
return this[i]
|
inline |
return const this[i]
DE_MATH_API void deVector3::set | ( | const deFloat | x, |
const deFloat | y, | ||
const deFloat | z | ||
) |
this = (x, y, z)
DE_MATH_API void deVector3::set | ( | const deFloat * | v | ) |
this = [x y z]
this = m^T * v
DE_MATH_API void deVector3::zero | ( | ) |
this = 0