YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
EventTriggerBoundingBoxCollection.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Game/World/Map/Physics/EventTriggerBoundingBoxCollection.hpp
"
2
#include "
YAPOG/Game/World/Map/Physics/CollidableArea.hpp
"
3
#include "
YAPOG/Game/World/Map/Physics/BoundingBox.hpp
"
4
#include "
YAPOG/Game/World/Map/DynamicWorldObject.hpp
"
5
6
namespace
yap
7
{
8
EventTriggerBoundingBoxCollection::EventTriggerBoundingBoxCollection
()
9
:
BoundingBoxCollection
()
10
, parent_ (nullptr)
11
{
12
}
13
14
EventTriggerBoundingBoxCollection::~EventTriggerBoundingBoxCollection
()
15
{
16
}
17
18
EventTriggerBoundingBoxCollection::EventTriggerBoundingBoxCollection
(
19
const
EventTriggerBoundingBoxCollection
& copy)
20
:
BoundingBoxCollection
(copy)
21
, parent_ (nullptr)
22
{
23
for
(
BoundingBox
* boundingBox : copy.
GetBoundingBoxes
())
24
AddEventTriggerBoundingBox
(
new
BoundingBox
(*boundingBox));
25
}
26
27
void
EventTriggerBoundingBoxCollection::AddEventTriggerBoundingBox
(
28
BoundingBox
* boundingBox)
29
{
30
AddBoundingBox
(boundingBox);
31
}
32
33
void
EventTriggerBoundingBoxCollection::RemoveEventTriggerBoundingBox
(
34
BoundingBox
* boundingBox)
35
{
36
RemoveBoundingBox
(boundingBox);
37
}
38
39
void
EventTriggerBoundingBoxCollection::SetCollidableArea
(
40
DynamicWorldObject
& parent,
41
CollidableArea
* collidableArea)
42
{
43
parent_
= &parent;
44
45
BoundingBoxCollection::SetCollidableArea
(collidableArea);
46
}
47
48
void
EventTriggerBoundingBoxCollection::GetEventsCollidingWith
(
49
const
CollidableArea
& collidableArea,
50
MapEventQueue
& events)
const
51
{
52
for
(
const
BoundingBox
* boundingBox :
GetBoundingBoxes
())
53
collidableArea.
GetEventsCollidingWith
(*boundingBox, events, *
parent_
);
54
}
55
56
void
57
EventTriggerBoundingBoxCollection::HandleAddBoundingBoxToCollidableArea
(
58
BoundingBox
* boundingBox)
59
{
60
}
61
62
void
EventTriggerBoundingBoxCollection::
63
HandleRemoveBoundingBoxFromCollidableArea
(
64
BoundingBox
* boundingBox)
65
{
66
}
67
}
// namespace yap
YAPOG
src
YAPOG
Game
World
Map
Physics
EventTriggerBoundingBoxCollection.cpp
Generated on Mon Sep 17 2012 22:24:25 for YAPOG by
1.8.1.1