Aria  2.8.0
ArDrawingData Class Reference

Describes general properties of a figure to be drawn on screen. More...

#include <ArDrawingData.h>

Public Types

enum  { DEFAULT_REFRESH_TIME = 200 }
 

Public Member Functions

 ArDrawingData (const char *shape, ArColor primaryColor, int size, int layer, unsigned int defaultRefreshTime=DEFAULT_REFRESH_TIME, const char *visibility="DefaultOn")
 Constructor. More...
 
 ArDrawingData (const char *shape, ArColor primaryColor, int size, int layer, unsigned int defaultRefreshTime, ArColor secondaryColor, const char *visibility="DefaultOn")
 Constructor. More...
 
unsigned int getDefaultRefreshTime (void)
 Gets how often this data should be drawn (0 == only when explicitly sent)
 
int getLayer (void)
 Gets the layer to draw at (see MobileEyes docs for what layer means)
 
ArColor getPrimaryColor (void)
 Gets the primary color (meaning depending on shape)
 
ArColor getSecondaryColor (void)
 Gets the secondary color (meaning depends on shape)
 
const char * getShape (void)
 Returns the shape of data to draw.
 
int getSize (void)
 Gets the size (meaning depends on shape, but its in mm)
 
const char * getVisibility (void)
 Gets the visibility of the drawing data.
 
void setDefaultRefreshTime (unsigned int refreshTime)
 Gets how often this data should be drawn (0 == only when explicitly sent)
 
void setLayer (int layer)
 Sets the layer (see MobileEyes for docs on what layer means)
 
void setPrimaryColor (ArColor color)
 Sets the primary color (meaning depends on shape)
 
void setSecondaryColor (ArColor color)
 Sets the secondary color (meaning depends on shape)
 
void setShape (const char *shape)
 Sets the shape of data to draw.
 
void setSize (int size)
 Sets the size (meaning depends on shape, but its in mm)
 
void setVisibility (const char *visibility)
 Sets the visibility of the drawing data.
 
virtual ~ArDrawingData ()
 Destructor.
 

Protected Attributes

unsigned int myDefaultRefreshTime
 
int myLayer
 
ArColor myPrimaryColor
 
ArColor mySecondaryColor
 
std::string myShape
 
int mySize
 
std::string myVisibility
 

Detailed Description

Describes general properties of a figure to be drawn on screen.

(The actual location/geometry data of the figure is stored elsewhere and may change frequently)

The following shapes are currently recognized:

  • "polyDots" - a set of small filled circles centered on each point. Each ellipse is "size" mm in diameter. (Example: laser)
  • "polyArrows" - a set of small arrows that terminate on each point and point towards the robot. Each arrow is "size" mm in length. (Example: sonar)
  • "polyLine" - a line through each of the points. The line is "size" pixels wide. (Example: path)
  • "polyPoints" - a set of one pixel points. (Example: localization)
  • "polySegments" - a set of line segments. For an array of n points, n/2 segments are drawn. Each segment is drawn from array[i] to array[i+1] (with i starting at 0). The segments are "size" pixels wide.

The primary color determines what color the shape is. No shapes currently use the secondary color (but future shapes may, or these shapes may be extended in the future to use it).

The layer is an arbitrary int identifier that must be greater than 30 and less than 100. (Layers below 30 are considered part of the map data, i.e. not associated with a particular robot.) The robot is drawn on layer 50. Any items that are to be drawn on top of the robot should have a layer number greater than 50. By default, range devices begin on layer 70.

The visibility attribute specifies whether the data is to be displayed by default, and whether the user is allowed to change the display. The following visibilities are currently supported:

  • "AlwaysOn" - item is always displayed
  • "DefaultOn" - item is visible by default, but the user may hide it
  • "DefaultOff" - item is hidden by default but the user may show it
  • "AlwaysOff" - item is always hidden

The default visibility is "DefaultOn".

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_REFRESH_TIME 

Default number of ms between data refresh requests.

Constructor & Destructor Documentation

◆ ArDrawingData() [1/2]

ArDrawingData::ArDrawingData ( const char *  shape,
ArColor  primaryColor,
int  size,
int  layer,
unsigned int  defaultRefreshTime = DEFAULT_REFRESH_TIME,
const char *  visibility = "DefaultOn" 
)
inline

Constructor.

Parameters
shapethe name of the shape to draw (see above / MobileEyes docs for meaning)
primaryColorthe main color (meaning depends on shape)
sizethe size (meaning varies depends on shape)
layerthe layer to draw on (see above / MobileEyes docs for meaning)
defaultRefreshTimehow often we want to draw it in ms
visibilitya string that indicates whether the data is visible whether the user is allowed to change the visibility (see above / MobileEyes docs for valid values).

◆ ArDrawingData() [2/2]

ArDrawingData::ArDrawingData ( const char *  shape,
ArColor  primaryColor,
int  size,
int  layer,
unsigned int  defaultRefreshTime,
ArColor  secondaryColor,
const char *  visibility = "DefaultOn" 
)
inline

Constructor.

Parameters
shapethe name of the shape to draw (see above / MobileEyes docs for meaning)
primaryColorthe main color (meaning depends on shape)
sizethe size (meaning varies depends on shape)
layerthe layer to draw on (see above / MobileEyes docs for meaning)
defaultRefreshTimehow often we want to draw it in ms
secondaryColorthe secondary color (meaning depends on shape)
visibilitya string that indicates whether the data is visible whether the user is allowed to change the visibility (see above / MobileEyes docs for valid values).

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