RenderTracer Class Reference

#include <RenderTracer.h>

Inheritance diagram for RenderTracer:


List of all members.

Public Member Functions

virtual void draw (const unsigned state)
void drawTracerEnd (Vector &position)
void drawSmokeTracer (std::list< TracerLinePoint > &positions)
void newGame ()
void clearTracers ()
void clearTracerLines ()
void addTracer (unsigned int tank, Vector &position)
void addSmokeTracer (unsigned int tank, Vector &position, std::list< TracerLinePoint > &positions)

Static Public Member Functions

static RenderTracerinstance ()

Protected Attributes

std::map< unsigned
int, TraceEntry
GLUquadric * obj_
GLuint listNo_

Static Protected Attributes

static RenderTracerinstance_ = 0

Private Member Functions

 RenderTracer ()
virtual ~RenderTracer ()


class  TraceEntry
struct  TracerLinePoint

Detailed Description

Definition at line 31 of file RenderTracer.h.

Constructor & Destructor Documentation

RenderTracer::RenderTracer (  )  [private]

Definition at line 35 of file RenderTracer.cpp.

References obj_.

RenderTracer::~RenderTracer (  )  [private, virtual]

Definition at line 42 of file RenderTracer.cpp.

References obj_.

Member Function Documentation

RenderTracer * RenderTracer::instance (  )  [static]

Definition at line 29 of file RenderTracer.cpp.

References instance_.

Referenced by ClientNewGameHandler::actualProcessMessage(), TankMenus::clearTracerLines(), ShotProjectile::doCollision(), RenderTargets::Renderer3D::draw(), and MissileActionRenderer::draw().

void RenderTracer::draw ( const unsigned  state  )  [virtual]

Reimplemented from GameStateI.

Definition at line 64 of file RenderTracer.cpp.

References current_, drawSmokeTracer(), drawTracerEnd(), Tank::getColor(), TankContainer::getCurrentTank(), Target::getPlayerId(), ScorchedContext::getTankContainer(), glColor3fv(), ScorchedClient::instance(), RenderTracer::TraceEntry::lines, RenderTracer::TraceEntry::points, RenderTracer::TraceEntry::tank, and traceEntries_.

Referenced by RenderTargets::Renderer3D::draw().

void RenderTracer::drawTracerEnd ( Vector position  ) 

Definition at line 104 of file RenderTracer.cpp.

References GLState::BLEND_OFF, GL_COMPILE_AND_EXECUTE, glCallList(), glEndList(), glGenLists(), glNewList(), glPopMatrix(), glPushMatrix(), glTranslatef(), listNo_, obj_, and GLState::TEXTURE_OFF.

Referenced by draw().

void RenderTracer::drawSmokeTracer ( std::list< TracerLinePoint > &  positions  ) 

Definition at line 123 of file RenderTracer.cpp.

References GLState::BLEND_OFF, GL_QUAD_STRIP, glBegin(), glEnd(), glTexCoord2f(), glVertex3fv(), and GLState::TEXTURE_OFF.

Referenced by draw(), and MissileActionRenderer::draw().

void RenderTracer::newGame (  ) 

Definition at line 184 of file RenderTracer.cpp.

References current_, and traceEntries_.

Referenced by ClientNewGameHandler::actualProcessMessage().

void RenderTracer::clearTracers (  ) 

Definition at line 47 of file RenderTracer.cpp.

References current_, RenderTracer::TraceEntry::lines, and RenderTracer::TraceEntry::points.

void RenderTracer::clearTracerLines (  ) 

Definition at line 56 of file RenderTracer.cpp.

References current_, and RenderTracer::TraceEntry::lines.

Referenced by TankMenus::clearTracerLines().

void RenderTracer::addTracer ( unsigned int  tank,
Vector position 

Definition at line 190 of file RenderTracer.cpp.

References RenderTracer::TraceEntry::points, and traceEntries_.

void RenderTracer::addSmokeTracer ( unsigned int  tank,
Vector position,
std::list< TracerLinePoint > &  positions 

Definition at line 206 of file RenderTracer.cpp.

References RenderTracer::TraceEntry::lines, RenderTracer::TraceEntry::points, and traceEntries_.

Member Data Documentation

RenderTracer * RenderTracer::instance_ = 0 [static, protected]

Definition at line 56 of file RenderTracer.h.

Referenced by instance().

std::map<unsigned int, TraceEntry> RenderTracer::traceEntries_ [protected]

Definition at line 67 of file RenderTracer.h.

Referenced by addSmokeTracer(), addTracer(), draw(), and newGame().

TraceEntry* RenderTracer::current_ [protected]

Definition at line 68 of file RenderTracer.h.

Referenced by clearTracerLines(), clearTracers(), draw(), and newGame().

GLUquadric* RenderTracer::obj_ [protected]

Definition at line 69 of file RenderTracer.h.

Referenced by drawTracerEnd(), RenderTracer(), and ~RenderTracer().

GLuint RenderTracer::listNo_ [protected]

Definition at line 70 of file RenderTracer.h.

Referenced by drawTracerEnd().

The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:05 2009 for Scorched3D by  doxygen 1.5.3