Inherits INumberVector< F, 3, Vec3_tpl< F > >.
|
ILINE | Vec3_tpl (type_zero) |
|
ILINE | Vec3_tpl (F s) |
|
template<typename F2 > |
ILINE | Vec3_tpl (const Vec3_tpl< F2 > &in) |
|
| Vec3_tpl (type_min) |
|
| Vec3_tpl (type_max) |
|
ILINE | Vec3_tpl (F vx, F vy, F vz) |
|
ILINE void | operator() (F vx, F vy, F vz) |
|
ILINE Vec3_tpl< F > & | Set (const F xval, const F yval, const F zval) |
|
ILINE | Vec3_tpl (const Vec2_tpl< F > &v, F vz=0) |
|
template<class F2 > |
ILINE | Vec3_tpl (const Vec2_tpl< F2 > &v, F2 vz=0) |
|
ILINE | operator const Vec2_tpl< F > & () const |
|
ILINE bool | operator== (const Vec3_tpl< F > &o) const |
|
ILINE bool | operator!= (const Vec3_tpl< F > &o) const |
|
ILINE Vec3_tpl< F > & | Flip () |
|
ILINE bool | IsZeroFast (F e=(F) 0.0003) const |
|
ILINE bool | IsUnit (f32 epsilon=VEC_EPSILON) const |
|
ILINE void | SetLength (F fLen) |
| force vector length by normalizing it
|
|
ILINE void | ClampLength (F maxLength) |
|
ILINE F | GetLength2D () const |
| calculate the length of the vector ignoring the z component
|
|
ILINE F | GetLengthSquared2D () const |
| calculate the squared length of the vector ignoring the z component
|
|
ILINE F | GetSquaredDistance2D (const Vec3_tpl< F > &v) const |
|
ILINE F | NormalizeSafe (const Vec3_tpl< F > &safe=Vec3Constants< F >::fVec3_Zero) |
|
ILINE Vec3_tpl | GetNormalizedSafe (const Vec3_tpl< F > &safe=Vec3Constants< F >::fVec3_OneX) const |
| return a safely normalized vector - returns safe vector (should be normalised) if original is zero length
|
|
ILINE Vec3_tpl | GetPermutated (int new_z) const |
| Permutate coordinates so that z goes to new_z slot.
|
|
ILINE F | GetVolume () const |
|
ILINE Vec3_tpl< F > | abs () const |
|
ILINE void | CheckMin (const Vec3_tpl< F > &other) |
| check for min bounds
|
|
ILINE void | CheckMax (const Vec3_tpl< F > &other) |
| check for max bounds
|
|
ILINE void | SetOrthogonal (const Vec3_tpl< F > &v) |
|
ILINE Vec3_tpl | GetOrthogonal () const |
|
ILINE void | SetProjection (const Vec3_tpl &i, const Vec3_tpl &n) |
|
ILINE Vec3_tpl | ProjectionOn (const Vec3_tpl &b) const |
|
ILINE void | SetReflection (const Vec3_tpl< F > &i, const Vec3_tpl< F > &n) |
|
ILINE void | SetLerp (const Vec3_tpl< F > &p, const Vec3_tpl< F > &q, F t) |
|
void | SetSlerp (const Vec3_tpl< F > &p, const Vec3_tpl< F > &q, F t) |
|
ILINE void | SetQuadraticCurve (const Vec3_tpl< F > &v0, const Vec3_tpl< F > &v1, const Vec3_tpl< F > &v2, F t1) |
|
ILINE void | SetCubicCurve (const Vec3_tpl< F > &v0, const Vec3_tpl< F > &v1, const Vec3_tpl< F > &v2, const Vec3_tpl< F > &v3, F t1) |
|
ILINE void | SetQuadraticSpline (const Vec3_tpl< F > &v0, const Vec3_tpl< F > &v1, const Vec3_tpl< F > &v2, F t) |
|
ILINE Vec3_tpl< F > | GetRotated (const Vec3_tpl< F > &axis, F angle) const |
|
ILINE Vec3_tpl< F > | GetRotated (const Vec3_tpl< F > &axis, F cosa, F sina) const |
|
ILINE Vec3_tpl< F > | GetRotated (const Vec3_tpl ¢er, const Vec3_tpl< F > &axis, F angle) const |
|
ILINE Vec3_tpl< F > | GetRotated (const Vec3_tpl< F > ¢er, const Vec3_tpl< F > &axis, F cosa, F sina) const |
|
ILINE Vec3_tpl | CompMul (const Vec3_tpl< F > &rhs) const |
| Component-wise multiplication of two vectors.
|
|
ILINE F | Dot (const Vec2_tpl< F > &v) const |
|
ILINE Vec3_tpl< F > | Cross (const Vec3_tpl< F > &vec2) const |
| Two methods for a "cross-product" operation.
|
|
| CRY_DEPRECATED ("Use begin() instead") operator F*() |
|
template<class T > |
| CRY_DEPRECATED ("Use Vec3_tpl(const Vec3_tpl&) instead") explicit Vec3_tpl(const T *src) |
|
ILINE Vec3_tpl & | zero () |
|
ILINE F | len () const |
|
ILINE F | len2 () const |
|
ILINE Vec3_tpl & | normalize () |
|
ILINE Vec3_tpl | normalized () const |
|
template<class F1 > |
ILINE Vec3_tpl< F1 > | sub (const Vec3_tpl< F1 > &v) const |
| Vector subtraction.
|
|
template<class F1 > |
ILINE Vec3_tpl< F1 > | scale (const F1 k) const |
| Vector scale.
|
|
template<class F1 > |
ILINE F1 | dot (const Vec3_tpl< F1 > &v) const |
| Vector dot product.
|
|
template<class F1 > |
ILINE Vec3_tpl< F1 > | cross (const Vec3_tpl< F1 > &v) const |
| Vector cross product.
|
|
template<> |
| Vec3_tpl (type_min) |
|
template<> |
| Vec3_tpl (type_max) |
|
|
static ILINE bool | IsEquivalent (const Vec3_tpl< F > &v0, const Vec3_tpl< F > &v1, f32 epsilon=VEC_EPSILON) |
|
static ILINE Vec3_tpl< F > | CreateProjection (const Vec3_tpl &i, const Vec3_tpl &n) |
|
static ILINE Vec3_tpl< F > | CreateReflection (const Vec3_tpl< F > &i, const Vec3_tpl< F > &n) |
|
static ILINE Vec3_tpl< F > | CreateLerp (const Vec3_tpl< F > &p, const Vec3_tpl< F > &q, F t) |
|
static ILINE Vec3_tpl< F > | CreateSlerp (const Vec3_tpl< F > &p, const Vec3_tpl< F > &q, F t) |
|
static ILINE Vec3_tpl< F > | CreateQuadraticCurve (const Vec3_tpl< F > &v0, const Vec3_tpl< F > &v1, const Vec3_tpl< F > &v2, F t) |
|
static ILINE Vec3_tpl< F > | CreateCubicCurve (const Vec3_tpl< F > &v0, const Vec3_tpl< F > &v1, const Vec3_tpl< F > &v2, const Vec3_tpl< F > &v3, F t) |
|
static ILINE Vec3_tpl< F > | CreateQuadraticSpline (const Vec3_tpl< F > &v0, const Vec3_tpl< F > &v1, const Vec3_tpl< F > &v2, F t) |
|
template<typename F>
struct Vec3_tpl< F >
General-purpose 3D vector implementation
- See also
- Vec3, Vec3i