1 #ifndef PARTICLE_SPACIAL_PARTITIONER_H
2 #define PARTICLE_SPACIAL_PARTITIONER_H
20 static int startUp(GraphicsAPI::GraphicsProgram *graphicsProg);
70 GraphicsAPI::GraphicsProgram *graphics;
84 std::queue<std::pair<QuadTree*, std::pair<Node*, Point>>> queuedMoves;
87 std::queue<Node*> queuedAdds;
objects stored in quadtree
Definition: QuadTree.h:22
void operator=(const ParticleSpacialPartitioner &) = delete
static int nextNodeID
the unique ID of the next node to be spawned maintained by this class and incremented everytime a ne...
Definition: ParticleSpacialPartitioner.h:62
A class to represent QuadTree.
Definition: QuadTree.h:50
static void collideChangeGroupFrom(ParticleGroupHandle *changeTo)
called by collide function class to change the from particle type
Definition: ParticleSpacialPartitioner.cpp:324
static void collideChangeGroupTo(ParticleGroupHandle *changeTo)
called by collide function class to change the To particle type
Definition: ParticleSpacialPartitioner.cpp:317
static void updateChangeGroup(ParticleGroupHandle *changeTo)
called by update function class changeParticle type
Definition: ParticleSpacialPartitioner.cpp:310
static void deleteToParticle()
called by collisionFunction class to delete the FromParticle in a collision
Definition: ParticleSpacialPartitioner.cpp:207
static void deleteFromParticle()
called by collisionFunction class to delete the FromParticle in a collision
Definition: ParticleSpacialPartitioner.cpp:199
static void moveThisParticle(int x, int y)
called by updateFunction class to move a particle while psp is iterating through tree
Definition: ParticleSpacialPartitioner.cpp:221
static void update()
update all particles of the tree
Definition: ParticleSpacialPartitioner.cpp:157
static void draw()
draw the state of the game
Definition: ParticleSpacialPartitioner.cpp:186
static void addParticle(int x, int y, ParticleGroupHandle *groupRef)
Definition: ParticleSpacialPartitioner.cpp:192
static int startUp(GraphicsAPI::GraphicsProgram *graphicsProg)
start up spatial partitioner
Definition: ParticleSpacialPartitioner.cpp:163
A class to maintain the state of the particle game as a series of spacially partitioned QuadTrees...
Definition: ParticleSpacialPartitioner.h:16
static void deleteUpdate()
called by updateFunction class to delete a particle on update
Definition: ParticleSpacialPartitioner.cpp:215
Definition: ParticleGroupHandle.h:29
int m_group
Definition: ParticleSpacialPartitioner.h:12
int y
Definition: ParticleSpacialPartitioner.h:12
int x
Definition: ParticleSpacialPartitioner.h:12
static void moveToParticle(int x, int y)
called by collide function class to move the to particle
Definition: ParticleSpacialPartitioner.cpp:280
Definition: ParticleSpacialPartitioner.h:10
static void moveFromParticle(int x, int y)
called by collide function class to move the from particle
Definition: ParticleSpacialPartitioner.cpp:250