STIRA
0.1
|
A class to represent a 2D point. More...
#include <Point.h>
Public Member Functions | |
Point () | |
Constructor. | |
Point (T xNew, T yNew, coordinateMode mode=COORDINATES_CARTESIAN, pointType myType=TYPE_DEFAULT) | |
Constructor. | |
~Point () | |
destructor. | |
T | GetRadius () const |
gets radial coordinate of point, in case of polar coordinates | |
T | GetTheta () const |
gets angular coordinate of point, in case of polar coordinates | |
pointType | GetType () const |
gets radial coordinate of point, in case of polar coordinates | |
void | SetType (pointType type) |
gets angular coordinate of point, in case of polar coordinates | |
coordinateMode | GetMode () const |
void | SetXAndY (T xNew, T yNew) |
sets new cartesian coordinates for point More... | |
void | SetRadiusAndTheta (T radius, T theta) |
sets new coordinates for point | |
double | GetDistance (Point other=Point< T >(0, 0)) |
gets Euclidian distance to other point More... | |
void | ToPolar (T xCenter=0, T yCenter=0) |
transforms current point coordinates to polar coordinates | |
void | ToCartesian () |
transforms current point coordinates to cartesian coordinates | |
void | MirrorOrigin () |
mirrors current point towards the origin | |
void | MirrorXaxis () |
mirrors current point towards X axis | |
void | MirrorYaxis () |
mirrors current point towards Y axis | |
Point< double > | ToDouble () |
Point< int > | ToInt () |
bool | operator== (Point< T > otherPoint) |
overloaded operator to compare two Points More... | |
bool | operator!= (Point< T > otherPoint) |
overloaded operator to compare two Points More... | |
Point< T > | operator+ (Point< T > otherPoint) |
overloaded operator to add two Points More... | |
Point< T > | operator- (Point< T > otherPoint) |
overloaded operator to subtract two Points More... | |
T | operator* (Point< T > otherPoint) |
overloaded operator to compute the dot product of two segments (0,0)-thisPoint and (0,0)-otherPoint Source http://www.topcoder.com/tc?d1=tutorials&d2=geometry1&module=Static More... | |
T | operator^ (Point< T > otherPoint) |
overloaded operator to compute the norm of the cross product of two segments (0,0)-thisPoint and (0,0)-otherPoint Remark: this just computes the NORM; the real result of an actual cross product would be a vector perpendicular to the plane Source http://www.topcoder.com/tc?d1=tutorials&d2=geometry1&module=Static More... | |
Static Public Member Functions | |
static Point< double > | GetCentroid (std::vector< Point< T > > vPoints) |
Public Attributes | |
T | x |
x coordinate of the point | |
T | y |
y coordinate of the point | |
A class to represent a 2D point.
double stira::common::Point< T >::GetDistance | ( | Point< T > | other = Point<T>(0,0) | ) |
gets Euclidian distance to other point
other | other point to compute distance to |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
Referenced by stira::common::Curve::ConnectToCurve(), and stira::common::Curve::GetClosestEndPoints().
bool stira::common::Point< T >::operator!= | ( | Point< T > | otherPoint | ) |
overloaded operator to compare two Points
otherPoint | other point to check inequality |
T stira::common::Point< T >::operator* | ( | Point< T > | otherPoint | ) |
overloaded operator to compute the dot product of two segments (0,0)-thisPoint and (0,0)-otherPoint Source http://www.topcoder.com/tc?d1=tutorials&d2=geometry1&module=Static
otherPoint | other point to compute dot product with |
References stira::common::Point< T >::GetType(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
Point< T > stira::common::Point< T >::operator+ | ( | Point< T > | otherPoint | ) |
overloaded operator to add two Points
otherPoint | other point to add |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
Point< T > stira::common::Point< T >::operator- | ( | Point< T > | otherPoint | ) |
overloaded operator to subtract two Points
otherPoint | other point to subtract |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
bool stira::common::Point< T >::operator== | ( | Point< T > | otherPoint | ) |
overloaded operator to compare two Points
otherPoint | other point to check equality |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
T stira::common::Point< T >::operator^ | ( | Point< T > | otherPoint | ) |
overloaded operator to compute the norm of the cross product of two segments (0,0)-thisPoint and (0,0)-otherPoint Remark: this just computes the NORM; the real result of an actual cross product would be a vector perpendicular to the plane Source http://www.topcoder.com/tc?d1=tutorials&d2=geometry1&module=Static
otherPoint | other point to compute cross product norm with |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
void stira::common::Point< T >::SetXAndY | ( | T | xNew, |
T | yNew | ||
) |
sets new cartesian coordinates for point
xNew | new x coordinate to set |
yNew | new y coordinate to set |
Referenced by stira::imageanalysis::WatershedMeyer< T >::CreateLabelsIntensitiesImage(), and stira::imageanalysis::CannyEdgeDetector::~CannyEdgeDetector().