#include <bullet.h>
Inheritance diagram for BULLET:
Public Methods | |
BULLET () | |
~BULLET () | |
void | Reset () |
void | Initialize () |
void | Draw () |
void | Delete () |
Public Attributes | |
int | active |
int | leaf |
int | flag |
int | collisionnode |
int | collisionpoly |
VECTOR | OriginalPosition |
VECTOR | VelocityVector |
VECTOR | CollisionVector |
VECTOR | PreviousPosition |
int | numverts |
VERTEX * | modelvertlist |
int | numpolys |
POLYGON * | modelpolylist |
MATRIX | Matrix |
|
Definition at line 34 of file bullet.cpp.
00035 { 00036 } |
|
Definition at line 38 of file bullet.cpp.
00039 { 00040 } |
|
Definition at line 87 of file bullet.cpp. References modelpolylist, and modelvertlist. Referenced by DeleteBullets().
00088 { 00089 delete[] modelvertlist; 00090 delete[] modelpolylist; 00091 } |
|
Reimplemented from OBJECT. Definition at line 58 of file bullet.cpp. References MATRIX::Element, Matrix, modelpolylist, numpolys, OBJECT::Orientation, OBJECT::Position, MATRIX::QuatToMatrix(), VECTOR::x, VECTOR::y, and VECTOR::z. Referenced by RenderBSP().
00059 { 00060 glPushMatrix(); 00061 glTranslatef(Position.x,Position.y,Position.z); 00062 Matrix.QuatToMatrix(Orientation); 00063 glMultMatrixf(Matrix.Element); 00064 00065 float mat_ambient[] = { 0.3, 0.3, 0.3, 1.0 }; 00066 float mat_diffuse[] = { 0.3, 0.3, 0.3, 1.0 }; 00067 glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); 00068 glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); 00069 00070 glDisable(GL_TEXTURE_2D); 00071 for (int loop = 0; loop < numpolys; loop++) 00072 { 00073 glBegin(GL_TRIANGLES); 00074 glNormal3fv(&modelpolylist[loop].Vertex[0].nx); 00075 glTexCoord2f(modelpolylist[loop].Vertex[0].u, modelpolylist[loop].Vertex[0].v); 00076 glVertex3fv(&modelpolylist[loop].Vertex[0].x); 00077 glTexCoord2f(modelpolylist[loop].Vertex[1].u, modelpolylist[loop].Vertex[1].v); 00078 glVertex3fv(&modelpolylist[loop].Vertex[1].x); 00079 glTexCoord2f(modelpolylist[loop].Vertex[2].u, modelpolylist[loop].Vertex[2].v); 00080 glVertex3fv(&modelpolylist[loop].Vertex[2].x); 00081 glEnd(); 00082 } 00083 glEnable(GL_TEXTURE_2D); 00084 glPopMatrix(); 00085 } |
|
Definition at line 52 of file bullet.cpp. References modelpolylist, modelvertlist, numpolys, and numverts. Referenced by InitializeBullets().
00053 { 00054 modelvertlist = new VERTEX[numverts]; 00055 modelpolylist = new POLYGON[numpolys]; 00056 } |
|
Reimplemented from OBJECT. Definition at line 42 of file bullet.cpp. References OBJECT::Delta_x, OBJECT::Delta_y, OBJECT::Delta_z, MATRIX::LoadIdentity(), Matrix, OBJECT::Orientation, OBJECT::Position, VECTOR::Reset(), and QUAT::Reset().
00043 { 00044 Orientation.Reset(); 00045 Position.Reset(); 00046 Delta_x = 0.0; 00047 Delta_y = 0.0; 00048 Delta_z = 0.0; 00049 Matrix.LoadIdentity(); 00050 } |
|
Definition at line 23 of file bullet.h. Referenced by InitializeBullets(), RenderBSP(), UpdateBullets(), and WinMain(). |
|
Definition at line 26 of file bullet.h. Referenced by UpdateBullets(). |
|
Definition at line 27 of file bullet.h. Referenced by UpdateBullets(). |
|
Definition at line 30 of file bullet.h. Referenced by UpdateBullets(). |
|
Definition at line 25 of file bullet.h. Referenced by UpdateBullets(), and WinMain(). |
|
Definition at line 24 of file bullet.h. Referenced by RenderBSP(), and UpdateBullets(). |
|
|
|
Definition at line 35 of file bullet.h. Referenced by Delete(), Draw(), Initialize(), and InitializeBullets(). |
|
Definition at line 33 of file bullet.h. Referenced by Delete(), and Initialize(). |
|
Definition at line 34 of file bullet.h. Referenced by Draw(), Initialize(), and InitializeBullets(). |
|
Definition at line 32 of file bullet.h. Referenced by Initialize(), and InitializeBullets(). |
|
Definition at line 28 of file bullet.h. Referenced by WinMain(). |
|
Definition at line 31 of file bullet.h. Referenced by UpdateBullets(), and WinMain(). |
|
Definition at line 29 of file bullet.h. Referenced by UpdateBullets(), and WinMain(). |