3DCoat
3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
|
Class for working with Euclidean vectors in 3D-space. More...
#include <SVec3.h>
Public Member Functions | |
Vec3 () | |
Constructor for building a zero vector. More... | |
operator std::string () const | |
Ability for converting Vec3 to string . More... | |
bool | operator== (const Vec3 &b) const |
Comparison. More... | |
bool | normalized () const |
Returns TRUE then the vector is normalized. More... | |
bool | zero () const |
Returns TRUE then the all values of the vector is zero. More... | |
Vec3 & | operator() (int i, float value) |
Setter like array. [ 0 ] is x [ 1 ] is y [ 2 ] is z By analogy with Mat3 and Mat4 . More... | |
float | operator() (int i) const |
Getter like array. More... | |
Vec3 & | x (const float &value) |
Setter for x . More... | |
float | x () const |
Getter for x . More... | |
Vec3 & | y (const float &value) |
Setter for y . More... | |
float | y () const |
Getter for y . More... | |
Vec3 & | z (const float &value) |
Setter for z . More... | |
float | z () const |
Getter for z . More... | |
Vec3 | operator- () const |
Negation operator. More... | |
float | angle (const Vec3 &b) const |
Calculates angle between this vector and vector b . More... | |
float | distance (const Vec3 &b) const |
Calculates an Euclidean distance between this vector and vector b . More... | |
float | dot (const Vec3 &b) const |
Returns a dot product. More... | |
float | length () const |
Returns an Euclidean length. More... | |
float | lengthSquared () const |
Returns a squared Euclidean length. More... | |
Vec3 & | abs () |
Set values of the vector to absolute. More... | |
Vec3 | absCopy () const |
Vec3 & | clamp (float min, float max) |
Clamp values to diapason [min; max]. More... | |
Vec3 | clampCopy (float min, float max) const |
Vec3 & | clamp (const Vec3 &min, const Vec3 &max) |
Clamp values to diapason [min; max]. More... | |
Vec3 | clampCopy (const Vec3 &min, const Vec3 &max) const |
Vec3 & | cross (const Vec3 &b) |
Return a cross product. More... | |
Vec3 | crossCopy (const Vec3 &b) const |
Vec3 & | lerp (const Vec3 &b, float s) |
Interpolates between vectors, using linear interpolation. More... | |
Vec3 | lerpCopy (const Vec3 &b, float s) const |
Vec3 & | max (const Vec3 &b) |
Calculates a maximum between two vectors. More... | |
Vec3 | maxCopy (const Vec3 &b) const |
Vec3 & | min (const Vec3 &b) |
Calculates a minimum between two vectors. More... | |
Vec3 | minCopy (const Vec3 &b) const |
Vec3 & | normalize () |
Normalize the vector. More... | |
Vec3 | normalizeCopy () const |
Vec3 & | round () |
Returns rounded vector. More... | |
Vec3 | roundCopy () const |
Vec3 & | reflect (const Vec3 &normal) |
Calculates a reflected vector by normal . More... | |
Vec3 | reflectCopy (const Vec3 &normal) const |
Vec3 & | refract (const Vec3 &normal, float eta) |
Calculates a refracted vector by normal and eta . More... | |
Vec3 | refractCopy (const Vec3 &normal, float eta) const |
Vec3 & | slerp (const Vec3 &b, float s) |
Interpolates between vectors, using spherical linear interpolation. More... | |
Vec3 | slerpCopy (const Vec3 &b, float s) const |
Vec3 & | transform (const Mat4 &) |
Transform by matrix m . More... | |
Vec3 | transformCopy (const Mat4 &) const |
Vec3 & | truncate (float length) |
Truncate to length . More... | |
Vec3 | truncateCopy (float length) const |
|
inline |
Constructor for building a zero vector.
Referenced by operator-().
|
inline |
|
inline |
|
inline |
Clamp values to diapason [min; max].
References clampCopy().
Clamp values to diapason [min; max].
References clampCopy().
|
inline |
Referenced by clamp().
Return a cross product.
References crossCopy().
|
inline |
Calculates an Euclidean distance between this vector and vector b
.
|
inline |
Returns a dot product.
|
inline |
|
inline |
|
inline |
Normalize the vector.
References normalizeCopy().
|
inline |
Referenced by normalize().
|
inline |
Returns TRUE
then the vector is normalized.
coat::scripto::Vec3::operator std::string | ( | ) | const |
|
inline |
|
inline |
Getter like array.
|
inline |
|
inline |
Calculates a refracted vector by normal
and eta
.
eta | Ratio of indices of refraction at the surface. |
References refractCopy().
|
inline |
Returns rounded vector.
References roundCopy().
Interpolates between vectors, using spherical linear interpolation.
References slerpCopy().
Transform by matrix m
.
|
inline |
|
inline |
Referenced by truncate().
|
inline |
Setter for x
.
Referenced by coat::scripto::FreeFormPrim::AxisX(), coat::scripto::IRegularGizmo< TextPrim >::AxisX(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisX(), coat::scripto::FreeFormPrim::AxisY(), coat::scripto::IRegularGizmo< TextPrim >::AxisY(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisY(), coat::scripto::FreeFormPrim::AxisZ(), coat::scripto::IRegularGizmo< TextPrim >::AxisZ(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisZ(), coat::scripto::IRegularGizmo< TextPrim >::Position(), and coat::scripto::IRegularGizmo< TextPrim >::Size().
|
inline |
|
inline |
Setter for y
.
Referenced by coat::scripto::FreeFormPrim::AxisX(), coat::scripto::IRegularGizmo< TextPrim >::AxisX(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisX(), coat::scripto::FreeFormPrim::AxisY(), coat::scripto::IRegularGizmo< TextPrim >::AxisY(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisY(), coat::scripto::FreeFormPrim::AxisZ(), coat::scripto::IRegularGizmo< TextPrim >::AxisZ(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisZ(), coat::scripto::IRegularGizmo< TextPrim >::Position(), and coat::scripto::IRegularGizmo< TextPrim >::Size().
|
inline |
Setter for z
.
Referenced by coat::scripto::FreeFormPrim::AxisX(), coat::scripto::IRegularGizmo< TextPrim >::AxisX(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisX(), coat::scripto::FreeFormPrim::AxisY(), coat::scripto::IRegularGizmo< TextPrim >::AxisY(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisY(), coat::scripto::FreeFormPrim::AxisZ(), coat::scripto::IRegularGizmo< TextPrim >::AxisZ(), coat::scripto::IFastenerBasePrim< BoltPrim >::AxisZ(), coat::scripto::IRegularGizmo< TextPrim >::Position(), and coat::scripto::IRegularGizmo< TextPrim >::Size().
|
inline |
Returns TRUE
then the all values of the vector is zero.