Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Point Class Reference

#include <Point.h>

Inheritance diagram for Point:

List of all members.


Detailed Description

We define Point as a separate lightweight class because it is used as a component of all the xxxData classes, and we don't want to nest these structures.

Definition at line 24 of file Point.h.


Public Member Functions

 Point (const Point &otherPt)
 Copy constructor.
virtual ~Point ()
 Destructor.
NEWMAT::ColumnVector & getCoords () const
coordinate_t coordX () const
coordinate_t coordY () const
coordinate_t coordZ () const
ReferenceFrameType_t getRefFrameType () const
void setRefFrameType (const ReferenceFrameType_t ref)
 Set reference frame type.
float distanceFrom (const Point &other) const
 Euclidean distance from another point to this one.
float xyDistanceFrom (const Point &other) const
float xyNorm () const
float getHeightAbovePoint (const Point &groundPoint, const NEWMAT::ColumnVector &groundplane)
void applyTransform (const NEWMAT::Matrix &T, const ReferenceFrameType_t newref=unspecified)
 Apply a transformation matrix to translate and/or rotate the point.
void projectToGround (const NEWMAT::Matrix &camToBase, const NEWMAT::ColumnVector &groundPlane)
 projects this to ground plane according to camToBase matrix
void projectToGround (int xres, int yres, const NEWMAT::ColumnVector &ground_plane)
Point operator+ (const Point &b) const
Pointoperator+= (const Point &b)
Point operator- (const Point &b) const
Pointoperator-= (const Point &b)
Point operator * (float b) const
Pointoperator *= (float b)
Point operator/ (float b) const
Pointoperator/= (float b)
bool operator== (const Point &b) const
bool operator!= (const Point &b) const
Pointoperator= (const Point &b)
void printData ()
 Point (void)
 Constructors.
 Point (coordinate_t const &xp, coordinate_t const &yp, coordinate_t zp=0, ReferenceFrameType_t ref=unspecified)
 Constructors.
 Point (const NEWMAT::ColumnVector &c, ReferenceFrameType_t ref=unspecified)
 Constructors.
void setCoords (const Point &otherPt)
 Set position.
void setCoords (coordinate_t _x, coordinate_t _y, coordinate_t z=0)
 Set position.
bool isLeftOf (const Point &other, float distance=0) const
 These functions need a ShapeSpace argument because left/right depends on reference frame type.
bool isRightOf (const Point &other, float distance=0) const
 These functions need a ShapeSpace argument because left/right depends on reference frame type.
bool isAbove (const Point &other, float distance=0) const
 These functions need a ShapeSpace argument because left/right depends on reference frame type.
bool isBelow (const Point &other, float distance=0) const
 These functions need a ShapeSpace argument because left/right depends on reference frame type.
bool isBetween (const Point &other1, const Point &other2) const
 These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).
bool isBetween (const Shape< LineData > &line1, const Shape< LineData > &line2) const
 These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).
bool isBetween (const LineData &line1, const LineData &line2) const
 These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).
bool isInside (const std::vector< LineData > &bound) const
 These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).

Public Attributes

NEWMAT::ColumnVector coords
ReferenceFrameType_t refFrameType

Private Member Functions

void makeRefFrameCompatible (const Point &other)

Friends

class EndPoint

Constructor & Destructor Documentation

Point ( void   ) 

Constructors.

Definition at line 18 of file Point.cc.

Referenced by Point::operator *(), Point::operator+(), Point::operator-(), and Point::operator/().

Point ( coordinate_t const &  xp,
coordinate_t const &  yp,
coordinate_t  zp = 0,
ReferenceFrameType_t  ref = unspecified 
)

Constructors.

Definition at line 22 of file Point.cc.

Point ( const NEWMAT::ColumnVector &  c,
ReferenceFrameType_t  ref = unspecified 
)

Constructors.

Definition at line 27 of file Point.cc.

Point ( const Point otherPt  )  [inline]

Copy constructor.

Definition at line 38 of file Point.h.

virtual ~Point (  )  [inline, virtual]

Destructor.

Definition at line 41 of file Point.h.


Member Function Documentation

NEWMAT::ColumnVector& getCoords (  )  const [inline]

Definition at line 43 of file Point.h.

Referenced by PointData::extractPoints(), BlobData::render(), and LineData::setDrawCoords().

coordinate_t coordX (  )  const [inline]

Definition at line 44 of file Point.h.

Referenced by LineData::balanceEndPointVert(), EndPoint::checkValidity(), DualCoding::countBorderPixelFit(), MapBuilder::determineNextGazePoint(), Pilot::CreepToShapeLocalize::DoStart(), Pilot::CreepToShape::DoStart(), Pilot::PushTarget::DoStart(), Pilot::GotoTarget::DoStart(), MapBuilder::filterGroundShapes(), Region::findCentralMoment(), BlobData::findCornersDerivative(), BlobData::findCornersDiagonal(), DualCoding::findEdgePoint(), DualCoding::findRadialDistancesFromPoint(), LineData::firstPtCoord(), PointData::getBoundingBox(), LineData::getBoundingBox(), Point::getHeightAbovePoint(), Pilot::GotoTarget::getNextWaypoint(), LineData::houghTransform(), PathPlanner::initialize(), LineData::intersectionWithLine(), LineData::intersectsLine(), Point::isAbove(), MapBuilder::isBadGazePoint(), Region::isContained(), PolygonData::isInside(), Point::isLeftOf(), PathPlanner::isLMVisible(), LineData::LineData(), LineData::lineEquation_abc(), LineData::lineEquation_abc_xz(), LineData::lineEquation_mb(), PfRoot::loadLms(), Lookout::moveHeadToPoint(), DualCoding::operator<<(), Point::operator==(), LineData::perpendicularDistanceFrom(), LineData::pointOnLine(), LineData::pointsOnSameSide(), Point::printData(), LineData::printEnds(), TargetData::printParams(), SphereData::printParams(), PointData::printParams(), LocalizationParticleData::printParams(), LineData::printParams(), Pilot::Localize::processMap(), Lookout::processTrackEvent(), SphereData::projectToGround(), PyramidData::projectToGround(), Point::projectToGround(), BrickData::projectToGround(), Lookout::scanAlongLine(), Lookout::scanAlongPolygon(), LineData::secondPtCoord(), MapBuilder::setAgent(), LineData::setDrawCoords(), TargetData::update_derived_properties(), and AgentData::updateOrientation().

coordinate_t coordY (  )  const [inline]

Definition at line 45 of file Point.h.

Referenced by LineData::balanceEndPointVert(), EndPoint::checkValidity(), DualCoding::countBorderPixelFit(), MapBuilder::determineNextGazePoint(), Pilot::CreepToShapeLocalize::DoStart(), Pilot::CreepToShape::DoStart(), Pilot::PushTarget::DoStart(), Pilot::GotoTarget::DoStart(), MapBuilder::filterGroundShapes(), Region::findCentralMoment(), BlobData::findCornersDerivative(), BlobData::findCornersDiagonal(), DualCoding::findEdgePoint(), DualCoding::findRadialDistancesFromPoint(), LineData::firstPtCoord(), PointData::getBoundingBox(), LineData::getBoundingBox(), Point::getHeightAbovePoint(), Pilot::GotoTarget::getNextWaypoint(), LineData::houghTransform(), PathPlanner::initialize(), LineData::intersectionWithLine(), LineData::intersectsLine(), Point::isAbove(), MapBuilder::isBadGazePoint(), Region::isContained(), PolygonData::isInside(), Point::isLeftOf(), PathPlanner::isLMVisible(), LineData::LineData(), LineData::lineEquation_abc(), LineData::lineEquation_mb(), PfRoot::loadLms(), Lookout::moveHeadToPoint(), DualCoding::operator<<(), Point::operator==(), LineData::perpendicularDistanceFrom(), LineData::pointOnLine(), LineData::pointsOnSameSide(), Point::printData(), LineData::printEnds(), TargetData::printParams(), SphereData::printParams(), PointData::printParams(), LocalizationParticleData::printParams(), LineData::printParams(), Pilot::Localize::processMap(), Lookout::processTrackEvent(), SphereData::projectToGround(), PyramidData::projectToGround(), Point::projectToGround(), BrickData::projectToGround(), Lookout::scanAlongLine(), Lookout::scanAlongPolygon(), LineData::secondPtCoord(), MapBuilder::setAgent(), LineData::setDrawCoords(), TargetData::update_derived_properties(), and AgentData::updateOrientation().

ReferenceFrameType_t getRefFrameType (  )  const [inline]

Definition at line 47 of file Point.h.

Referenced by Lookout::moveHeadToPoint().

void setCoords ( coordinate_t  _x,
coordinate_t  _y,
coordinate_t  z = 0 
)

Set position.

Set Position.

Definition at line 36 of file Point.cc.

void setRefFrameType ( const ReferenceFrameType_t  ref  )  [inline]

float xyDistanceFrom ( const Point other  )  const

Definition at line 45 of file Point.cc.

Referenced by EllipseData::updateProperties().

float xyNorm (  )  const

Definition at line 51 of file Point.cc.

bool isLeftOf ( const Point other,
float  distance = 0 
) const

These functions need a ShapeSpace argument because left/right depends on reference frame type.

Definition at line 53 of file Point.cc.

Referenced by PyramidData::findBoundingTriangle(), Point::isRightOf(), DualCoding::leftMost(), LineData::leftPt(), IsLeftOf::operator()(), DualCoding::rightMost(), and LineData::rightPt().

bool isRightOf ( const Point other,
float  distance = 0 
) const

These functions need a ShapeSpace argument because left/right depends on reference frame type.

Definition at line 68 of file Point.cc.

Referenced by BrickData::addBrickWithTwoSides().

bool isAbove ( const Point other,
float  distance = 0 
) const

These functions need a ShapeSpace argument because left/right depends on reference frame type.

Definition at line 71 of file Point.cc.

Referenced by DualCoding::bottomMost(), LineData::bottomPt(), Point::isBelow(), IsAbove::operator()(), DualCoding::topMost(), and LineData::topPt().

bool isBelow ( const Point other,
float  distance = 0 
) const

These functions need a ShapeSpace argument because left/right depends on reference frame type.

Definition at line 86 of file Point.cc.

Referenced by BrickData::addBrickWithTwoSides().

bool isBetween ( const Point other1,
const Point other2 
) const

These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).

bool isBetween ( const Shape< LineData > &  line1,
const Shape< LineData > &  line2 
) const

These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).

bool isBetween ( const LineData line1,
const LineData line2 
) const

These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).

bool isInside ( const std::vector< LineData > &  bound  )  const

These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).

float getHeightAbovePoint ( const Point groundPoint,
const NEWMAT::ColumnVector &  groundplane 
)

Definition at line 152 of file Point.cc.

Referenced by PyramidData::projectToGround(), and BrickData::projectToGround().

void projectToGround ( const NEWMAT::Matrix &  camToBase,
const NEWMAT::ColumnVector &  groundPlane 
)

void projectToGround ( int  xres,
int  yres,
const NEWMAT::ColumnVector &  ground_plane 
)

Definition at line 128 of file Point.cc.

Point operator+ ( const Point b  )  const

Definition at line 180 of file Point.cc.

Point & operator+= ( const Point b  ) 

Definition at line 182 of file Point.cc.

Point operator- ( const Point b  )  const

Definition at line 188 of file Point.cc.

Point & operator-= ( const Point b  ) 

Definition at line 190 of file Point.cc.

Point operator * ( float  b  )  const

Definition at line 201 of file Point.cc.

Point & operator *= ( float  b  ) 

Definition at line 203 of file Point.cc.

Point operator/ ( float  b  )  const

Definition at line 209 of file Point.cc.

Point & operator/= ( float  b  ) 

Definition at line 211 of file Point.cc.

bool operator== ( const Point b  )  const

Definition at line 216 of file Point.cc.

Referenced by Point::operator!=().

bool operator!= ( const Point b  )  const [inline]

Definition at line 104 of file Point.h.

Point& operator= ( const Point b  )  [inline]

Definition at line 106 of file Point.h.

void printData (  ) 

Definition at line 242 of file Point.cc.

void makeRefFrameCompatible ( const Point other  )  [private]

Definition at line 196 of file Point.cc.

Referenced by Point::operator+=(), and Point::operator-=().


Friends And Related Function Documentation

friend class EndPoint [friend]

Definition at line 115 of file Point.h.


Member Data Documentation


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

DualCoding 4.0
Generated Thu Nov 22 00:54:01 2007 by Doxygen 1.5.4