Point Class Reference#include <Point.h>
Inheritance diagram for Point:
[legend]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 |
| 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 |
| void | applyTransform (const NEWMAT::Matrix &T) |
| | Apply a transformation matrix to translate and/or rotate the point.
|
| float | getHeightAbovePoint (const Point &groundPoint, const NEWMAT::ColumnVector &groundplane) |
| 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 |
| Point & | operator+= (const Point &b) |
| Point | operator- (const Point &b) const |
| Point & | operator-= (const Point &b) |
| Point | operator * (float b) const |
| Point & | operator *= (float b) |
| Point | operator/ (float b) const |
| Point & | operator/= (float b) |
| bool | operator== (const Point &b) const |
| bool | operator!= (const Point &b) const |
| Point & | operator= (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 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 |
Friends |
| class | EndPoint |
Constructor & Destructor Documentation
Constructors.
Definition at line 20 of file Point.cc.
Constructors.
Definition at line 25 of file Point.cc.
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
| void applyTransform |
( |
const NEWMAT::Matrix & |
T |
) |
|
Definition at line 44 of file Point.h.
Referenced by LineData::balanceEndPointVert(), EndPoint::checkValidity(), DualCoding::countBorderPixelFit(), MapBuilder::defineGazePts(), MapBuilder::determineNextGazePoint(), Lookout::executeRequest(), MapBuilder::filterGroundShapes(), Region::findCentralMoment(), BlobData::findCornersDerivative(), BlobData::findCornersDiagonal(), DualCoding::findEdgePoint(), DualCoding::findRadialDistancesFromPoint(), LineData::firstPtCoord(), PointData::getBoundingBox(), LineData::getBoundingBox(), Point::getHeightAbovePoint(), 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(), DualCoding::operator<<(), Point::operator==(), LineData::perpendicularDistanceFrom(), LineData::pointOnLine(), LineData::pointsOnSameSide(), Point::printData(), LineData::printEnds(), SphereData::printParams(), PointData::printParams(), LineData::printParams(), EllipseData::printParams(), SphereData::projectToGround(), PyramidData::projectToGround(), Point::projectToGround(), BrickData::projectToGround(), Lookout::scanAlongLine(), Lookout::scanArea(), LineData::secondPtCoord(), MapBuilder::setAgent(), LineData::setDrawCoords(), and AgentData::updateOrientation().
Definition at line 45 of file Point.h.
Referenced by LineData::balanceEndPointVert(), EndPoint::checkValidity(), DualCoding::countBorderPixelFit(), MapBuilder::defineGazePts(), MapBuilder::determineNextGazePoint(), Lookout::executeRequest(), MapBuilder::filterGroundShapes(), Region::findCentralMoment(), BlobData::findCornersDerivative(), BlobData::findCornersDiagonal(), DualCoding::findEdgePoint(), DualCoding::findRadialDistancesFromPoint(), LineData::firstPtCoord(), PointData::getBoundingBox(), LineData::getBoundingBox(), Point::getHeightAbovePoint(), LineData::intersectionWithLine(), LineData::intersectsLine(), Point::isAbove(), MapBuilder::isBadGazePoint(), Region::isContained(), PolygonData::isInside(), Point::isLeftOf(), PathPlanner::isLMVisible(), LineData::LineData(), LineData::lineEquation_abc(), LineData::lineEquation_mb(), DualCoding::operator<<(), Point::operator==(), LineData::perpendicularDistanceFrom(), LineData::pointOnLine(), LineData::pointsOnSameSide(), Point::printData(), LineData::printEnds(), SphereData::printParams(), PointData::printParams(), LineData::printParams(), EllipseData::printParams(), SphereData::projectToGround(), PyramidData::projectToGround(), Point::projectToGround(), BrickData::projectToGround(), Lookout::scanAlongLine(), Lookout::scanArea(), LineData::secondPtCoord(), MapBuilder::setAgent(), LineData::setDrawCoords(), and AgentData::updateOrientation().
Definition at line 46 of file Point.h.
Referenced by MapBuilder::determineNextGazePoint(), Lookout::executeRequest(), MapBuilder::filterGroundShapes(), LineData::lineEquation_abc_xz(), DualCoding::operator<<(), Point::operator==(), Point::printData(), SphereData::projectToGround(), PyramidData::projectToGround(), BrickData::projectToGround(), Lookout::scanAlongLine(), Lookout::scanArea(), and MapBuilder::setAgent().
| float distanceFrom |
( |
const Point & |
other |
) |
const |
Euclidean distance from another point to this one.
Definition at line 39 of file Point.cc.
Referenced by DualCoding::findRadialDistancesFromPoint(), PolygonData::formsNewEndline(), PathPlanner::initialize(), PolygonData::isClosed(), SphereData::isInside(), PolygonData::isInside(), MapBuilder::isLineVisible(), SphereData::isMatchFor(), PointData::isMatchFor(), EndPoint::isMatchFor(), EllipseData::isMatchFor(), BlobData::isMatchFor(), and LineData::update_derived_properties().
| NEWMAT::ColumnVector& getCoords |
( |
|
) |
const [inline] |
| float getHeightAbovePoint |
( |
const Point & |
groundPoint, |
|
|
const NEWMAT::ColumnVector & |
groundplane | |
|
) |
| | |
| bool isAbove |
( |
const Point & |
other, |
|
|
float |
distance = 0 | |
|
) |
| | const |
| bool isBelow |
( |
const Point & |
other, |
|
|
float |
distance = 0 | |
|
) |
| | const |
These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).
These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).
These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).
These functions return true based on relative positions, assuming points line in a 2D plane (z coordinate is ignored).
| bool isLeftOf |
( |
const Point & |
other, |
|
|
float |
distance = 0 | |
|
) |
| | const |
| 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 64 of file Point.cc.
| Point operator * |
( |
float |
b |
) |
const |
| Point & operator *= |
( |
float |
b |
) |
|
| bool operator!= |
( |
const Point & |
b |
) |
const [inline] |
| Point operator/ |
( |
float |
b |
) |
const |
| Point & operator/= |
( |
float |
b |
) |
|
| void projectToGround |
( |
int |
xres, |
|
|
int |
yres, |
|
|
const NEWMAT::ColumnVector & |
ground_plane | |
|
) |
| | |
| void projectToGround |
( |
const NEWMAT::Matrix & |
camToBase, |
|
|
const NEWMAT::ColumnVector & |
groundPlane | |
|
) |
| | |
Set Position.
Definition at line 34 of file Point.cc.
| void setCoords |
( |
const Point & |
otherPt |
) |
|
Set Position.
Definition at line 30 of file Point.cc.
Referenced by LineData::balanceEndPointVert(), MapBuilder::filterGroundShapes(), BlobData::findCorners(), BlobData::findCornersShapeFit(), MapBuilder::isLineVisible(), Region::mostDistantPtFrom(), Point::operator=(), SphereData::projectToGround(), PyramidData::projectToGround(), BrickData::projectToGround(), SphereData::setCentroidPt(), EllipseData::setCentroidPt(), AgentData::setCentroidPt(), LineData::setEndPts(), and AgentData::setOrientation().
| float xyDistanceFrom |
( |
const Point & |
other |
) |
const |
Friends And Related Function Documentation
Member Data Documentation
Definition at line 27 of file Point.h.
Referenced by Point::applyTransform(), BlobData::applyTransform(), Point::coordX(), Point::coordY(), Point::coordZ(), Point::distanceFrom(), Lookout::executeRequest(), BlobData::getCentroid(), Point::getCoords(), Point::getHeightAbovePoint(), MapBuilder::isLineVisible(), MapBuilder::isPointVisible(), Point::operator *(), Point::operator *=(), Point::operator+(), Point::operator+=(), Point::operator-(), Point::operator-=(), Point::operator/(), Point::operator/=(), Point::Point(), BlobData::printParams(), AgentData::printParams(), Point::projectToGround(), BlobData::projectToGround(), Point::setCoords(), EndPoint::updateParams(), EllipseData::updateProperties(), and Point::xyDistanceFrom().
The documentation for this class was generated from the following files:
|