Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
LocalizationParticleData.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef _LOCALIZATIONPARTICLEDATA_H_ 00003 #define _LOCALIZATIONPARTICLEDATA_H_ 00004 00005 #include "Shared/Measures.h" // coordinate_t; AngPi data member 00006 #include "Shared/newmat/newmat.h" 00007 00008 #include "BaseData.h" // superclass 00009 #include "PFShapeLocalization.h" 00010 #include "Point.h" // Point data member 00011 #include "ShapeTypes.h" // localizationParticleDataType 00012 00013 namespace DualCoding { 00014 00015 class ShapeRoot; 00016 class SketchSpace; 00017 template<typename T> class Sketch; 00018 00019 class LocalizationParticleData : public BaseData { 00020 private: 00021 Point location; 00022 AngTwoPi orientation; 00023 float weight; 00024 00025 public: 00026 00027 //! Constructor 00028 LocalizationParticleData(ShapeSpace& _space, const Point &_location, const AngTwoPi _orientation, const float _weight=0); 00029 00030 LocalizationParticleData(ShapeSpace &space, const PFShapeLocalization::particle_type& particle); 00031 00032 //! Copy constructor 00033 LocalizationParticleData(const LocalizationParticleData &other); 00034 00035 static ShapeType_t getStaticType() { return localizationParticleDataType; } 00036 00037 DATASTUFF_H(LocalizationParticleData); 00038 00039 //! Centroid. (Virtual in BaseData.) 00040 virtual Point getCentroid() const { return location; } 00041 void setCentroid(const Point& other) { location.setCoords(other); } 00042 00043 AngTwoPi getOrientation() const { return orientation; } 00044 void setOrientation(const AngTwoPi _orientation) {orientation = _orientation; } 00045 00046 float getWeight() const { return weight;} 00047 void setWeight(float w) { weight=w; } 00048 00049 virtual bool isMatchFor(const ShapeRoot& other) const; 00050 00051 virtual bool updateParams(const ShapeRoot&, bool force=false); 00052 00053 //! Print information about this shape. (Virtual in BaseData.) 00054 virtual void printParams() const; 00055 00056 virtual void applyTransform(const NEWMAT::Matrix& Tmat, const ReferenceFrameType_t newref=unspecified); 00057 00058 virtual void projectToGround(const NEWMAT::Matrix&, 00059 const NEWMAT::ColumnVector&) {} 00060 00061 virtual unsigned short getDimension() const { return 2; } 00062 00063 LocalizationParticleData& operator=(const LocalizationParticleData &other); 00064 00065 private: 00066 //! Render into a sketch space and return pointer. (Private.) 00067 virtual Sketch<bool>* render() const; 00068 00069 00070 }; 00071 00072 } // namespace 00073 00074 #endif |
DualCoding 4.0 |
Generated Thu Nov 22 00:52:36 2007 by Doxygen 1.5.4 |