Representation of 3D vectors and points. More...
Public Member Functions | |
kVec3 () | |
kVec3 (float x, float y, float z) | |
kVec3 (const kVec3 &in v) | |
kVec3 & | Normalize () |
Makes this vector have a magnitude of 1. | |
kVec3 | Cross (const kVec3 &in v) const |
Cross Product of two vectors. | |
float | Dot (const kVec3 &in v) const |
Dot Product of two vectors. | |
float | Length () const |
Returns the length of this vector. Exactly the same as Unit() | |
float | LengthSq () const |
Returns the squared length of this vector. Exactly the same as UnitSq() | |
float | DistanceSq (const kVec3 &in other) const |
Returns the squared distance between this instance and other. | |
float | ToYaw () |
Returns the Yaw direction in Rads. | |
float | ToPitch () |
Returns the Pitch direction in Rads. | |
void | Clear () |
Sets x, y and z components to 0. | |
void | Set (const float x, const float y, const float z) |
Set x, y and z components of this kVec3. | |
kVec3 | Lerp (const kVec3 &in other, const float t) const |
Linearly interpolates between two vectors. | |
kVec3 & | Lerp (const kVec3 &in other, const float t) |
Linearly interpolates between two vectors. | |
kVec3 & | Project (const kVec3 &in normal, const float value) |
Projects a vector onto another vector. | |
kVec3 & | Reflect (const kVec3 &in normal, const float energyFactor) |
Reflects a vector off the plane defined by a normal. | |
kVec3 & | Randomize (const float value) |
Randomizes x, y, z, components by value. | |
kVec3 & | CubicCurve (const kVec3 &in pt1, const float value, const kVec3 &in pt2) |
kVec3 & | QuadraticCurve (const kVec3 &in pt1, const float value, const kVec3 &in pt2, const kVec3 &in pt3) |
kVec3 | opAdd (const kVec3 &in v) const |
kVec3 | opAdd (const float f) const |
kVec3 & | opAddAssign (const kVec3 &in v) |
kVec3 & | opAddAssign (const float f) |
kVec3 | opNeg () |
kVec3 | opSub (const kVec3 &in v) const |
kVec3 | opSub (const float f) const |
kVec3 & | opSubAssign (const kVec3 &in v) |
kVec3 & | opSubAssign (const float f) |
kVec3 | opMul (const kVec3 &in v) |
kVec3 | opMul (const float val) |
kVec3 & | opMulAssign (const kVec3 &in v) |
kVec3 & | opMulAssign (const float f) |
kVec3 | opDiv (const kVec3 &in v) |
kVec3 | opDiv (const float val) |
kVec3 & | opDivAssign (const kVec3 &in v) |
kVec3 & | opDivAssign (const float f) |
kVec3 & | opAssign (const kVec3 &in v) |
float | opIndex (int i) const |
float & | opIndex (int i) |
float | Distance (const kVec3 &in other) const |
Returns the distance between this instance and other vector. | |
kStr | ToString () |
kVec3 | opMul (const kQuat &in rot) const |
kVec3 & | opMulAssign (const kQuat &in rot) |
kQuat | ToQuaternion () const |
kQuat | ToQuat () const |
float | Unit () const |
Returns the length of this vector. Exactly the same as Length() | |
float | UnitSq () const |
Returns the squared length of this vector. Exactly the same as LengthSq() | |
Public Attributes | |
float | x |
float | y |
float | z |
Representation of 3D vectors and points.
Definition at line 664 of file t1_scriptAPI.cpp.
kVec3::kVec3 | ( | ) |
kVec3::kVec3 | ( | float | x, |
float | y, | ||
float | z ) |
kVec3::kVec3 | ( | const kVec3 &in | v | ) |
void kVec3::Clear | ( | ) |
Sets x, y and z components to 0.
float kVec3::Distance | ( | const kVec3 &in | other | ) | const |
Returns the distance between this instance and other vector.
float kVec3::DistanceSq | ( | const kVec3 &in | other | ) | const |
Returns the squared distance between this instance and other.
float kVec3::Dot | ( | const kVec3 &in | v | ) | const |
Dot Product of two vectors.
float kVec3::Length | ( | ) | const |
Returns the length of this vector. Exactly the same as Unit()
float kVec3::LengthSq | ( | ) | const |
Returns the squared length of this vector. Exactly the same as UnitSq()
Linearly interpolates between two vectors.
Linearly interpolates between two vectors.
kVec3 & kVec3::Normalize | ( | ) |
Makes this vector have a magnitude of 1.
kVec3 kVec3::opAdd | ( | const float | f | ) | const |
kVec3 & kVec3::opAddAssign | ( | const float | f | ) |
kVec3 kVec3::opDiv | ( | const float | val | ) |
kVec3 & kVec3::opDivAssign | ( | const float | f | ) |
float & kVec3::opIndex | ( | int | i | ) |
float kVec3::opIndex | ( | int | i | ) | const |
kVec3 kVec3::opMul | ( | const float | val | ) |
kVec3 & kVec3::opMulAssign | ( | const float | f | ) |
kVec3 kVec3::opNeg | ( | ) |
kVec3 kVec3::opSub | ( | const float | f | ) | const |
kVec3 & kVec3::opSubAssign | ( | const float | f | ) |
Projects a vector onto another vector.
kVec3 & kVec3::QuadraticCurve | ( | const kVec3 &in | pt1, |
const float | value, | ||
const kVec3 &in | pt2, | ||
const kVec3 &in | pt3 ) |
kVec3 & kVec3::Randomize | ( | const float | value | ) |
Randomizes x, y, z, components by value.
Reflects a vector off the plane defined by a normal.
void kVec3::Set | ( | const float | x, |
const float | y, | ||
const float | z ) |
Set x, y and z components of this kVec3.
float kVec3::ToPitch | ( | ) |
Returns the Pitch direction in Rads.
kQuat kVec3::ToQuat | ( | ) | const |
kQuat kVec3::ToQuaternion | ( | ) | const |
kStr kVec3::ToString | ( | ) |
float kVec3::ToYaw | ( | ) |
Returns the Yaw direction in Rads.
float kVec3::Unit | ( | ) | const |
Returns the length of this vector. Exactly the same as Length()
float kVec3::UnitSq | ( | ) | const |
Returns the squared length of this vector. Exactly the same as LengthSq()
float kVec3::x |
Definition at line 715 of file t1_scriptAPI.cpp.
float kVec3::y |
Definition at line 716 of file t1_scriptAPI.cpp.
float kVec3::z |
Definition at line 717 of file t1_scriptAPI.cpp.