Homepage Demos Overview Downloads Tutorials Reference
Credits

BaseData Class Reference

#include <BaseData.h>

Inheritance diagram for BaseData:

Inheritance graph
[legend]
List of all members.

Detailed Description

Definition at line 48 of file BaseData.h.

Public Member Functions

 BaseData (ShapeSpace &_space, ShapeType_t typeval, int _parentId=0)
 Constructor.
 BaseData (const BaseData &otherData)
 Copy constructor.
virtual ~BaseData (void)
 Destructor.
virtual BaseDataclone (void) const =0
ShapeSpacegetSpace () const
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 BoundingBox 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
 Shapes are admissible to the local map if they're large enough not to be noise.
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
void deleteRendering ()
virtual Point getCentroid () const =0
 return the centroid of the shape in point format
virtual Shape< PointDatagetCentroidPtShape () const
virtual void printParams () const =0
 Prints information about this shape.
virtual void applyTransform (const NEWMAT::Matrix &Tmat)=0
 Apply a transformation matrix to the shape.
virtual void projectToGround (const NEWMAT::Matrix &camToBase, const NEWMAT::ColumnVector &groundplane)=0
 Project to ground plane using given matrix.
BaseDataoperator= (const BaseData &other)
 Copy operator. Assumes "&other =? this" check is done by the sub class calling this operator.
virtual int getConfidence () const
 Confidence. returns confidence of Data. Reimpletemnted in PolygonData.
void increaseConfidence (int n=1, int maxConfidence=-1)
 Confidence. returns confidence of Data. Reimpletemnted in PolygonData.
void increaseConfidence (const BaseData &other, int maxConfidence=-1)
 Confidence. returns confidence of Data. Reimpletemnted in PolygonData.
void increaseConfidence (const ShapeRoot &other, int maxConfidence=-1)
 Confidence. returns confidence of Data. Reimpletemnted in PolygonData.
void decreaseConfidence ()
 Confidence. returns confidence of Data. Reimpletemnted in PolygonData.
void setConfidence (const BaseData &other)
 Confidence. returns confidence of Data. Reimpletemnted in PolygonData.
virtual ShapeType_t getType () const =0
 Get the shape type.
const char * getTypeName () const
 Get shape type name.
bool isType (ShapeType_t this_type) const
 Test the shape type.
bool isSameTypeAs (const ShapeRoot &other) const
 Test that two shapes are of same type.
rgb getColor () const
 Get the color.
void setColor (std::string const &color_name)
 Set shape and rendering sketch color.
void setColor (rgb new_color)
 Get the color.
bool isMobile () const
 Mobility.
void setMobile (bool mobility)
 Mobility.
Sketch< bool > & getRendering ()
 Rendering.
virtual Sketch< bool > * render () const =0
 Render into a sketch space.

Protected Attributes

ShapeSpacespace
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.
Sketch< bool > * rendering_sketch

Friends

class ShapeRoot
class ShapeSpace


Constructor & Destructor Documentation

BaseData ( ShapeSpace _space,
ShapeType_t  typeval,
int  _parentId = 0 
)

Constructor.

Definition at line 33 of file BaseData.cc.

BaseData ( const BaseData otherData  ) 

Copy constructor.

Definition at line 56 of file BaseData.cc.

~BaseData ( void   )  [virtual]

Destructor.

Definition at line 69 of file BaseData.cc.


Member Function Documentation

virtual void applyTransform ( const NEWMAT::Matrix &  Tmat  )  [pure virtual]

Apply a transformation matrix to the shape.

Implemented in AgentData, BlobData, BrickData, EllipseData, LineData, PointData, PolygonData, PyramidData, and SphereData.

virtual BaseData* clone ( void   )  const [pure virtual]

void decreaseConfidence (  )  [inline]

Confidence. returns confidence of Data. Reimpletemnted in PolygonData.

Definition at line 123 of file BaseData.h.

virtual BoundingBox getBoundingBox (  )  const [inline, virtual]

Reimplemented in EllipseData, LineData, PointData, and PolygonData.

Definition at line 113 of file BaseData.h.

virtual Point getCentroid (  )  const [pure virtual]

return the centroid of the shape in point format

Implemented in AgentData, BlobData, BrickData, EllipseData, LineData, PointData, PolygonData, PyramidData, and SphereData.

Referenced by BaseData::getCentroidPtShape().

Shape< PointData > getCentroidPtShape (  )  const [virtual]

Definition at line 74 of file BaseData.cc.

virtual int getConfidence (  )  const [inline, virtual]

Confidence. returns confidence of Data. Reimpletemnted in PolygonData.

Reimplemented in PolygonData.

Definition at line 117 of file BaseData.h.

Referenced by BaseData::increaseConfidence(), BaseData::setConfidence(), and AgentData::updateParams().

virtual unsigned short getDimension (  )  const [pure virtual]

int getLastMatchId (  )  const [inline]

Definition at line 104 of file BaseData.h.

Sketch< bool > & getRendering (  ) 

Rendering.

Returns a pointer to the rendering associated with the ShapeRoot object. If no such rendering exists, it is created.

Reimplemented in LineData.

Definition at line 165 of file BaseData.cc.

Referenced by BrickData::extractBrick(), PyramidData::extractPyramid(), BlobData::findCornersDerivative(), BlobData::findCornersDiagonal(), and BlobData::findCornersShapeFit().

ShapeSpace& getSpace (  )  const [inline]

virtual ShapeType_t getType (  )  const [pure virtual]

Get the shape type.

void increaseConfidence ( const ShapeRoot other,
int  maxConfidence = -1 
)

Confidence. returns confidence of Data. Reimpletemnted in PolygonData.

Definition at line 186 of file BaseData.cc.

void increaseConfidence ( const BaseData other,
int  maxConfidence = -1 
)

Confidence. returns confidence of Data. Reimpletemnted in PolygonData.

Definition at line 182 of file BaseData.cc.

void increaseConfidence ( int  n = 1,
int  maxConfidence = -1 
)

Confidence. returns confidence of Data. Reimpletemnted in PolygonData.

Definition at line 176 of file BaseData.cc.

Referenced by BaseData::increaseConfidence().

void inheritFrom ( const SketchDataRoot parent  ) 

Definition at line 110 of file BaseData.cc.

void inheritFrom ( const ShapeRoot parent  ) 

Definition at line 105 of file BaseData.cc.

void inheritFrom ( const BaseData parent  ) 

Definition at line 100 of file BaseData.cc.

Referenced by BaseData::getCentroidPtShape().

virtual bool isAdmissible (  )  const [inline, virtual]

Shapes are admissible to the local map if they're large enough not to be noise.

Reimplemented in BrickData, EllipseData, LineData, PointData, PolygonData, PyramidData, and SphereData.

Definition at line 164 of file BaseData.h.

virtual bool isInside ( const Point  )  const [inline, virtual]

returns if a point is inside the shape or not. Reimplemented by EllipseData, SphereData, PolygonData

Reimplemented in PolygonData, and SphereData.

Definition at line 170 of file BaseData.h.

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, BlobData, BrickData, EllipseData, LineData, PointData, PolygonData, PyramidData, and SphereData.

bool isMobile (  )  const

bool isSameColorAs ( const ShapeRoot other  )  const

bool isSameTypeAs ( const ShapeRoot other  )  const

bool isType ( ShapeType_t  this_type  )  const

Test the shape type.

Definition at line 135 of file BaseData.cc.

Referenced by BaseData::isSameTypeAs().

void N ( std::string const &  _name = ""  ) 

Definition at line 120 of file BaseData.cc.

BaseData & operator= ( const BaseData other  ) 

Copy operator. Assumes "&other =? this" check is done by the sub class calling this operator.

Definition at line 80 of file BaseData.cc.

Referenced by PolygonData::operator=(), PointData::operator=(), and LineData::operator=().

virtual void printParams (  )  const [pure virtual]

Prints information about this shape.

Implemented in AgentData, BlobData, BrickData, EllipseData, LineData, PointData, PolygonData, PyramidData, and SphereData.

virtual void projectToGround ( const NEWMAT::Matrix &  camToBase,
const NEWMAT::ColumnVector &  groundplane 
) [pure virtual]

Project to ground plane using given matrix.

Implemented in AgentData, BlobData, BrickData, EllipseData, LineData, PointData, PolygonData, PyramidData, and SphereData.

virtual Sketch<bool>* render (  )  const [pure virtual]

Render into a sketch space.

Implemented in AgentData, BlobData, BrickData, EllipseData, LineData, PointData, PolygonData, PyramidData, and SphereData.

Referenced by BaseData::getRendering().

void setColor ( rgb  new_color  ) 

Get the color.

Reimplemented in PolygonData.

Definition at line 149 of file BaseData.cc.

void setColor ( std::string const &  color_name  ) 

Set shape and rendering sketch color.

Referenced by BlobData::BlobData(), and BaseData::inheritFrom().

void setConfidence ( const BaseData other  )  [inline]

Confidence. returns confidence of Data. Reimpletemnted in PolygonData.

Definition at line 124 of file BaseData.h.

void setLastMatchId ( int  _lmid  )  [inline]

Definition at line 105 of file BaseData.h.

void setMobile ( bool  mobility  ) 

Mobility.

Definition at line 158 of file BaseData.cc.

void setName ( const std::string &  _name  )  [inline]

Definition at line 108 of file BaseData.h.

Referenced by BaseData::N(), and BaseData::V().

void setParentId ( int  _pid  )  [inline]

Definition at line 88 of file BaseData.h.

Referenced by BaseData::inheritFrom().

void setViewable ( bool  _viewable  )  [inline]

Definition at line 91 of file BaseData.h.

Referenced by BaseData::N(), and BaseData::V().

virtual bool updateParams ( const ShapeRoot other,
bool  forceUpdate = false 
) [pure virtual]

Update shape parameters after matching to another shape.

Implemented in AgentData, BlobData, BrickData, EllipseData, LineData, PointData, PolygonData, PyramidData, and SphereData.

void V ( std::string const &  _name = ""  ) 

Definition at line 115 of file BaseData.cc.


Friends And Related Function Documentation

friend class ShapeRoot [friend]

Definition at line 50 of file BaseData.h.

friend class ShapeSpace [friend]

Definition at line 51 of file BaseData.h.


Member Data Documentation

rgb color_rgb [protected]

int lastMatchId [protected]

Id of the shape in the preceding space that gave rise to or was matched to this one.

Definition at line 59 of file BaseData.h.

Referenced by BaseData::getLastMatchId(), ShapeSpace::importShape(), BaseData::operator=(), and BaseData::setLastMatchId().

std::string name [protected]

ShapeType_t type [protected]

Definition at line 56 of file BaseData.h.

Referenced by BaseData::getTypeName(), BaseData::isType(), and BaseData::operator=().


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

DualCoding 3.0beta
Generated Wed Oct 4 00:02:25 2006 by Doxygen 1.4.7