BaseData Class Reference
Base class that all shape data classes inherit from, e.g., LineData, BlobData, etc.
More...
#include <BaseData.h>
Detailed Description
Base class that all shape data classes inherit from, e.g., LineData, BlobData, etc.
Definition at line 28 of file BaseData.h.
List of all members.
Public Member Functions |
| BaseData (ShapeSpace &_space, ShapeType_t typeval, int _parentId=0) |
| Constructor.
|
| BaseData (const BaseData &otherData) |
| Copy constructor.
|
virtual | ~BaseData (void) |
| Destructor.
|
virtual BaseData * | clone () const |
ShapeRoot | copy () const |
ShapeSpace & | getSpace () const |
void | setSpace (ShapeSpace *_space) |
ReferenceFrameType_t | getRefFrameType () const |
int | getId () const |
int | getParentId () const |
void | setParentId (int _pid) |
bool | isViewable () const |
void | setViewable (bool _viewable) |
int | getViewableId () const |
void | inheritFrom (const BaseData &parent) |
void | inheritFrom (const ShapeRoot &parent) |
void | inheritFrom (const SketchDataRoot &parent) |
int | getLastMatchId () const |
void | setLastMatchId (int _lmid) |
const std::string & | getName () const |
void | setName (const std::string &_name) |
void | V (std::string const &_name="") |
void | N (std::string const &_name="") |
virtual void | importAdjust () |
| Adjust shape components after the shape has been imported (e.g., used by polygons).
|
virtual BoundingBox2D | getBoundingBox () const |
bool | isSameColorAs (const ShapeRoot &other) const |
| Test if shape colors are the same.
|
virtual bool | isMatchFor (const ShapeRoot &other) const =0 |
| Shapes match if their coordinates agree. DOES NOT Assume type and color already checked.
|
virtual bool | isAdmissible () const |
| Combine two shapes by taking weighted average depending on confidence level.
|
virtual bool | updateParams (const ShapeRoot &other, bool forceUpdate=false)=0 |
| Update shape parameters after matching to another shape.
|
virtual bool | isInside (const Point &) const |
| returns if a point is inside the shape or not. Reimplemented by EllipseData, SphereData, PolygonData
|
virtual unsigned short | getDimension () const =0 |
virtual bool | localizeByCamera () const |
bool | isObstacle () const |
void | setObstacle (bool _obstacle=true) |
bool | isLandmark () const |
void | setLandmark (bool _landmark=true) |
void | deleteRendering () |
virtual Point | getCentroid () const =0 |
| return the centroid of the shape in point format
|
virtual Shape< PointData > | getCentroidPtShape () const |
virtual void | setPosition (const Point &pt) |
| Set the position of a shape.
|
virtual void | printParams () const =0 |
| Prints information about this shape.
|
virtual void | applyTransform (const fmat::Transform &Tmat, const ReferenceFrameType_t newref=unspecified)=0 |
| Apply a transformation matrix to the shape.
|
virtual void | projectToGround (const fmat::Transform &camToBase, const PlaneEquation &groundplane)=0 |
| Project to ground plane using given matrix.
|
BaseData & | operator= (const BaseData &other) |
| Assignment operator. Assumes "&other =? this" check is done by the sub class calling this operator.
|
|
|
virtual int | getConfidence () const |
| Confidence.
|
void | increaseConfidence (int n=1, int maxConfidence=-1) |
| Confidence.
|
void | increaseConfidence (const BaseData &other, int maxConfidence=-1) |
| Confidence.
|
void | increaseConfidence (const ShapeRoot &other, int maxConfidence=-1) |
| Confidence.
|
void | decreaseConfidence () |
| Confidence.
|
void | setConfidence (const BaseData &other) |
| Confidence.
|
|
|
virtual ShapeType_t | getType () const =0 |
| Type.
|
const char * | getTypeName () const |
| Type.
|
bool | isType (ShapeType_t this_type) const |
| Test the shape type.
|
bool | isSameTypeAs (const ShapeRoot &other) const |
| Test if shape types are the same.
|
|
|
rgb | getColor () const |
| Color.
|
void | setColor (const std::string &color_name) |
| Set shape and rendering sketch color.
|
void | setColor (const rgb &new_color) |
| Color.
|
void | setColor (const unsigned int color_index) |
| Color.
|
|
|
bool | getMobile () const |
| Mobility.
|
void | setMobile (bool mobility) |
| Mobility.
|
Protected Attributes |
ShapeSpace * | space |
std::string | name |
ShapeType_t | type |
int | id |
int | parentId |
int | lastMatchId |
| Id of the shape in the preceding space that gave rise to or was matched to this one.
|
int | refcount |
bool | viewable |
rgb | color_rgb |
int | confidence |
| Confidence that this shape exists and isn't noise.
|
bool | mobile |
| True if this shape can move in the world.
|
bool | obstacle |
| True if shape is an obstacle.
|
bool | landmark |
| True if shape should be used as a landmark.
|
Sketch< bool > * | rendering_sketch |
Friends |
class | ShapeRoot |
class | ShapeSpace |
|
Sketch< bool > & | getRendering () |
| Update properties of the shape derived from endpoints or other basic parameters.
|
virtual Sketch< bool > * | render () const =0 |
| Render into a sketch space.
|
Constructor & Destructor Documentation
Member Function Documentation
Apply a transformation matrix to the shape.
Implemented in AgentData, AprilTagData, BlobData, BrickData, CrossData, CylinderData, EllipseData, GraphicsData, LineData, LocalizationParticleData, MarkerData, NaughtData, PointData, PolygonData, PyramidData, SiftData, SkeletonData, SphereData, and TargetData.
Referenced by BaseData::setPosition().
void decreaseConfidence |
( |
|
) |
|
Definition at line 150 of file BaseData.cc.
Referenced by LineData::getRendering(), PolygonData::setColor(), EllipseData::setOrientation(), AgentData::setOrientation(), SphereData::setRadius(), EllipseData::setSemimajor(), EllipseData::setSemiminor(), LineData::update_derived_properties(), PyramidData::updateParams(), PointData::updateParams(), and BrickData::updateParams().
Reimplemented in AgentData, AprilTagData, BlobData, BrickData, CrossData, CylinderData, EllipseData, LineData, PointData, PolygonData, SiftData, SkeletonData, and TargetData.
Definition at line 103 of file BaseData.h.
virtual Point getCentroid |
( |
|
) |
const [pure virtual] |
return the centroid of the shape in point format
Implemented in AgentData, AprilTagData, BlobData, BrickData, CrossData, CylinderData, EllipseData, GraphicsData, LineData, LocalizationParticleData, MarkerData, NaughtData, PointData, PolygonData, PyramidData, SiftData, SkeletonData, SphereData, and TargetData.
Referenced by BaseData::getCentroidPtShape(), and BaseData::setPosition().
Shape< PointData > getCentroidPtShape |
( |
|
) |
const [virtual] |
Color.
Get the color.
Definition at line 135 of file BaseData.h.
Referenced by BaseData::getRendering(), SketchDataRoot::inheritFrom(), BaseData::inheritFrom(), MarkerData::isMatchingMarker(), BaseData::isSameColorAs(), SphereData::printParams(), PyramidData::printParams(), PolygonData::printParams(), PointData::printParams(), NaughtData::printParams(), MarkerData::printParams(), LineData::printParams(), EllipseData::printParams(), CylinderData::printParams(), BrickData::printParams(), BlobData::printParams(), AgentData::printParams(), TargetData::render(), PyramidData::render(), and BrickData::render().
virtual int getConfidence |
( |
void |
|
) |
const [virtual] |
virtual unsigned short getDimension |
( |
|
) |
const [pure virtual] |
Implemented in AgentData, AprilTagData, BlobData, BrickData, CrossData, CylinderData, EllipseData, GraphicsData, LineData, LocalizationParticleData, MarkerData, NaughtData, PointData, PolygonData, PyramidData, SiftData, SkeletonData, SphereData, and TargetData.
Definition at line 74 of file BaseData.h.
Referenced by SiftData::displayMatchedFeatures(), PolygonData::PolygonData(), TargetData::printParams(), SphereData::printParams(), SkeletonData::printParams(), SiftData::printParams(), PyramidData::printParams(), PointData::printParams(), NaughtData::printParams(), MarkerData::printParams(), LocalizationParticleData::printParams(), LineData::printParams(), GraphicsData::printParams(), EllipseData::printParams(), CylinderData::printParams(), BrickData::printParams(), BlobData::printParams(), BiColorMarkerData::printParams(), AprilTagData::printParams(), and AgentData::printParams().
int getLastMatchId |
( |
|
) |
const |
const std::string& getName |
( |
|
) |
const |
Definition at line 95 of file BaseData.h.
Referenced by BaseData::getRendering(), TargetData::render(), SphereData::render(), SkeletonData::render(), SiftData::render(), PyramidData::render(), PointData::render(), NaughtData::render(), MarkerData::render(), LocalizationParticleData::render(), LineData::render(), GraphicsData::render(), EllipseData::render(), CylinderData::render(), BrickData::render(), BlobData::render(), AprilTagData::render(), and AgentData::render().
int getParentId |
( |
|
) |
const |
Definition at line 75 of file BaseData.h.
Referenced by TargetData::printParams(), SphereData::printParams(), SkeletonData::printParams(), SiftData::printParams(), PyramidData::printParams(), PointData::printParams(), NaughtData::printParams(), MarkerData::printParams(), LocalizationParticleData::printParams(), LineData::printParams(), EllipseData::printParams(), CylinderData::printParams(), BrickData::printParams(), BlobData::printParams(), BiColorMarkerData::printParams(), AprilTagData::printParams(), AgentData::printParams(), and PolygonData::tryUpdateEdge().
Definition at line 111 of file BaseData.cc.
Referenced by CylinderData::CylinderData(), EllipseData::EllipseData(), PolygonData::getCentroid(), BlobData::getCentroid(), LineData::pointIsAbove(), LineData::pointIsBelow(), LineData::pointIsLeftOf(), LineData::pointIsRightOf(), BaseData::setPosition(), TargetData::update_derived_properties(), and LineData::update_derived_properties().
Type.
Get the shape type.
const char * getTypeName |
( |
|
) |
const |
Type.
Get shape type name.
Definition at line 118 of file BaseData.cc.
Referenced by TargetData::printParams(), SphereData::printParams(), SkeletonData::printParams(), SiftData::printParams(), PyramidData::printParams(), PointData::printParams(), NaughtData::printParams(), MarkerData::printParams(), LocalizationParticleData::printParams(), LineData::printParams(), EllipseData::printParams(), CylinderData::printParams(), BrickData::printParams(), BlobData::printParams(), BiColorMarkerData::printParams(), AprilTagData::printParams(), and AgentData::printParams().
int getViewableId |
( |
|
) |
const |
virtual void importAdjust |
( |
|
) |
[virtual] |
void increaseConfidence |
( |
const ShapeRoot & |
other, |
|
|
int |
maxConfidence = -1 | |
|
) |
| | |
void increaseConfidence |
( |
const BaseData & |
other, |
|
|
int |
maxConfidence = -1 | |
|
) |
| | |
void increaseConfidence |
( |
int |
n = 1 , |
|
|
int |
maxConfidence = -1 | |
|
) |
| | |
void inheritFrom |
( |
const ShapeRoot & |
parent |
) |
|
void inheritFrom |
( |
const BaseData & |
parent |
) |
|
virtual bool isAdmissible |
( |
|
) |
const [virtual] |
virtual bool isInside |
( |
const Point & |
|
) |
const [virtual] |
bool isLandmark |
( |
|
) |
const |
virtual bool isMatchFor |
( |
const ShapeRoot & |
other |
) |
const [pure virtual] |
Shapes match if their coordinates agree. DOES NOT Assume type and color already checked.
Implemented in AgentData, AprilTagData, BlobData, BrickData, CrossData, CylinderData, DominoData, EllipseData, GraphicsData, LineData, LocalizationParticleData, MarkerData, NaughtData, PointData, PolygonData, PyramidData, SiftData, SkeletonData, SphereData, and TargetData.
bool isObstacle |
( |
|
) |
const |
Test if shape colors are the same.
Definition at line 128 of file BaseData.cc.
Referenced by TargetData::isMatchFor(), SphereData::isMatchFor(), PyramidData::isMatchFor(), PolygonData::isMatchFor(), PointData::isMatchFor(), NaughtData::isMatchFor(), LocalizationParticleData::isMatchFor(), LineData::isMatchFor(), EllipseData::isMatchFor(), DominoData::isMatchFor(), CylinderData::isMatchFor(), BrickData::isMatchFor(), and BlobData::isMatchFor().
Test if shape types are the same.
Test that two shapes are of same type.
Definition at line 124 of file BaseData.cc.
Referenced by TargetData::isMatchFor(), SphereData::isMatchFor(), SkeletonData::isMatchFor(), SiftData::isMatchFor(), PyramidData::isMatchFor(), PointData::isMatchFor(), NaughtData::isMatchFor(), MarkerData::isMatchFor(), LocalizationParticleData::isMatchFor(), LineData::isMatchFor(), EllipseData::isMatchFor(), DominoData::isMatchFor(), CylinderData::isMatchFor(), BrickData::isMatchFor(), BlobData::isMatchFor(), AprilTagData::isMatchFor(), and AgentData::isMatchFor().
bool isViewable |
( |
|
) |
const |
virtual bool localizeByCamera |
( |
|
) |
const [virtual] |
void N |
( |
std::string const & |
_name = "" |
) |
|
Assignment operator. Assumes "&other =? this" check is done by the sub class calling this operator.
Definition at line 64 of file BaseData.cc.
virtual void printParams |
( |
|
) |
const [pure virtual] |
Prints information about this shape.
Implemented in AgentData, AprilTagData, BiColorMarkerData, BlobData, BrickData, CrossData, CylinderData, EllipseData, GraphicsData, LineData, LocalizationParticleData, MarkerData, NaughtData, PointData, PolygonData, PyramidData, SiftData, SkeletonData, SphereData, and TargetData.
Project to ground plane using given matrix.
Implemented in AgentData, AprilTagData, BlobData, BrickData, CrossData, CylinderData, EllipseData, GraphicsData, LineData, LocalizationParticleData, MarkerData, NaughtData, PointData, PolygonData, PyramidData, SiftData, SkeletonData, SphereData, and TargetData.
virtual Sketch<bool>* render |
( |
|
) |
const [private, pure virtual] |
Render into a sketch space.
Implemented in AgentData, AprilTagData, BlobData, BrickData, CrossData, CylinderData, EllipseData, GraphicsData, LineData, LocalizationParticleData, MarkerData, NaughtData, PointData, PolygonData, PyramidData, SiftData, SkeletonData, SphereData, and TargetData.
Referenced by BaseData::getRendering().
void setColor |
( |
const unsigned int |
color_index |
) |
|
void setColor |
( |
const rgb & |
new_color |
) |
|
void setColor |
( |
const std::string & |
color_name |
) |
|
void setConfidence |
( |
const BaseData & |
other |
) |
|
void setLandmark |
( |
bool |
_landmark = true |
) |
|
void setLastMatchId |
( |
int |
_lmid |
) |
|
void setMobile |
( |
bool |
mobility |
) |
|
void setName |
( |
const std::string & |
_name |
) |
|
void setObstacle |
( |
bool |
_obstacle = true |
) |
|
void setParentId |
( |
int |
_pid |
) |
|
void setPosition |
( |
const Point & |
pt |
) |
[virtual] |
Set the position of a shape.
Definition at line 214 of file BaseData.cc.
void setViewable |
( |
bool |
_viewable |
) |
|
virtual bool updateParams |
( |
const ShapeRoot & |
other, |
|
|
bool |
forceUpdate = false | |
|
) |
| | [pure virtual] |
Update shape parameters after matching to another shape.
Implemented in AgentData, AprilTagData, BlobData, BrickData, CrossData, CylinderData, EllipseData, GraphicsData, LineData, LocalizationParticleData, MarkerData, NaughtData, PointData, PolygonData, PyramidData, SiftData, SkeletonData, SphereData, and TargetData.
void V |
( |
std::string const & |
_name = "" |
) |
|
Friends And Related Function Documentation
Member Data Documentation
Confidence that this shape exists and isn't noise.
Definition at line 45 of file BaseData.h.
Referenced by BaseData::decreaseConfidence(), BaseData::getConfidence(), BaseData::increaseConfidence(), TargetData::mergeWith(), SphereData::mergeWith(), PointData::mergeWith(), BaseData::operator=(), BaseData::setConfidence(), TargetData::updateParams(), SphereData::updateParams(), PyramidData::updateParams(), PointData::updateParams(), NaughtData::updateParams(), MarkerData::updateParams(), EllipseData::updateParams(), BrickData::updateParams(), BlobData::updateParams(), and AgentData::updateParams().
std::string name [protected] |
Definition at line 35 of file BaseData.h.
Referenced by ShapeRoot::addShape(), LineData::bottomPtShape(), ShapeRoot::deleteShape(), SiftData::displayMatchedFeatures(), BlobData::findCorners(), BlobData::findCornersDerivative(), BlobData::findCornersDiagonal(), BlobData::findCornersShapeFit(), LineData::firstPtShape(), LocalizationParticleData::getCentroid(), BaseData::getCentroidPtShape(), BaseData::getRefFrameType(), ShapeRoot::getSpace(), BaseData::getSpace(), PolygonData::importAdjust(), ShapeSpace::importShape(), PolygonData::intersectsLine(), LineData::isBetween(), PolygonData::isInside(), LineData::isMatchFor(), LineData::leftPtShape(), LineData::LineData(), BaseData::operator=(), PointData::PointData(), TargetData::render(), SphereData::render(), SkeletonData::render(), SiftData::render(), PyramidData::render(), PolygonData::render(), PointData::render(), NaughtData::render(), MarkerData::render(), LocalizationParticleData::render(), LineData::render(), GraphicsData::render(), EllipseData::render(), CylinderData::render(), BrickData::render(), BlobData::render(), AprilTagData::render(), AgentData::render(), LineData::renderOnTo(), LineData::rightPtShape(), LineData::secondPtShape(), LineData::setDrawCoords(), BaseData::setSpace(), PolygonData::setVertices(), LineData::topPtShape(), and PolygonData::tryClosePolygon().
The documentation for this class was generated from the following files:
|