![]() |
Kochol Game Engine
0.1.0
|
#include <Vector.h>
Public Member Functions | |
Vector () | |
New Vector x=y=z=0.0f,w=1.0f;. | |
Vector (float x, float y, float z, float w=1.0f) | |
New Vector set the x, y, z. | |
Vector (const gfx::Vertex3 &init) | |
New Vector from vertex3. | |
void | set (float _x, float _y, float _z, float _w=1.0f) |
New Vector from Vector. | |
void | Reset () |
Reset Vector to default values. | |
float | GetLength () const |
Returns the vector length. | |
float | GetSqrLength () const |
Badast avardane toole bordar be tavane 2. | |
void | Negate () |
jahate bordaro bar ax mikone. | |
void | Normalize () |
bordar ra be bordare Normal tabdil mikone. | |
float | operator* (const Vector &v) const |
Dot product. | |
float | operator* (const gfx::Vertex3 &v) const |
Dot product. | |
Vector | operator- (const Vector &v) const |
Tafrighe do ta vector. | |
Vector | operator- (const gfx::Vertex3 &v) const |
Tafrighe do ta vector. | |
Vector | operator+ (const Vector &v) const |
Adds two vector. | |
void | operator+= (const Vector &v) |
Adds two vector. | |
Vector | operator* (float f) const |
Vector * float. | |
Vector | operator/ (float f) const |
Vector / float. | |
void | operator/= (float f) |
/= float | |
bool | operator!= (const Vector &nv) const |
Checking for not equality. | |
bool | operator== (const Vector &nv) const |
Checking for equal. | |
void | Cross (const Vector &v1, const Vector &v2) |
Zarb khareji do ta Vector ke hasel Vectori hast amood bar on do. | |
void | Cross (const gfx::Vertex3 &v1, const gfx::Vertex3 &v2) |
Cross two vertex3. |
Public Attributes | |
union { | |
float v [4] | |
struct { | |
float x | |
float y | |
float z | |
float w | |
} | |
}; |
|
inline |
|
inline |
kge::math::Vector::Vector | ( | const gfx::Vertex3 & | init | ) |
New Vector from vertex3.
Zarb khareji do ta Vector ke hasel Vectori hast amood bar on do.
Definition at line 194 of file Vector.h.
Referenced by kge::gfx::CalcTangent(), kge::math::Triangle::IntersectRay(), kge::gfx::RecalculateNormals_Flat(), kge::gfx::RecalculateNormals_Smooth(), kge::gfx::RecalculateNormals_Smooth32(), and kge::math::Triangle::Set().
void kge::math::Vector::Cross | ( | const gfx::Vertex3 & | v1, |
const gfx::Vertex3 & | v2 | ||
) |
Cross two vertex3.
|
inline |
|
inline |
|
inline |
|
inline |
bordar ra be bordare Normal tabdil mikone.
Definition at line 108 of file Vector.h.
References kge::math::fEpsilon.
Referenced by kge::gfx::RecalculateNormals_Flat(), kge::gfx::RecalculateNormals_Smooth(), and kge::gfx::RecalculateNormals_Smooth32().
|
inline |
|
inline |
float kge::math::Vector::operator* | ( | const gfx::Vertex3 & | v | ) | const |
Dot product.
|
inline |
|
inline |
Vector kge::math::Vector::operator- | ( | const gfx::Vertex3 & | v | ) | const |
Tafrighe do ta vector.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assignment operator Set the x,y,z w(optional)
Definition at line 74 of file Vector.h.
Referenced by kge::math::Ray::CalcPickingRay(), and kge::sn::Listener::Listener().
union { ... } |
float kge::math::Vector::x |
Definition at line 39 of file Vector.h.
Referenced by Cross(), operator!=(), operator*(), operator+(), operator+=(), operator-(), operator==(), kge::gfx::RecalculateNormals_Flat(), kge::gfx::RecalculateNormals_Smooth(), kge::gfx::RecalculateNormals_Smooth32(), kge::gfx::Vertex3::ToVector(), and kge::math::Matrix::TransFormVec().
float kge::math::Vector::y |
Definition at line 39 of file Vector.h.
Referenced by Cross(), operator!=(), operator*(), operator+(), operator+=(), operator-(), operator==(), kge::gfx::RecalculateNormals_Flat(), kge::gfx::RecalculateNormals_Smooth(), kge::gfx::RecalculateNormals_Smooth32(), kge::gfx::Vertex3::ToVector(), and kge::math::Matrix::TransFormVec().
float kge::math::Vector::z |
Definition at line 39 of file Vector.h.
Referenced by Cross(), operator!=(), operator*(), operator+(), operator+=(), operator-(), operator==(), kge::gfx::RecalculateNormals_Flat(), kge::gfx::RecalculateNormals_Smooth(), kge::gfx::RecalculateNormals_Smooth32(), kge::gfx::Vertex3::ToVector(), and kge::math::Matrix::TransFormVec().