Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Kodu::KoduWorld Class Reference

#include <KoduWorld.h>


Detailed Description

Definition at line 24 of file KoduWorld.h.

List of all members.

Public Member Functions

 KoduWorld ()
 Constructor.
 ~KoduWorld ()
 Destructor.
void applyGlobalScoreChanges (std::queue< ScoreChange > &)
int getTagIdForShape (int)
bool shapeTagPairExists (int) const
 Checks if a shapt-tag pair exists.
void pairShapeWithTag (int, int)
 Pairs an april tag with a particular shape.
const Point & getNorthStarLocation () const
const std::map< int, Point > & getStarConstellation () const
 Returns the "stars" seen and their location.
const Shape< PolygonData > & getWorldBoundsPolygon () const
 Returns the world bounds polygon.
void generateWorldBoundsPolygon ()
 Creates the world bounds polygon.
void setStarConstellation (const std::vector< ShapeRoot > &)
 Sets the "stars" seen and their allocentric locations.

Static Public Member Functions

static int getScoreValue (const std::string &)
 Returns the value of a particular score (identified by the designator).

Public Attributes

KoduAgent thisAgent
 Represents the agent that the Kodu Behavior is running on.

Private Member Functions

 DISALLOW_COPY_ASSIGN (KoduWorld)
 Disallows the copy constructor and assignment operator.

Private Attributes

std::map< int, int > shapeToTagMap
 Helps the robot discern between multiple objects of same type and color when near them.
std::map< int, Point > starConstellation
 A map of the april tag (used as stars) and their allocentric positions.
Shape< PolygonData > worldBoundsPolygon
 The world bounds polygon.
const float worldSideLength
 The length of the world's sides; all sides are the same length making the world a square.

Static Private Attributes

static ScoreKeeper globalScoreKeeper
 Local copy of the Score Keeper.

Constructor & Destructor Documentation

Kodu::KoduWorld::KoduWorld (  ) 

Constructor.

Definition at line 16 of file KoduWorld.cc.

Kodu::KoduWorld::~KoduWorld (  ) 

Destructor.

Definition at line 25 of file KoduWorld.cc.


Member Function Documentation

void Kodu::KoduWorld::applyGlobalScoreChanges ( std::queue< ScoreChange > &  queue  ) 

================================ Scoring functions ================================ /// Applies the scores changes to the global score keeper

Definition at line 30 of file KoduWorld.cc.

Referenced by KoduInterpreter::ScoreActuator::doStart().

Kodu::KoduWorld::DISALLOW_COPY_ASSIGN ( KoduWorld   )  [private]

Disallows the copy constructor and assignment operator.

void Kodu::KoduWorld::generateWorldBoundsPolygon (  ) 

Creates the world bounds polygon.

Definition at line 93 of file KoduWorld.cc.

Referenced by KoduInterpreter::InitializeAgent::OrganizeWorld::doStart().

const Point& Kodu::KoduWorld::getNorthStarLocation (  )  const

================================ World Bounds and North Star functions =========== /// Returns the world North Star

int Kodu::KoduWorld::getScoreValue ( const std::string &  kDesignator  )  [static]

Returns the value of a particular score (identified by the designator).

Definition at line 55 of file KoduWorld.cc.

Referenced by Kodu::KoduConditionScored::evaluate().

const std::map< int, Point > & Kodu::KoduWorld::getStarConstellation (  )  const

Returns the "stars" seen and their location.

Definition at line 76 of file KoduWorld.cc.

Referenced by KoduInterpreter::DropActionRunner::ExecuteDrop::LocalizeAgent::doStart().

const Shape< PolygonData > & Kodu::KoduWorld::getWorldBoundsPolygon (  )  const

Returns the world bounds polygon.

Definition at line 80 of file KoduWorld.cc.

Referenced by KoduInterpreter::InitializeAgent::OrganizeWorld::doStart().

void Kodu::KoduWorld::pairShapeWithTag ( int  worldShapeId,
int  aprilTagId 
)

Pairs an april tag with a particular shape.

Definition at line 66 of file KoduWorld.cc.

Referenced by Kodu::VisualBumpDetectionTask::examineTaskResults().

void Kodu::KoduWorld::setStarConstellation ( const std::vector< ShapeRoot > &  kConstellation  ) 

Sets the "stars" seen and their allocentric locations.

Definition at line 84 of file KoduWorld.cc.

Referenced by KoduInterpreter::InitializeAgent::OrganizeWorld::doStart().


Member Data Documentation

Local copy of the Score Keeper.

Definition at line 75 of file KoduWorld.h.

Referenced by applyGlobalScoreChanges(), getScoreValue(), and ~KoduWorld().

std::map<int, int> Kodu::KoduWorld::shapeToTagMap [private]

Helps the robot discern between multiple objects of same type and color when near them.

Definition at line 78 of file KoduWorld.h.

Referenced by getTagIdForShape(), pairShapeWithTag(), and shapeTagPairExists().

std::map<int, Point> Kodu::KoduWorld::starConstellation [private]

A map of the april tag (used as stars) and their allocentric positions.

Definition at line 81 of file KoduWorld.h.

Referenced by getStarConstellation(), and setStarConstellation().

Shape<PolygonData> Kodu::KoduWorld::worldBoundsPolygon [private]

The world bounds polygon.

Definition at line 84 of file KoduWorld.h.

Referenced by generateWorldBoundsPolygon(), and getWorldBoundsPolygon().

The length of the world's sides; all sides are the same length making the world a square.

Definition at line 87 of file KoduWorld.h.


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:23 2016 by Doxygen 1.6.3