#include <CVector3.h>
Inheritance diagram for CVector3:
Public Member Functions | |
CVector3 () | |
default costructor | |
CVector3 (zfloat valx, zfloat valy, zfloat valz) | |
Constructor. | |
CVector3 (const CVector3 &v) | |
Constructor. | |
~CVector3 () | |
Distructor. | |
void | Cross (const CVector3 &v1, const CVector3 &v2) |
Cross product. | |
void | Set (zfloat valx, zfloat valy, zfloat valz) |
Sets x,y,z to the values of valx, valy, valz. | |
void | Set (const CVector3 &v) |
Sets the x,y,z to the values of v's coordinates. | |
CVector3 | operator= (const CVector3 &v) |
= operator | |
CVector3 | operator+= (const CVector3 &v) |
+ operator | |
CVector3 | operator-= (const CVector3 &v) |
| |
CVector3 | operator *= (zfloat val) |
Scalar product operator. | |
CVector3 | operator/= (zfloat val) |
Scalar division operator. | |
CVector3 | operator *= (CVector3 v) |
vector product operator | |
CVector3 | operator/= (CVector3 v) |
vector division operator | |
CVector3 | operator+ () |
Unary + operator. | |
CVector3 | operator- () |
Unary - operator. | |
zfloat | Dist (const CVector3 &v) const |
Returns the distance between two vectors. | |
CVector3 | Norm (const CVector3 &v1, const CVector3 &v2, const CVector3 &v3) |
Returns the normal vector of v1,v2,v3. | |
CVector3 | NormUnit (const CVector3 &v1, const CVector3 &v2, const CVector3 &v3) |
Returns the normal normalized vector of v1,v2,v3. | |
zfloat | Lenght () const |
Returns the lenght of the vector. | |
CVector3 | SetLenght (zfloat val) |
Sets the lenght of the vector. | |
CVector3 | Normalize () |
Normalize the vector. | |
CVector3 | ClosestPointOnLine (CVector3 v1, CVector3 v2) const |
Returns the nearest pozuints to the v1-v2 line. | |
zfloat | IntersectSphere (CVector3 rO, CVector3 rV, zfloat sR) const |
Returns the distance between the sphere and the ray. | |
zfloat | Angle (CVector3 v) const |
Returns the angle between the vector and v. | |
Public Attributes | |
zfloat | fCoord [3] |
x,y,z coords | |
Friends | |
CVector3 | operator+ (const CVector3 &v1, const CVector3 &v2) |
+ operator | |
CVector3 | operator- (const CVector3 &v1, const CVector3 &v2) |
| |
zfloat | operator * (const CVector3 &v1, const CVector3 &v2) |
Dot product operator. | |
CVector3 | operator% (const CVector3 &v1, const CVector3 &v2) |
Cross product operator (see Cross). | |
CVector3 | operator * (const CVector3 &v, zfloat val) |
Scalar product (zfloat). | |
CVector3 | operator * (zfloat val, const CVector3 &v) |
Scalar product (zfloat). | |
CVector3 | operator * (const CVector3 &v, zuint val) |
Scalar product (zuint). | |
CVector3 | operator * (zuint val, const CVector3 &v) |
Scalar product (zuint). | |
CVector3 | operator/ (const CVector3 &v, zfloat val) |
Scalar division (zfloat). | |
CVector3 | operator/ (zfloat val, const CVector3 &v) |
Scalar division (zfloat). | |
CVector3 | operator/ (const CVector3 &v, zuint val) |
Scalar division (zuint). | |
CVector3 | operator/ (zuint val, const CVector3 &v) |
Scalar Division (zuint). | |
bool | operator== (const CVector3 &v1, const CVector3 &v2) |
== operator | |
bool | operator!= (const CVector3 &v1, const CVector3 &v2) |
!= operator |
base vector 3d class for vector and point management
|
default costructor
|
|
Constructor.
|
|
Constructor.
|
|
Distructor.
|
|
Returns the angle between the vector and v.
|
|
Returns the nearest pozuints to the v1-v2 line.
|
|
Cross product.
|
|
Returns the distance between two vectors.
|
|
Returns the distance between the sphere and the ray.
the sphere is centered in the vector and has sR as ray. |
|
Returns the lenght of the vector.
|
|
Returns the normal vector of v1,v2,v3.
|
|
Normalize the vector.
|
|
Returns the normal normalized vector of v1,v2,v3.
|
|
vector product operator
|
|
Scalar product operator.
Reimplemented in CVectorTex3. |
|
Unary + operator.
Reimplemented in CVectorTex3. |
|
+ operator
|
|
Unary - operator.
Reimplemented in CVectorTex3. |
|
|
|
vector division operator
|
|
Scalar division operator.
Reimplemented in CVectorTex3. |
|
= operator
Reimplemented in CVectorTex3. |
|
Sets the x,y,z to the values of v's coordinates.
|
|
Sets x,y,z to the values of valx, valy, valz.
|
|
Sets the lenght of the vector.
|
|
Scalar product (zuint).
|
|
Scalar product (zuint).
|
|
Scalar product (zfloat).
|
|
Scalar product (zfloat).
|
|
Dot product operator.
|
|
!= operator
|
|
Cross product operator (see Cross).
|
|
+ operator
|
|
|
|
Scalar Division (zuint).
|
|
Scalar division (zuint).
|
|
Scalar division (zfloat).
|
|
Scalar division (zfloat).
|
|
== operator
|
|
x,y,z coords
|