eDebugLine Class Reference

#include <eDebugLine.h>

List of all members.

Static Public Member Functions

static void Update (REAL ts)
static void Render ()
static void SetColor (REAL r, REAL g, REAL b)
static void SetTimeout (REAL time)
static void ResetOptions ()
static void Draw (const eCoord &start, REAL startH, const eCoord &stop, REAL stopH)


Detailed Description

Definition at line 33 of file eDebugLine.h.


Member Function Documentation

void eDebugLine::Update ( REAL  ts  )  [static]

Definition at line 83 of file eDebugLine.cpp.

References eLineEntry::Delete(), GrowingArrayBase::Len(), se_lines, and eLineEntry::timeout.

Referenced by eCamera::s_Timestep().

00084 {
00085     for (int i = se_lines.Len()-1; i>=0; i--)
00086     {
00087         eLineEntry& entry = se_lines(i);
00088         entry.timeout -= ts;
00089         if (entry.timeout < 0)
00090             entry.Delete();
00091     }
00092 }

Here is the call graph for this function:

Here is the caller graph for this function:

void eDebugLine::Render (  )  [static]

Definition at line 95 of file eDebugLine.cpp.

References eLineEntry::b, BeginLines(), Color(), eLineEntry::g, GrowingArrayBase::Len(), eLineEntry::r, RenderEnd(), se_lines, eLineEntry::start, eLineEntry::startH, eLineEntry::stop, eLineEntry::stopH, and Vertex().

Referenced by eGrid::display_simple().

00096 {
00097 #ifndef DEDICATED
00098 #ifdef DEBUGLINE
00099     glDisable(GL_TEXTURE_2D);
00100     glDisable(GL_LIGHTING);
00101     BeginLines();
00102     for (int i = se_lines.Len()-1; i>=0; i--)
00103     {
00104         eLineEntry& entry = se_lines(i);
00105         Color(entry.r, entry.g, entry.b);
00106         Vertex(entry.start.x, entry.start.y, entry.startH);
00107         Vertex(entry.stop.x,  entry.stop.y,  entry.stopH);
00108     }
00109     RenderEnd();
00110 #endif
00111 #endif
00112 }

Here is the call graph for this function:

Here is the caller graph for this function:

void eDebugLine::SetColor ( REAL  r,
REAL  g,
REAL  b 
) [static]

Definition at line 114 of file eDebugLine.cpp.

References se_b, se_g, and se_r.

Referenced by eSensor::detect(), eCameraSensor::eCameraSensor(), gAIPlayer::EmergencySurvive(), gAISensor::gAISensor(), gCycle::SyncEnemy(), and gAIPlayer::Think().

00115 {
00116     se_r = r;
00117     se_g = g;
00118     se_b = b;
00119 }

Here is the caller graph for this function:

void eDebugLine::SetTimeout ( REAL  time  )  [static]

Definition at line 121 of file eDebugLine.cpp.

References se_timeout.

Referenced by eCameraSensor::eCameraSensor(), gAIPlayer::EmergencySurvive(), gAISensor::gAISensor(), gCycle::SyncEnemy(), and gAIPlayer::Think().

00122 {
00123     se_timeout = time;
00124 }

Here is the caller graph for this function:

void eDebugLine::ResetOptions (  )  [static]

Definition at line 126 of file eDebugLine.cpp.

References se_b, se_g, se_r, and se_timeout.

00127 {
00128     se_r = 1;
00129     se_g = 1;
00130     se_b = 1;
00131     se_timeout = .1f;
00132 }

void eDebugLine::Draw ( const eCoord &  start,
REAL  startH,
const eCoord &  stop,
REAL  stopH 
) [static]

Definition at line 134 of file eDebugLine.cpp.

References eLineEntry::Create(), eLineEntry::start, eLineEntry::startH, eLineEntry::stop, and eLineEntry::stopH.

Referenced by eSensor::detect(), eCameraSensor::eCameraSensor(), gAIPlayer::EmergencySurvive(), gAISensor::gAISensor(), gCycle::SyncEnemy(), and gAIPlayer::Think().

00136 {
00137 #ifdef DEBUGLINE
00138     eLineEntry& line = eLineEntry::Create();
00139     line.start  = start;
00140     line.startH = startH;
00141     line.stop   = stop;
00142     line.stopH  = stopH;
00143 #endif
00144 }

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:22:15 2008 for Armagetron Advanced by  doxygen 1.5.4