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

pstools.h File Reference


Detailed Description

Declaration of particle system helper functions.

Date:
June 12, 2001
Author:
Hans Pedersen
Remarks:
Adapted for use with the Advanced Surface Library by Ed Bachta

Definition in file pstools.h.

#include "libgm/gm.h"

Include dependency graph for pstools.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define SET_FLAG   1
#define NOT_SET_FLAG   0

Functions

double fastExp (double)
 Fast approximation to exp.

double psRandom (void)
 Random number generator.

void clampInt (int &x, int max)
 Clamps x to [0,max-1].

gmVector3 randOrtho (gmVector3 x)
 Generates a radom orthogonal vector.


Define Documentation

#define NOT_SET_FLAG   0
 

Definition at line 15 of file pstools.h.

#define SET_FLAG   1
 

Definition at line 14 of file pstools.h.


Function Documentation

void clampInt int &  x,
int  max
 

Clamps x to [0,max-1].

Parameters:
x Value to clamp.
max Maximum value to clamp to.

Definition at line 29 of file pstools.cpp.

Referenced by ParticleLocalityGrid::findCell().

double fastExp double  arg  ) 
 

Fast approximation to exp.

Parameters:
arg power to raise e to.
Returns:
e^arg.

Definition at line 72 of file pstools.cpp.

Referenced by ParticleRepulsion::applyForce(), and SingularityRepulsion::repelTarget().

double psRandom void   ) 
 

Random number generator.

Returns:
The random number.

Definition at line 18 of file pstools.cpp.

Referenced by ParticleFate::cleanup(), and SilhouetteFate::cleanup().

gmVector3 randOrtho gmVector3  x  ) 
 

Generates a radom orthogonal vector.

Parameters:
x A vector.
Returns:
A vector orthogonal to x.

Definition at line 43 of file pstools.cpp.

Referenced by SilhouetteFate::cleanup(), ParticleFate::cleanup(), and ParticleRendererGL::drawDisk().


Generated on Mon Jun 28 15:01:05 2004 for Advanced Surface Library by doxygen 1.3.4