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

RS::Sector Class Reference

Class used to represent a circle sector in RoboSoc. More...

List of all members.

Public Member Functions

 Sector (const AngleDeg &min_angle, const AngleDeg &max_angle)
 Creates a new sector from two global angles.

 Sector (const Point &from, const Point &first_pos, const Point &last_pos)
 Creates a sector from three points, the source and two destination points.

 ~Sector ()
 Destructure.

AngleDeg min_angle () const
 Gets the absolute minimum global angle of the circle sector.

AngleDeg max_angle () const
 Gets the absolute maximum global angle of the circle sector.

AngleDeg center () const
 Gets the global angle that is the center of the circle sector.

AngleDeg width () const
 The width of the circle sector in degrees.

bool contains (const AngleDeg &angle) const
 Checks if the circle sector contains a specific global angle.

void set_min_angle (const AngleDeg &a)
 Set the absolute minimum global angle of the circle sector.

void set_max_angle (const AngleDeg &a)
 Set the absolute maximum global angle of the circle sector.


Protected Member Functions

void normalize ()


Detailed Description

Class used to represent a circle sector in RoboSoc.

Unit:
Library
Revision
1.4
Author
frehe
Date
2007/09/04 14:09:39

Definition at line 74 of file Sector.h.


Constructor & Destructor Documentation

RS::Sector::Sector const AngleDeg   min_angle,
const AngleDeg   max_angle
 

Creates a new sector from two global angles.

Parameters:
min_angle The minimum global angle of the sector
max_angle The maximum global angle of the sector

Definition at line 60 of file Sector.cc.

RS::Sector::Sector const Point   from,
const Point   first_pos,
const Point   last_pos
 

Creates a sector from three points, the source and two destination points.

Parameters:
from The source point of the circle sector
first_pos One position on the cirle sector
last_pos The other position on the circle sector

Definition at line 69 of file Sector.cc.


Member Function Documentation

AngleDeg RS::Sector::min_angle   const
 

Gets the absolute minimum global angle of the circle sector.

Returns:
The absolute minimum global angle of the circle sector

Definition at line 85 of file Sector.cc.

Referenced by RS::generate_direction_in_sector(), RS::get_largest_sector(), and RS::get_sector_wider_than().

AngleDeg RS::Sector::max_angle   const
 

Gets the absolute maximum global angle of the circle sector.

Returns:
The absolute maximum global angle of the circle sector

Definition at line 92 of file Sector.cc.

Referenced by RS::generate_direction_in_sector(), RS::get_largest_sector(), and RS::get_sector_wider_than().

AngleDeg RS::Sector::center   const
 

Gets the global angle that is the center of the circle sector.

Returns:
The global angle that is the center of the circle sector

Definition at line 99 of file Sector.cc.

References width().

AngleDeg RS::Sector::width   const
 

The width of the circle sector in degrees.

Returns:
The width of the circle sector

Definition at line 106 of file Sector.cc.

Referenced by center(), and RS::get_largest_sector().

bool RS::Sector::contains const AngleDeg   angle const
 

Checks if the circle sector contains a specific global angle.

Parameters:
angle The global angle to check against
Returns:
true if the sector contains the global angle

Definition at line 113 of file Sector.cc.

Referenced by RS::get_largest_sector(), and RS::get_sector_wider_than().


The documentation for this class was generated from the following files:
Generated on Mon Aug 29 08:22:33 2011 for RoboSoc by doxygen1.3-rc3