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

ParticleRendererGL Class Reference

#include <ParticleRendererGL.h>

Inheritance diagram for ParticleRendererGL:

Inheritance graph
[legend]
Collaboration diagram for ParticleRendererGL:

Collaboration graph
[legend]
List of all members.

Detailed Description

Renders particles using the OpenGL API.

Definition at line 16 of file ParticleRendererGL.h.

Public Member Functions

 ParticleRendererGL ()
void drawDisk (gmVector3 x, gmVector3 n, double r)
 Draws an oriented disk.

void drawCylinder (gmVector3 x, gmVector3 n, double r)
 Draws an oriented cylinder.

void drawLine (gmVector3 x, gmVector3 n, gmVector3 x2, gmVector3 n2, double r)
 Draws a line.

void drawPoint (gmVector3 x, gmVector3 n, double r)
 Draws a point.

virtual void render (Particles *ps, bool displayLinks=false)
 Draws particles.


Protected Attributes

int num_tris
 Number of triangles to use in a disc.

double * sin_table
 Table of sin values.

double * cos_table
 Table of cos values.


Constructor & Destructor Documentation

ParticleRendererGL::ParticleRendererGL  ) 
 

Definition at line 20 of file ParticleRendererGL.cpp.

References cos_table, M_PI, num_tris, and sin_table.


Member Function Documentation

void ParticleRendererGL::drawCylinder gmVector3  x,
gmVector3  n,
double  r
 

Draws an oriented cylinder.

Parameters:
x Position.
n Normal.
r Radius.

Definition at line 85 of file ParticleRendererGL.cpp.

Referenced by render().

void ParticleRendererGL::drawDisk gmVector3  x,
gmVector3  n,
double  r
 

Draws an oriented disk.

Parameters:
x Position of disk.
n Normal of disk.
r Radius of disk.

Definition at line 45 of file ParticleRendererGL.cpp.

References cos_table, num_tris, randOrtho(), and sin_table.

Referenced by render().

void ParticleRendererGL::drawLine gmVector3  x,
gmVector3  n,
gmVector3  x2,
gmVector3  n2,
double  r
 

Draws a line.

Parameters:
x One line end
n Normal for that end
x2 The other line end
n2 Normal for the second line end.
r The width of the line.

Definition at line 118 of file ParticleRendererGL.cpp.

Referenced by render().

void ParticleRendererGL::drawPoint gmVector3  x,
gmVector3  n,
double  r
 

Draws a point.

Parameters:
x Position of point
n Normal of point
r Radius of point

Definition at line 140 of file ParticleRendererGL.cpp.

void ParticleRendererGL::render Particles ps,
bool  displayLinks = false
[virtual]
 

Draws particles.

Parameters:
ps Particle system to render.
displayLinks Do we draw the links connecting the particles to the other particles that are repelling them?

Implements ParticleRenderer.

Definition at line 162 of file ParticleRendererGL.cpp.

References ParticleRenderer::adhesion, Particles::attributes, Particles::behaviors, ParticleRenderer::chain, ParticleRenderer::deform, drawCylinder(), drawDisk(), drawLine(), Particles::getAttribute(), ParticleLocality::getNeighbors(), SurfaceAdhesion::getOrientation(), SurfaceDeformation::getOrientation(), ParticlePosition::getPosition(), ParticleRepulsion::getRepulsionData(), ParticleOrientation::n, ParticleRenderer::orient, AdaptiveRepulsionData::r, ParticleRenderer::radius, ParticleRenderer::repulsion, and Particles::size().


Member Data Documentation

double* ParticleRendererGL::cos_table [protected]
 

Table of cos values.

Definition at line 21 of file ParticleRendererGL.h.

Referenced by drawDisk(), and ParticleRendererGL().

int ParticleRendererGL::num_tris [protected]
 

Number of triangles to use in a disc.

Definition at line 19 of file ParticleRendererGL.h.

Referenced by drawDisk(), and ParticleRendererGL().

double* ParticleRendererGL::sin_table [protected]
 

Table of sin values.

Definition at line 20 of file ParticleRendererGL.h.

Referenced by drawDisk(), and ParticleRendererGL().


The documentation for this class was generated from the following files:
Generated on Mon Jun 28 15:02:47 2004 for Advanced Surface Library by doxygen 1.3.4