Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

gameobjs.cpp File Reference


Detailed Description

Implementation of all the in-game objects that may or may not be kept.

#include <cstring>
#include <iostream>
#include <cstdlib>
#include <GL/gl.h>
#include <GL/glu.h>
#include "gameobjs.h"

Include dependency graph for gameobjs.cpp:

Include dependency graph

Functions

void getnormals (vector< Vec4 > &vin, vector< tritype > &tin, vector< Vec4 > *nin)
 Given a triangle, find its normal.

Variables

vector< ShipExhaust * > exhaustlist
 The global list of exhaust particles in the system.
vector< ShipBullet * > bulletlist
 The global list of all projectiles in the system.
float exhaustcol [12][3]
 The many possible colours for the exhaust.
float newexhaustcol [12][3]
 Nick wants "realistic" colours.

Function Documentation

void getnormals vector< Vec4 > &  vin,
vector< tritype > &  tin,
vector< Vec4 > *  nin
 

Given a triangle, find its normal.

Rather than calculate my own normals, give this function a vector of points that make up lists of triangles in their correct winding. Normals are then calculated for me. And normalised.

Parameters:
vin List of points.
tin List of triangles as indices of vin.
nin Where to put the normals.
Returns:
Does not return.

Here is the call graph for this function:


Variable Documentation

vector<ShipBullet *> bulletlist
 

The global list of all projectiles in the system.

List of lists.

float exhaustcol[12][3]
 

Initial value:

{
    { 1.0f,  0.5f,  0.5f},
    { 1.0f,  0.75f, 0.5f},
    { 1.0f,  1.0f,  0.5f},
    { 0.75f, 1.0f,  0.5f},
    { 0.5f,  1.0f,  0.5f},
    { 0.5f,  1.0f,  0.75f},
    { 0.5f,  1.0f,  1.0f},
    { 0.5f,  0.75f, 1.0f},
    { 0.5f,  0.5f,  1.0f},
    { 0.75f, 0.5f,  1.0f},
    { 1.0f,  0.5f,  1.0f},
    { 1.0f,  0.5f,  0.75f}
}
The many possible colours for the exhaust.

Crazy colours.

vector<ShipExhaust *> exhaustlist
 

The global list of exhaust particles in the system.

List of lists.

float newexhaustcol[12][3]
 

Initial value:

{
    { 1.0f, 1.0f, 0.0f},
    { 1.0f, 0.75f,0.0f},
    { 1.0f, 1.0f, 0.5f},
    { 0.75f,1.0f, 0.5f},
    { 0.9f, 0.9f, 0.9f},
    { 1.0f, 1.0f, 1.0f},
    { 0.5f, 0.5f, 0.5f},
    { 0.8f, 0.8f, 0.8f},
    { 0.5f, 0.5f, 0.5f},
    { 0.7f, 0.7f, 0.7f},
    { 1.0f, 1.0f, 1.0f},
    { 0.9f, 0.9f, 0.9f}
}
Nick wants "realistic" colours.

Top third is flamey, bottom two is smoke.


Generated on Mon Jan 3 15:14:19 2005 for Graviton by  doxygen 1.3.9.1