Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
AprilTags::GLine2D Class Reference

A 2D line. More...

#include <GLine2D.h>

List of all members.

Public Member Functions

float getDx () const
float getDy () const
float getFirst () const
float getLineCoordinate (const std::pair< float, float > &p)
std::pair< float, float > getPointOfCoordinate (float coord)
 The inverse of getLineCoordinate.
float getSecond () const
 GLine2D ()
 Create a new line.
 GLine2D (float slope, float b)
 Create a new line.
 GLine2D (float dX, float dY, const std::pair< float, float > &pt)
 Create a new line.
 GLine2D (const std::pair< float, float > &p1, const std::pair< float, float > &p2)
 Create a new line through two points.
std::pair< float, float > intersectionWith (const GLine2D &line) const
 Compute the point where two lines intersect, or (-1,0) if the lines are parallel.

Static Public Member Functions

static GLine2D lsqFitXYW (const std::vector< XYWeight > &xyweights)

Protected Member Functions

void normalizeP ()
void normalizeSlope ()

Private Attributes

bool didNormalizeP
bool didNormalizeSlope
float dx
float dy
std::pair< float, float > p
 A point the line passes through; when normalized, it is the point closest to the origin (hence perpendicular to the line)

Detailed Description

A 2D line.

Definition at line 14 of file GLine2D.h.


Constructor & Destructor Documentation

Create a new line.

Definition at line 5 of file GLine2D.cc.

AprilTags::GLine2D::GLine2D ( float  slope,
float  b 
)

Create a new line.

Definition at line 8 of file GLine2D.cc.

AprilTags::GLine2D::GLine2D ( float  dX,
float  dY,
const std::pair< float, float > &  pt 
)

Create a new line.

Definition at line 11 of file GLine2D.cc.

AprilTags::GLine2D::GLine2D ( const std::pair< float, float > &  p1,
const std::pair< float, float > &  p2 
)

Create a new line through two points.

Definition at line 14 of file GLine2D.cc.


Member Function Documentation

float AprilTags::GLine2D::getDx ( ) const [inline]

Definition at line 56 of file GLine2D.h.

float AprilTags::GLine2D::getDy ( ) const [inline]

Definition at line 57 of file GLine2D.h.

float AprilTags::GLine2D::getFirst ( ) const [inline]

Definition at line 58 of file GLine2D.h.

float AprilTags::GLine2D::getLineCoordinate ( const std::pair< float, float > &  p)

Get the coordinate of a point (on this line), with zero corresponding to the point on the that is perpendicular toa line passing through the origin and the line.

Definition at line 17 of file GLine2D.cc.

std::pair< float, float > AprilTags::GLine2D::getPointOfCoordinate ( float  coord)

The inverse of getLineCoordinate.

Definition at line 22 of file GLine2D.cc.

float AprilTags::GLine2D::getSecond ( ) const [inline]

Definition at line 59 of file GLine2D.h.

std::pair< float, float > AprilTags::GLine2D::intersectionWith ( const GLine2D line) const

Compute the point where two lines intersect, or (-1,0) if the lines are parallel.

Definition at line 27 of file GLine2D.cc.

GLine2D AprilTags::GLine2D::lsqFitXYW ( const std::vector< XYWeight > &  xyweights) [static]

Definition at line 54 of file GLine2D.cc.

void AprilTags::GLine2D::normalizeP ( ) [protected]

Definition at line 98 of file GLine2D.cc.

void AprilTags::GLine2D::normalizeSlope ( ) [protected]

Definition at line 89 of file GLine2D.cc.


Member Data Documentation

Definition at line 69 of file GLine2D.h.

Definition at line 68 of file GLine2D.h.

float AprilTags::GLine2D::dx [private]

Definition at line 66 of file GLine2D.h.

float AprilTags::GLine2D::dy [private]

Definition at line 66 of file GLine2D.h.

std::pair<float,float> AprilTags::GLine2D::p [private]

A point the line passes through; when normalized, it is the point closest to the origin (hence perpendicular to the line)

Definition at line 67 of file GLine2D.h.


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


apriltags
Author(s): Mitchell Wills
autogenerated on Thu Aug 27 2015 12:23:28