TDME2 1.9.121
Partition.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include <tdme/tdme.h>
7
8using std::vector;
9
12
13/**
14 * Partition interface
15 * @author Andreas Drewke
16 * @version $Id$
17 */
19{
20 /**
21 * Destructor
22 */
23 virtual ~Partition() {}
24
25 /**
26 * Reset
27 */
28 virtual void reset() = 0;
29
30 /**
31 * Adds a entity
32 * @param entity entity
33 */
34 virtual void addEntity(Entity* entity) = 0;
35
36 /**
37 * Updates a entity
38 * @param entity entity
39 */
40 virtual void updateEntity(Entity* entity) = 0;
41
42 /**
43 * Removes a entity
44 * @param entity entity
45 */
46 virtual void removeEntity(Entity* entity) = 0;
47
48 /**
49 * Get visible entities
50 * @param frustum frustum
51 * @return visible entities
52 */
53 virtual const vector<Entity*>& getVisibleEntities(Frustum* frustum) = 0;
54
55 /**
56 * Check if entity is visible
57 * @param frustum frustum
58 * @param entity entity
59 * @return if entity has been determined to be visible by last getVisibleEntities() call
60 */
61 virtual bool isVisibleEntity(Entity* entity) = 0;
62
63};
TDME engine entity.
Definition: Entity.h:31
Frustum class.
Definition: Frustum.h:30
Partition interface.
Definition: Partition.h:19
virtual bool isVisibleEntity(Entity *entity)=0
Check if entity is visible.
virtual void updateEntity(Entity *entity)=0
Updates a entity.
virtual ~Partition()
Destructor.
Definition: Partition.h:23
virtual void reset()=0
Reset.
virtual const vector< Entity * > & getVisibleEntities(Frustum *frustum)=0
Get visible entities.
virtual void addEntity(Entity *entity)=0
Adds a entity.
virtual void removeEntity(Entity *entity)=0
Removes a entity.