Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

PointData.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef _POINTDATA_H_
00003 #define _POINTDATA_H_
00004 
00005 #include <vector>
00006 #include <iostream>
00007 #include <string>
00008 
00009 #include "Shared/fmatSpatial.h"
00010 
00011 #include "BaseData.h"    // superclass
00012 #include "Point.h"       // Point data member
00013 #include "ShapeTypes.h"  // pointDataType
00014 
00015 namespace DualCoding {
00016 
00017 class ShapeRoot;
00018 class SketchSpace;
00019 template<typename T> class Sketch;
00020 
00021 class PointData : public BaseData, public Point {
00022 public:
00023   //! Constructor
00024   PointData(ShapeSpace& _space, const Point &c);
00025 
00026   static ShapeType_t getStaticType() { return pointDataType; }
00027 
00028   DATASTUFF_H(PointData);
00029   
00030   //! Centroid. (Virtual in BaseData.)
00031   virtual Point getCentroid() const { return *this; }  
00032   
00033   BoundingBox2D getBoundingBox() const {
00034     return BoundingBox2D(coords);
00035   }
00036 
00037   //! Match points based on their parameters.  (Virtual in BaseData.)
00038   virtual bool isMatchFor(const ShapeRoot& other) const;
00039 
00040   virtual void mergeWith(const ShapeRoot& other);
00041 
00042   virtual bool updateParams(const ShapeRoot& other, bool force=false);
00043 
00044   //! Print information about this shape. (Virtual in BaseData.)
00045   virtual void printParams() const;
00046   
00047   //! Transformations. (Virtual in BaseData.)
00048   virtual void applyTransform(const fmat::Transform& Tmat, const ReferenceFrameType_t newref=unspecified);
00049   
00050   //! Project to ground
00051   virtual void projectToGround(const fmat::Transform& camToBase,
00052              const PlaneEquation& groundplane);
00053 
00054   //! Extraction.
00055   static std::vector<ShapeRoot> extractPoints(const Sketch<bool>& sketch);
00056 
00057   virtual unsigned short getDimension() const { return 0; }
00058 
00059   PointData& operator=(const PointData&);
00060   
00061 private:
00062   //! Render into a sketch space and return reference. (Private.)
00063   virtual Sketch<bool>* render() const;
00064   //@}
00065 
00066 };
00067 
00068 } // namespace
00069 
00070 #endif

DualCoding 5.1CVS
Generated Mon May 9 04:56:27 2016 by Doxygen 1.6.3