#include <ariaUtil.h>
Inheritance diagram for ArLineSegment:
Public Member Functions | |
ArLineSegment (ArPose pose1, ArPose pose2) | |
Constructor with endpoints as poses. | |
ArLineSegment (double x1, double y1, double x2, double y2) | |
Constructor with endpoints. | |
ArLineSegment () | |
Constructor. | |
const double | getA (void) const |
Gets the A line parameter. | |
const double | getB (void) const |
Gets the B line parameter. | |
const double | getC (void) const |
Gets the C line parameter. | |
double | getDistToLine (const ArPose pose) |
Gets the distance from the line to a point. | |
ArPose | getEndPoint1 (void) const |
Gets the endpoint of X1, Y1. | |
ArPose | getEndPoint2 (void) const |
Gets the endpoint of X2, Y2. | |
const ArLine * | getLine (void) const |
double | getPerpDist (const ArPose pose) |
Gets the distance from the line to a point perp with the line. | |
bool | getPerpPoint (const ArPose *pose, ArPose *perpPoint) |
Gets the point at which the given pose is perpindicular to the line. | |
bool | getPerpPoint (ArPose pose, ArPose *perpPoint) |
Gets the point at which the given pose is perpindicular to the line. | |
const double | getX1 (void) const |
Gets the x coordinate of the first endpoint (only use on segments). | |
const double | getX2 (void) const |
Gets the x coordinate of the second endpoint (only use on segments). | |
const double | getY1 (void) const |
Gets the y coordinate of the first endpoint (only use on segments). | |
const double | getY2 (void) const |
Gets the y coordinate of the second endpoint (only use on segments). | |
bool | intersects (ArLineSegment *line, ArPose *pose) |
Sees if a line segment intersects with this segment. | |
bool | intersects (const ArLine *line, ArPose *pose) |
Sees if a line intersects with this segment. | |
const bool | linePointIsInSegment (ArPose *pose) const |
Internal function for seeing if a point on our line is within our segment. | |
void | newEndPoints (double x1, double y1, double x2, double y2) |
Gives the line some new end points (makes it a segment). | |
virtual | ~ArLineSegment () |
Destructor. | |
Protected Attributes | |
ArPose | myIntersection |
ArLine | myLine |
ArLine | myPerpLine |
double | myX1 |
Internal function to set the parameters of the line from endpoitns. | |
double | myX2 |
Internal function to set the parameters of the line from endpoitns. | |
double | myY1 |
Internal function to set the parameters of the line from endpoitns. | |
double | myY2 |
Internal function to set the parameters of the line from endpoitns. |
Definition at line 852 of file ariaUtil.h.
|
Gets the distance from the line to a point.
Definition at line 966 of file ariaUtil.h. References ArPose::findDistanceTo(), ArUtil::findMin(), getEndPoint1(), getEndPoint2(), intersects(), and ArLine::makeLinePerp(). Referenced by ArActionTriangleDriveTo::findTriangle(). |
|
Gets the distance from the line to a point perp with the line.
Definition at line 952 of file ariaUtil.h. References ArPose::findDistanceTo(), intersects(), and ArLine::makeLinePerp(). Referenced by ArForbiddenRangeDevice::processReadings(). |
|
Gets the point at which the given pose is perpindicular to the line. This is just a faster version for certain critical spots than the above one... use the above one if you can... If the point is beyond either segment end this will return false
Definition at line 939 of file ariaUtil.h. References intersects(), and ArLine::makeLinePerp(). |
|
Gets the point at which the given pose is perpindicular to the line. If the point is beyond either segment end this will return false
Definition at line 923 of file ariaUtil.h. References intersects(), and ArLine::makeLinePerp(). Referenced by ArSick::filterAddAndCleanCumulative(). |
|
Sees if a line segment intersects with this segment.
Definition at line 902 of file ariaUtil.h. References ArLine::intersects(), linePointIsInSegment(), and ArPose::setPose(). |
|
Sees if a line intersects with this segment.
Definition at line 883 of file ariaUtil.h. References ArLine::intersects(), linePointIsInSegment(), and ArPose::setPose(). Referenced by getDistToLine(), getPerpDist(), and getPerpPoint(). |