GLCameraFrustum Class Reference

#include <GLCameraFrustum.h>

Inheritance diagram for GLCameraFrustum:

GameStateI

List of all members.

Public Member Functions

virtual void draw (const unsigned state)
bool sphereInFrustum (Vector &point, float fRadius=1, Vector &color=FrustrumWhite)
bool sphereInFrustumThreadSafe (Vector &point, float fRadius)
void backupFrustum ()
void restoreFrustum ()
void drawBilboard (Vector &position, Vector &color, float alpha, float width, float height, bool additive, int texCoord)
VectorgetBilboardVectorX ()
VectorgetBilboardVectorY ()
float * getViewMatrix ()

Static Public Member Functions

static GLCameraFrustuminstance ()

Static Public Attributes

static Vector FrustrumRed
static Vector FrustrumBlue
static Vector FrustrumGreen
static Vector FrustrumWhite

Protected Member Functions

void normalize (float vector[4])

Protected Attributes

struct
GLCameraFrustum::Settings 
s
struct
GLCameraFrustum::Settings 
b

Static Protected Attributes

static GLCameraFrustuminstance_ = 0

Private Member Functions

 GLCameraFrustum ()
virtual ~GLCameraFrustum ()

Classes

struct  Settings


Detailed Description

Definition at line 27 of file GLCameraFrustum.h.


Constructor & Destructor Documentation

GLCameraFrustum::GLCameraFrustum (  )  [private]

Definition at line 43 of file GLCameraFrustum.cpp.

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

Definition at line 49 of file GLCameraFrustum.cpp.


Member Function Documentation

GLCameraFrustum * GLCameraFrustum::instance (  )  [static]

Definition at line 33 of file GLCameraFrustum.cpp.

References instance_.

Referenced by ClientState::addStandardComponents(), VisibilityPatchQuad::calculateVisibility(), TextActionRenderer::draw(), MissileActionRenderer::draw(), Sun::draw(), GLLenseFlare::draw(), TargetRendererImplTank::drawArrow(), AnimatedBackdropDialog::drawBackground(), TargetRendererImplTank::drawInfo(), CameraDialog::drawLandscape(), GLFont2d::drawLetter(), TargetRendererImplTank::drawLife(), Landscape::drawShadows(), TargetRendererImpl::drawShield(), ParticleRendererQuads::renderParticle(), and TargetRendererImplTarget::renderShadow().

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

Reimplemented from GameStateI.

Definition at line 89 of file GLCameraFrustum.cpp.

References GLCameraFrustum::Settings::aspect, GLCameraFrustum::Settings::fClip, GLCameraFrustum::Settings::fProj, GLCameraFrustum::Settings::frustum_, GLCameraFrustum::Settings::fView, GL_MODELVIEW_MATRIX, GL_PROJECTION_MATRIX, GL_VIEWPORT, glGetFloatv(), normalize(), s, and GLCameraFrustum::Settings::viewport.

Referenced by AnimatedBackdropDialog::drawBackground(), CameraDialog::drawLandscape(), and Landscape::drawShadows().

bool GLCameraFrustum::sphereInFrustum ( Vector point,
float  fRadius = 1,
Vector color = FrustrumWhite 
)

Definition at line 162 of file GLCameraFrustum.cpp.

References glColor3fv(), glPopMatrix(), glPushMatrix(), glTranslatef(), OptionsDisplay::instance(), sphereInFrustumThreadSafe(), and GLState::TEXTURE_OFF.

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

bool GLCameraFrustum::sphereInFrustumThreadSafe ( Vector point,
float  fRadius 
)

Definition at line 185 of file GLCameraFrustum.cpp.

References GLCameraFrustum::Settings::frustum_, and s.

Referenced by sphereInFrustum().

void GLCameraFrustum::backupFrustum (  ) 

Definition at line 203 of file GLCameraFrustum.cpp.

References b, and s.

void GLCameraFrustum::restoreFrustum (  ) 

Definition at line 208 of file GLCameraFrustum.cpp.

References b, and s.

void GLCameraFrustum::drawBilboard ( Vector position,
Vector color,
float  alpha,
float  width,
float  height,
bool  additive,
int  texCoord 
)

Definition at line 213 of file GLCameraFrustum.cpp.

References getBilboardVectorX(), getBilboardVectorY(), GL_ONE, GL_ONE_MINUS_SRC_ALPHA, GL_QUADS, GL_SRC_ALPHA, glBegin(), glBlendFunc(), glColor4f(), glEnd(), glTexCoord2d(), and glVertex3f().

Referenced by Sun::draw(), TargetRendererImplTank::drawInfo(), TargetRendererImpl::drawShield(), and ParticleRendererQuads::renderParticle().

Vector & GLCameraFrustum::getBilboardVectorX (  ) 

Definition at line 67 of file GLCameraFrustum.cpp.

References GLCameraFrustum::Settings::aspect, GLCameraFrustum::Settings::fClip, and s.

Referenced by TargetRendererImplTank::drawArrow(), drawBilboard(), TargetRendererImplTank::drawInfo(), GLFont2d::drawLetter(), and TargetRendererImplTank::drawLife().

Vector & GLCameraFrustum::getBilboardVectorY (  ) 

Definition at line 78 of file GLCameraFrustum.cpp.

References GLCameraFrustum::Settings::fClip, and s.

Referenced by drawBilboard(), and GLFont2d::drawLetter().

float* GLCameraFrustum::getViewMatrix (  )  [inline]

Definition at line 50 of file GLCameraFrustum.h.

References GLCameraFrustum::Settings::fView, and s.

void GLCameraFrustum::normalize ( float  vector[4]  )  [protected]

Definition at line 54 of file GLCameraFrustum.cpp.

Referenced by draw().


Member Data Documentation

Vector GLCameraFrustum::FrustrumRed [static]

Definition at line 32 of file GLCameraFrustum.h.

Referenced by TargetRendererImplTarget::renderShadow().

Vector GLCameraFrustum::FrustrumBlue [static]

Definition at line 33 of file GLCameraFrustum.h.

Vector GLCameraFrustum::FrustrumGreen [static]

Definition at line 34 of file GLCameraFrustum.h.

Vector GLCameraFrustum::FrustrumWhite [static]

Definition at line 35 of file GLCameraFrustum.h.

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

Definition at line 53 of file GLCameraFrustum.h.

Referenced by instance().

struct GLCameraFrustum::Settings GLCameraFrustum::s [protected]

Referenced by backupFrustum(), draw(), getBilboardVectorX(), getBilboardVectorY(), getViewMatrix(), restoreFrustum(), and sphereInFrustumThreadSafe().

struct GLCameraFrustum::Settings GLCameraFrustum::b [protected]

Referenced by backupFrustum(), and restoreFrustum().


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