Vec3 Class Reference

#include <rModel.h>

List of all members.

Public Member Functions

 Vec3 (REAL a=0, REAL b=0, REAL c=0)
 ~Vec3 ()
REAL Norm ()
Vec3 operator * (REAL y)
void operator+= (const Vec3 &y)
void RenderVertex ()
void RenderNormal ()

Public Attributes

float x [3]


Detailed Description

Definition at line 38 of file rModel.h.


Constructor & Destructor Documentation

Vec3::Vec3 ( REAL  a = 0,
REAL  b = 0,
REAL  c = 0 
) [inline]

Definition at line 41 of file rModel.h.

References a, b, c, and x.

Referenced by operator *().

00041 {x[0]=a;x[1]=b;x[2]=c;}

Here is the caller graph for this function:

Vec3::~Vec3 (  )  [inline]

Definition at line 42 of file rModel.h.

00042 {};


Member Function Documentation

REAL Vec3::Norm (  )  [inline]

Definition at line 44 of file rModel.h.

References REAL, sqrt(), and x.

Referenced by gSpark::gSpark(), and rModel::Load().

00044 {return REAL(sqrt(x[0]*x[0]+x[1]*x[1]+x[2]*x[2]));}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec3 Vec3::operator * ( REAL  y  )  [inline]

Definition at line 46 of file rModel.h.

References Vec3(), and x.

00046 {return Vec3(x[0]*y,x[1]*y,x[2]*y);}

Here is the call graph for this function:

void Vec3::operator+= ( const Vec3 y  )  [inline]

Definition at line 47 of file rModel.h.

References x.

00047 {x[0]+=y.x[0];x[1]+=y.x[1];x[2]+=y.x[2];}

void Vec3::RenderVertex (  ) 

Definition at line 46 of file rModel.cpp.

References x.

Referenced by gSpark::Render().

00046                        {
00047     glVertex3f(x[0],x[1],x[2]);
00048 }

Here is the caller graph for this function:

void Vec3::RenderNormal (  ) 

Definition at line 50 of file rModel.cpp.

References x.

00050                        {
00051     glNormal3f(x[0],x[1],x[2]);
00052 }


Member Data Documentation

float Vec3::x[3]

Definition at line 40 of file rModel.h.

Referenced by gSpark::gSpark(), rModel::Load(), Norm(), operator *(), operator+=(), RenderNormal(), RenderVertex(), gSpark::Timestep(), and Vec3().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:01:29 2008 for Armagetron Advanced by  doxygen 1.5.4