Particle Game Maker Engine  1.0.0
Enables the user to create their own particle game using a simple and coherent api in the PongChamp scripting language
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ParticleSpacialPartitioner Class Reference

A class to maintain the state of the particle game as a series of spacially partitioned QuadTrees. More...

#include <ParticleSpacialPartitioner.h>

Public Member Functions

 ParticleSpacialPartitioner (const ParticleSpacialPartitioner &) = delete
 
void operator= (const ParticleSpacialPartitioner &) = delete
 

Static Public Member Functions

static int startUp (GraphicsAPI::GraphicsProgram *graphicsProg)
 start up spatial partitioner More...
 
static void addParticle (int x, int y, ParticleGroupHandle *groupRef)
 
static void draw ()
 draw the state of the game More...
 
static void update ()
 update all particles of the tree More...
 
static void deleteFromParticle ()
 called by collisionFunction class to delete the FromParticle in a collision More...
 
static void deleteToParticle ()
 called by collisionFunction class to delete the FromParticle in a collision More...
 
static void deleteUpdate ()
 called by updateFunction class to delete a particle on update More...
 
static void moveThisParticle (int x, int y)
 called by updateFunction class to move a particle while psp is iterating through tree More...
 
static void moveFromParticle (int x, int y)
 called by collide function class to move the from particle More...
 
static void moveToParticle (int x, int y)
 called by collide function class to move the to particle More...
 
static void updateChangeGroup (ParticleGroupHandle *changeTo)
 called by update function class changeParticle type More...
 
static void collideChangeGroupTo (ParticleGroupHandle *changeTo)
 called by collide function class to change the To particle type More...
 
static void collideChangeGroupFrom (ParticleGroupHandle *changeTo)
 called by collide function class to change the from particle type More...
 

Static Public Attributes

static int nextNodeID = 0
 the unique ID of the next node to be spawned maintained by this class and incremented everytime a new node is added More...
 

Detailed Description

A class to maintain the state of the particle game as a series of spacially partitioned QuadTrees.

Constructor & Destructor Documentation

ParticleSpacialPartitioner::ParticleSpacialPartitioner ( const ParticleSpacialPartitioner &  )
delete

Member Function Documentation

void ParticleSpacialPartitioner::addParticle ( int  x,
int  y,
ParticleGroupHandle handle 
)
static

Add a particle of type group to spatial partitioner TODO: maybe batch this internally

void ParticleSpacialPartitioner::collideChangeGroupFrom ( ParticleGroupHandle changeTo)
static

called by collide function class to change the from particle type

void ParticleSpacialPartitioner::collideChangeGroupTo ( ParticleGroupHandle changeTo)
static

called by collide function class to change the To particle type

void ParticleSpacialPartitioner::deleteFromParticle ( )
static

called by collisionFunction class to delete the FromParticle in a collision

void ParticleSpacialPartitioner::deleteToParticle ( )
static

called by collisionFunction class to delete the FromParticle in a collision

void ParticleSpacialPartitioner::deleteUpdate ( )
static

called by updateFunction class to delete a particle on update

void ParticleSpacialPartitioner::draw ( )
static

draw the state of the game

void ParticleSpacialPartitioner::moveFromParticle ( int  x,
int  y 
)
static

called by collide function class to move the from particle

void ParticleSpacialPartitioner::moveThisParticle ( int  x,
int  y 
)
static

called by updateFunction class to move a particle while psp is iterating through tree

void ParticleSpacialPartitioner::moveToParticle ( int  x,
int  y 
)
static

called by collide function class to move the to particle

void ParticleSpacialPartitioner::operator= ( const ParticleSpacialPartitioner &  )
delete
int ParticleSpacialPartitioner::startUp ( GraphicsAPI::GraphicsProgram *  graphicsProg)
static

start up spatial partitioner

void ParticleSpacialPartitioner::update ( )
static

update all particles of the tree

void ParticleSpacialPartitioner::updateChangeGroup ( ParticleGroupHandle changeTo)
static

called by update function class changeParticle type

Member Data Documentation

int ParticleSpacialPartitioner::nextNodeID = 0
static

the unique ID of the next node to be spawned maintained by this class and incremented everytime a new node is added


The documentation for this class was generated from the following files: