Point Class Reference#include <Point.h>
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 |
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 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
Constructors.
Definition at line 22 of file Point.cc.
Constructors.
Definition at line 27 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
NEWMAT::ColumnVector& getCoords |
( |
|
) |
const [inline] |
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().
coordinate_t coordZ |
( |
|
) |
const [inline] |
Definition at line 46 of file Point.h.
Referenced by MapBuilder::determineNextGazePoint(), Pilot::CreepToShape::DoStart(), Pilot::PushTarget::DoStart(), MapBuilder::filterGroundShapes(), Point::getHeightAbovePoint(), Pilot::GotoTarget::getNextWaypoint(), Pilot::GotoTarget::getPointAtAngle(), LineData::lineEquation_abc_xz(), MapBuilder::moveAgent(), Lookout::moveHeadToPoint(), DualCoding::operator<<(), Point::operator==(), Point::printData(), TargetData::printParams(), Lookout::processTrackEvent(), SphereData::projectToGround(), PyramidData::projectToGround(), BrickData::projectToGround(), Lookout::scanAlongLine(), Lookout::scanAlongPolygon(), MapBuilder::setAgent(), and TargetData::update_derived_properties().
void setCoords |
( |
const Point & |
otherPt |
) |
|
Set position.
Set Position.
Definition at line 32 of file Point.cc.
Referenced by LineData::balanceEndPointVert(), MapBuilder::filterGroundShapes(), BlobData::findCorners(), BlobData::findCornersShapeFit(), DualCoding::findRadialDistancesFromPoint(), MapBuilder::isLineVisible(), Region::mostDistantPtFrom(), Point::operator=(), SphereData::projectToGround(), PyramidData::projectToGround(), BrickData::projectToGround(), LocalizationParticleData::setCentroid(), SphereData::setCentroidPt(), EllipseData::setCentroidPt(), AgentData::setCentroidPt(), LineData::setEndPts(), and AgentData::setOrientation().
void setCoords |
( |
coordinate_t |
_x, |
|
|
coordinate_t |
_y, |
|
|
coordinate_t |
z = 0 | |
|
) |
| | |
Set position.
Set Position.
Definition at line 36 of file Point.cc.
float distanceFrom |
( |
const Point & |
other |
) |
const |
Euclidean distance from another point to this one.
Definition at line 41 of file Point.cc.
Referenced by DualCoding::findRadialDistancesFromPoint(), PolygonData::formsNewEndline(), Pilot::GotoTarget::getNextWaypoint(), PathPlanner::initialize(), PolygonData::isClosed(), SphereData::isInside(), PolygonData::isInside(), MapBuilder::isLineVisible(), SphereData::isMatchFor(), PointData::isMatchFor(), LocalizationParticleData::isMatchFor(), EndPoint::isMatchFor(), EllipseData::isMatchFor(), BlobData::isMatchFor(), PolygonData::tryImportNewEndline(), TargetData::update_derived_properties(), and LineData::update_derived_properties().
float xyDistanceFrom |
( |
const Point & |
other |
) |
const |
bool isLeftOf |
( |
const Point & |
other, |
|
|
float |
distance = 0 | |
|
) |
| | const |
bool isRightOf |
( |
const Point & |
other, |
|
|
float |
distance = 0 | |
|
) |
| | const |
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).
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 | |
|
) |
| | |
Apply a transformation matrix to translate and/or rotate the point.
Definition at line 91 of file Point.cc.
Referenced by TargetData::applyTransform(), SphereData::applyTransform(), PyramidData::applyTransform(), PointData::applyTransform(), LocalizationParticleData::applyTransform(), LineData::applyTransform(), EllipseData::applyTransform(), BrickData::applyTransform(), BlobData::applyTransform(), AgentData::applyTransform(), and Lookout::moveHeadToPoint().
void projectToGround |
( |
const NEWMAT::Matrix & |
camToBase, |
|
|
const NEWMAT::ColumnVector & |
groundPlane | |
|
) |
| | |
void projectToGround |
( |
int |
xres, |
|
|
int |
yres, |
|
|
const NEWMAT::ColumnVector & |
ground_plane | |
|
) |
| | |
Point operator * |
( |
float |
b |
) |
const |
Point & operator *= |
( |
float |
b |
) |
|
Point operator/ |
( |
float |
b |
) |
const |
Point & operator/= |
( |
float |
b |
) |
|
bool operator!= |
( |
const Point & |
b |
) |
const [inline] |
void makeRefFrameCompatible |
( |
const Point & |
other |
) |
[private] |
Friends And Related Function Documentation
Member Data Documentation
Definition at line 27 of file Point.h.
Referenced by Point::applyTransform(), Point::coordX(), Point::coordY(), Point::coordZ(), Point::distanceFrom(), BlobData::getCentroid(), Point::getCoords(), Point::getHeightAbovePoint(), MapBuilder::isLineVisible(), MapBuilder::isPointVisible(), Lookout::moveHeadToPoint(), 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(), Point::xyDistanceFrom(), and Point::xyNorm().
Definition at line 28 of file Point.h.
Referenced by Point::applyTransform(), Point::getRefFrameType(), Point::isAbove(), Point::isLeftOf(), Point::makeRefFrameCompatible(), Point::operator *(), Point::operator/(), DualCoding::operator<<(), Point::operator=(), PointData::PointData(), Point::projectToGround(), and Point::setRefFrameType().
The documentation for this class was generated from the following files:
|