Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CVector3 Class Reference

CVector3d. More...

#include <CVector3.h>

Inheritance diagram for CVector3:

CVectorTex3 List of all members.

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)
 
  • operator


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)
 
  • operator


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


Detailed Description

CVector3d.

base vector 3d class for vector and point management


Constructor & Destructor Documentation

CVector3::CVector3   [inline]
 

default costructor

CVector3::CVector3 zfloat    valx,
zfloat    valy,
zfloat    valz
[inline]
 

Constructor.

CVector3::CVector3 const CVector3 &    v [inline]
 

Constructor.

CVector3::~CVector3   [inline]
 

Distructor.


Member Function Documentation

zfloat CVector3::Angle CVector3    v const [inline]
 

Returns the angle between the vector and v.

CVector3 CVector3::ClosestPointOnLine CVector3    v1,
CVector3    v2
const [inline]
 

Returns the nearest pozuints to the v1-v2 line.

void CVector3::Cross const CVector3 &    v1,
const CVector3 &    v2
[inline]
 

Cross product.

zfloat CVector3::Dist const CVector3 &    v const [inline]
 

Returns the distance between two vectors.

zfloat CVector3::IntersectSphere CVector3    rO,
CVector3    rV,
zfloat    sR
const [inline]
 

Returns the distance between the sphere and the ray.

the sphere is centered in the vector and has sR as ray.
r= rapresents the origin of the ray and rV his direction.

zfloat CVector3::Lenght   const [inline]
 

Returns the lenght of the vector.

CVector3 CVector3::Norm const CVector3 &    v1,
const CVector3 &    v2,
const CVector3 &    v3
[inline]
 

Returns the normal vector of v1,v2,v3.

CVector3 CVector3::Normalize   [inline]
 

Normalize the vector.

CVector3 CVector3::NormUnit const CVector3 &    v1,
const CVector3 &    v2,
const CVector3 &    v3
[inline]
 

Returns the normal normalized vector of v1,v2,v3.

CVector3 CVector3::operator *= CVector3    v [inline]
 

vector product operator

CVector3 CVector3::operator *= zfloat    val [inline]
 

Scalar product operator.

Reimplemented in CVectorTex3.

CVector3 CVector3::operator+   [inline]
 

Unary + operator.

Reimplemented in CVectorTex3.

CVector3 CVector3::operator+= const CVector3 &    v [inline]
 

+ operator

CVector3 CVector3::operator-   [inline]
 

Unary - operator.

Reimplemented in CVectorTex3.

CVector3 CVector3::operator-= const CVector3 &    v [inline]
 

  • operator

CVector3 CVector3::operator/= CVector3    v [inline]
 

vector division operator

CVector3 CVector3::operator/= zfloat    val [inline]
 

Scalar division operator.

Reimplemented in CVectorTex3.

CVector3 CVector3::operator= const CVector3 &    v [inline]
 

= operator

Reimplemented in CVectorTex3.

void CVector3::Set const CVector3 &    v [inline]
 

Sets the x,y,z to the values of v's coordinates.

void CVector3::Set zfloat    valx,
zfloat    valy,
zfloat    valz
[inline]
 

Sets x,y,z to the values of valx, valy, valz.

CVector3 CVector3::SetLenght zfloat    val [inline]
 

Sets the lenght of the vector.


Friends And Related Function Documentation

CVector3 operator * zuint    val,
const CVector3 &    v
[friend]
 

Scalar product (zuint).

CVector3 operator * const CVector3 &    v,
zuint    val
[friend]
 

Scalar product (zuint).

CVector3 operator * zfloat    val,
const CVector3 &    v
[friend]
 

Scalar product (zfloat).

CVector3 operator * const CVector3 &    v,
zfloat    val
[friend]
 

Scalar product (zfloat).

zfloat operator * const CVector3 &    v1,
const CVector3 &    v2
[friend]
 

Dot product operator.

bool operator!= const CVector3 &    v1,
const CVector3 &    v2
[friend]
 

!= operator

CVector3 operator% const CVector3 &    v1,
const CVector3 &    v2
[friend]
 

Cross product operator (see Cross).

CVector3 operator+ const CVector3 &    v1,
const CVector3 &    v2
[friend]
 

+ operator

CVector3 operator- const CVector3 &    v1,
const CVector3 &    v2
[friend]
 

  • operator

CVector3 operator/ zuint    val,
const CVector3 &    v
[friend]
 

Scalar Division (zuint).

CVector3 operator/ const CVector3 &    v,
zuint    val
[friend]
 

Scalar division (zuint).

CVector3 operator/ zfloat    val,
const CVector3 &    v
[friend]
 

Scalar division (zfloat).

CVector3 operator/ const CVector3 &    v,
zfloat    val
[friend]
 

Scalar division (zfloat).

bool operator== const CVector3 &    v1,
const CVector3 &    v2
[friend]
 

== operator


Member Data Documentation

zfloat CVector3::fCoord[3]
 

x,y,z coords


The documentation for this class was generated from the following file:


SourceForge.net Logo