Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# ChallengeSpecialVision Class Reference

`#include <ChallengeSpecialVision.h>`

Inheritance diagram for ChallengeSpecialVision:

[legend]
Collaboration diagram for ChallengeSpecialVision:

[legend]
List of all members.

## Public Member Functions
| ChallengeSpecialVision (const SpecialVisionInterfaces &interfaces)
| Constructor.
virtual void | execute ()
| Executes the module.
## Private Member Functions
void | executeLearnOrientation ()
void | executeFindOrientation ()
void | executeGetOrientation ()
void | executeReset ()
ChallengeSectorData | countPixels (int x1, int x2, int y1, int y2)
void | sort (double *a, const int number)
double | alngleDifDegree (double a, double b)
## Private Attributes
double | flagAngle [MAXLEARNFLAGS]
double | foundAngle [MAXLEARNFLAGS]
int | flagCount
int | foundAngleCount
ChallengeSectorData | data [NUMBEROFSECTORS]

## Constructor & Destructor Documentation

ChallengeSpecialVision::ChallengeSpecialVision | ( | const SpecialVisionInterfaces & | interfaces | ) |

  | Constructor. Parameters:
  interfaces | The interfaces of the SpecialVision module
Definition at line 17 of file ChallengeSpecialVision.cpp. References executeReset().

Here is the call graph for this function:

## Member Function Documentation

void ChallengeSpecialVision::execute | ( |  | ) | `[virtual]`

| Executes the module. Reimplemented from Module. Definition at line 46 of file ChallengeSpecialVision.cpp. References SpecialPercept::countAngleOfPinkFlags, executeFindOrientation(), executeGetOrientation(), executeLearnOrientation(), SpecialPercept::orientation, and SpecialVisionRequest::specialVisionRequest. Referenced by DefaultSpecialVision::execute().

Here is the call graph for this function:

void ChallengeSpecialVision::executeLearnOrientation | ( |  | ) | `[private]`

| Definition at line 94 of file ChallengeSpecialVision.cpp. References alngleDifDegree(), SpecialPercept::angleOfPinkFlags, SpecialPercept::countAngleOfPinkFlags, flagAngle, flagCount, Pose2D::getAngle(), MAXLEARNFLAGS, SpecialPercept::orientation, sort(), and toDegrees(). Referenced by execute().

Here is the call graph for this function:

void ChallengeSpecialVision::executeFindOrientation | ( |  | ) | `[private]`

| Definition at line 138 of file ChallengeSpecialVision.cpp. References alngleDifDegree(), SpecialPercept::angleOfPinkFlags, SpecialPercept::countAngleOfPinkFlags, foundAngle, foundAngleCount, Pose2D::getAngle(), MAXLEARNFLAGS, SpecialPercept::orientation, sort(), and toDegrees(). Referenced by execute().

Here is the call graph for this function:

void ChallengeSpecialVision::executeGetOrientation | ( |  | ) | `[private]`

| Definition at line 173 of file ChallengeSpecialVision.cpp. References alngleDifDegree(), flagAngle, flagCount, foundAngle, foundAngleCount, and SpecialPercept::orientation. Referenced by execute().

Here is the call graph for this function:

void ChallengeSpecialVision::executeReset | ( |  | ) | `[private]`

| Definition at line 23 of file ChallengeSpecialVision.cpp. References Vector2< V >::angle(), flagAngle, flagCount, foundAngle, foundAngleCount, toDegrees(), Vector2< V >::x, and Vector2< V >::y. Referenced by ChallengeSpecialVision().

Here is the call graph for this function:

ChallengeSectorData ChallengeSpecialVision::countPixels | ( | int | x1,
|  | int | x2,
|  | int | y1,
|  | int | y2
| ) | `[private]`

| Definition at line 76 of file ChallengeSpecialVision.cpp. References ColorTable::getColorClass(), Image::image, and ChallengeSectorData::numPixels.

Here is the call graph for this function:

void ChallengeSpecialVision::sort | ( | double * | a,
|  | const int | number
| ) | `[private]`

| Definition at line 229 of file ChallengeSpecialVision.cpp. Referenced by executeFindOrientation(), and executeLearnOrientation().

double ChallengeSpecialVision::alngleDifDegree | ( | double | a,
|  | double | b
| ) | `[private]`

| Definition at line 243 of file ChallengeSpecialVision.cpp. Referenced by executeFindOrientation(), executeGetOrientation(), and executeLearnOrientation().

## Member Data Documentation

double ChallengeSpecialVision::flagAngle[MAXLEARNFLAGS]`[private]`

| Definition at line 47 of file ChallengeSpecialVision.h. Referenced by executeGetOrientation(), executeLearnOrientation(), and executeReset().

double ChallengeSpecialVision::foundAngle[MAXLEARNFLAGS]`[private]`

| Definition at line 48 of file ChallengeSpecialVision.h. Referenced by executeFindOrientation(), executeGetOrientation(), and executeReset().

int ChallengeSpecialVision::flagCount`[private]`

| Definition at line 49 of file ChallengeSpecialVision.h. Referenced by executeGetOrientation(), executeLearnOrientation(), and executeReset().

int ChallengeSpecialVision::foundAngleCount`[private]`

| Definition at line 50 of file ChallengeSpecialVision.h. Referenced by executeFindOrientation(), executeGetOrientation(), and executeReset().

ChallengeSectorData ChallengeSpecialVision::data[NUMBEROFSECTORS]`[private]`

| Definition at line 53 of file ChallengeSpecialVision.h.

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

- Modules/SpecialVision/ChallengeSpecialVision.h
- Modules/SpecialVision/ChallengeSpecialVision.cpp