HOG2
utils
ScenarioLoader.h
Go to the documentation of this file.
1
/*
2
* scenarioLoader.h
3
* hog
4
*
5
* Created by Renee Jansen on 5/2/2006
6
*
7
*/
8
9
#ifndef SCENARIOLOADER_H
10
#define SCENARIOLOADER_H
11
12
#include <vector>
13
#include <cstring>
14
#include <string>
15
using
std::string;
16
17
static
const
int
kNoScaling
= -1;
18
22
class
ScenarioLoader
;
23
24
class
Experiment
{
25
public
:
26
Experiment
(
int
sx,
int
sy,
int
gx,
int
gy,
int
b,
double
d
,
string
m)
27
:
startx
(sx),
starty
(sy),
goalx
(gx),
goaly
(gy),
scaleX
(
kNoScaling
),
scaleY
(
kNoScaling
),
bucket
(b),
distance
(
d
),
map
(m){}
28
Experiment
(
int
sx,
int
sy,
int
gx,
int
gy,
int
sizeX,
int
sizeY,
int
b,
double
d
,
string
m)
29
:
startx
(sx),
starty
(sy),
goalx
(gx),
goaly
(gy),
scaleX
(sizeX),
scaleY
(sizeY),
bucket
(b),
distance
(
d
),
map
(m){}
30
int
GetStartX
()
const
{
return
startx
;}
31
int
GetStartY
()
const
{
return
starty
;}
32
int
GetGoalX
()
const
{
return
goalx
;}
33
int
GetGoalY
()
const
{
return
goaly
;}
34
int
GetBucket
()
const
{
return
bucket
;}
35
double
GetDistance
()
const
{
return
distance
;}
36
void
GetMapName
(
char
* mymap)
const
{strcpy(mymap,
map
.c_str());}
37
const
char
*
GetMapName
()
const
{
return
map
.c_str(); }
38
int
GetXScale
()
const
{
return
scaleX
;}
39
int
GetYScale
()
const
{
return
scaleY
;}
40
41
private
:
42
friend
class
ScenarioLoader
;
43
int
startx
,
starty
,
goalx
,
goaly
;
44
int
scaleX
;
45
int
scaleY
;
46
int
bucket
;
47
double
distance
;
48
string
map
;
49
};
50
55
class
ScenarioLoader
{
56
public
:
57
ScenarioLoader
() {
scenName
[0] = 0; }
58
ScenarioLoader
(
const
char
*);
59
void
Save
(
const
char
*);
60
int
GetNumExperiments
(){
return
experiments
.size();}
61
const
char
*
GetScenarioName
() {
return
scenName
; }
62
Experiment
GetNthExperiment
(
int
which)
63
{
return
experiments
[which];}
64
void
AddExperiment
(
Experiment
which);
65
private
:
66
char
scenName
[1024];
67
std::vector<Experiment>
experiments
;
68
};
69
70
#endif
ScenarioLoader::Save
void Save(const char *)
Definition:
ScenarioLoader.cpp:62
ScenarioLoader::AddExperiment
void AddExperiment(Experiment which)
Definition:
ScenarioLoader.cpp:79
Experiment::GetDistance
double GetDistance() const
Definition:
ScenarioLoader.h:35
Experiment::goaly
int goaly
Definition:
ScenarioLoader.h:43
Experiment::bucket
int bucket
Definition:
ScenarioLoader.h:46
ScenarioLoader
A class which loads and stores scenarios from files.
Definition:
ScenarioLoader.h:55
Experiment::GetYScale
int GetYScale() const
Definition:
ScenarioLoader.h:39
ScenarioLoader::GetNumExperiments
int GetNumExperiments()
Definition:
ScenarioLoader.h:60
d
mcData d[]
Definition:
MotionCaptureMovement.cpp:21
Experiment::GetMapName
void GetMapName(char *mymap) const
Definition:
ScenarioLoader.h:36
Experiment::GetGoalY
int GetGoalY() const
Definition:
ScenarioLoader.h:33
ScenarioLoader::ScenarioLoader
ScenarioLoader()
Definition:
ScenarioLoader.h:57
Experiment::GetGoalX
int GetGoalX() const
Definition:
ScenarioLoader.h:32
kNoScaling
static const int kNoScaling
Definition:
ScenarioLoader.h:17
ScenarioLoader::GetScenarioName
const char * GetScenarioName()
Definition:
ScenarioLoader.h:61
ScenarioLoader::GetNthExperiment
Experiment GetNthExperiment(int which)
Definition:
ScenarioLoader.h:62
Experiment::Experiment
Experiment(int sx, int sy, int gx, int gy, int b, double d, string m)
Definition:
ScenarioLoader.h:26
Experiment::scaleX
int scaleX
Definition:
ScenarioLoader.h:44
Experiment::GetStartX
int GetStartX() const
Definition:
ScenarioLoader.h:30
Experiment::scaleY
int scaleY
Definition:
ScenarioLoader.h:45
Experiment::goalx
int goalx
Definition:
ScenarioLoader.h:43
Experiment::GetBucket
int GetBucket() const
Definition:
ScenarioLoader.h:34
Experiment
Definition:
ScenarioLoader.h:24
ScenarioLoader::scenName
char scenName[1024]
Definition:
ScenarioLoader.h:66
Experiment::map
string map
Definition:
ScenarioLoader.h:48
Experiment::GetStartY
int GetStartY() const
Definition:
ScenarioLoader.h:31
Experiment::GetXScale
int GetXScale() const
Definition:
ScenarioLoader.h:38
Experiment::GetMapName
const char * GetMapName() const
Definition:
ScenarioLoader.h:37
Experiment::starty
int starty
Definition:
ScenarioLoader.h:43
Experiment::distance
double distance
Definition:
ScenarioLoader.h:47
Experiment::startx
int startx
Definition:
ScenarioLoader.h:43
ScenarioLoader::experiments
std::vector< Experiment > experiments
Definition:
ScenarioLoader.h:67
Experiment::Experiment
Experiment(int sx, int sy, int gx, int gy, int sizeX, int sizeY, int b, double d, string m)
Definition:
ScenarioLoader.h:28
Generated by
1.8.17