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
|
virtual std::string | getDescription (bool showTypeSpecific=true, unsigned int verbosity=0) const |
| generates a description of the event with variable verbosity
|
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
|
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 14 of file VisionObjectEvent.cc. |
float VisionObjectEvent::getCenterX |
( |
|
) |
const [inline] |
|
float VisionObjectEvent::getCenterY |
( |
|
) |
const [inline] |
|
std::string VisionObjectEvent::getDescription |
( |
bool |
showTypeSpecific = true , |
|
|
unsigned int |
verbosity = 0 |
|
) |
const [virtual] |
|
|
generates a description of the event with variable verbosity
- Parameters:
-
| showTypeSpecific | will signal subclasses to add additional information |
| verbosity | can be one of the following values:
- 0 - the name and type
- 1 - the name, type, duration, and timestamp
- 2 and above - the name, type, duration, and magnitude if showTypeSpecific, additional fields will be added after the common fields listed above.
|
Reimplemented from EventBase.
Definition at line 5 of file VisionObjectEvent.cc. |
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 25 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 44 of file VisionObjectEvent.cc. |
Member Data Documentation
The documentation for this class was generated from the following files:
|