VisionObjectEvent Class Reference#include <VisionObjectEvent.h>
Inheritance diagram for VisionObjectEvent:
[legend]List of all members.
Detailed Description
Extends EventBase to also include location in the visual field and distance (though distance is not implimented yet).
Definition at line 8 of file VisionObjectEvent.h.
|
Public Member Functions |
| VisionObjectEvent () |
| Constructor.
|
| VisionObjectEvent (EventTypeID_t tid, unsigned int sid) |
| Constructor, pass a type id and source id.
|
| VisionObjectEvent (EventTypeID_t tid, unsigned int sid, float cenX, float cenY) |
| Constructor, pass the type id, source id, center X and center Y.
|
virtual | ~VisionObjectEvent () |
| destructor
|
float | getCenterX () const |
| returns the x coordinate
|
VisionObjectEvent & | setCenterX (float cenX) |
| sets the x coordinate
|
float | getCenterY () const |
| returns the y coordinate
|
VisionObjectEvent & | setCenterY (float cenY) |
| sets the y coordinate
|
float | getDistance () const |
| returns the distance (not implemented)
|
VisionObjectEvent & | setDistance (float dist) |
| sets the distance
|
virtual unsigned int | getBinSize () const |
| calculates space needed to save - if you can't precisely add up the size, overestimate and things will still work.
|
virtual unsigned int | LoadBuffer (const char buf[], unsigned int len) |
| Load from a saved buffer.
|
virtual unsigned int | SaveBuffer (char buf[], unsigned int len) const |
| Save to a given buffer.
|
Protected Attributes |
float | _cenX |
| a value representing location in visual field - from -1 if on the left edge to 1 if it's on the right edge
|
float | _cenY |
| a value representing location in visual field - from -1 if on the bottom edge to 1 if it's on the top edge
|
float | _distance |
| distance from snout to object in millimeters. (not implemented)
|
Constructor & Destructor Documentation
VisionObjectEvent::VisionObjectEvent |
( |
|
) |
[inline] |
|
VisionObjectEvent::VisionObjectEvent |
( |
EventTypeID_t |
tid, |
|
|
unsigned int |
sid |
|
) |
[inline] |
|
VisionObjectEvent::VisionObjectEvent |
( |
EventTypeID_t |
tid, |
|
|
unsigned int |
sid, |
|
|
float |
cenX, |
|
|
float |
cenY |
|
) |
[inline] |
|
|
Constructor, pass the type id, source id, center X and center Y.
Definition at line 15 of file VisionObjectEvent.h. |
Member Function Documentation
unsigned int VisionObjectEvent::getBinSize |
( |
|
) |
const [virtual] |
|
|
calculates space needed to save - if you can't precisely add up the size, overestimate and things will still work.
- Returns:
- number of bytes read/written, 0 if error (or empty)
Reimplemented from EventBase.
Definition at line 4 of file VisionObjectEvent.cc. |
float VisionObjectEvent::getCenterX |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getCenterY |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getDistance |
( |
|
) |
const [inline] |
|
unsigned int VisionObjectEvent::LoadBuffer |
( |
const char |
buf[], |
|
|
unsigned int |
len |
|
) |
[virtual] |
|
|
Load from a saved buffer.
- Parameters:
-
buf | pointer to the memory where you should begin loading |
len | length of buf available (this isn't all yours, might be more stuff saved after yours) |
- Returns:
- the number of bytes actually used
Reimplemented from EventBase.
Definition at line 15 of file VisionObjectEvent.cc.
Referenced by EventTranslator::sendEvent(). |
unsigned int VisionObjectEvent::SaveBuffer |
( |
char |
buf[], |
|
|
unsigned int |
len |
|
) |
const [virtual] |
|
|
Save to a given buffer.
- Parameters:
-
buf | pointer to the memory where you should begin writing |
len | length of buf available. (this isn't all yours, constrain yourself to what you returned in getBinSize() ) |
- Returns:
- the number of bytes actually used
Reimplemented from EventBase.
Definition at line 34 of file VisionObjectEvent.cc. |
Member Data Documentation
The documentation for this class was generated from the following files:
|