Homepage Demos Overview Downloads Tutorials Reference
Credits

Point Class Reference

#include <Point.h>

Inheritance diagram for Point:

Inheritance graph
[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
Pointoperator+= (const Point &b)
Point operator- (const Point &b) const
Pointoperator-= (const Point &b)
Point operator * (float b) const
Pointoperator *= (float b)
Point operator/ (float b) const
Pointoperator/= (float b)
bool operator== (const Point &b) const
bool operator!= (const Point &b) const
Pointoperator= (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

Point ( void   ) 

Constructors.

Definition at line 16 of file Point.cc.

Referenced by Point::operator *(), Point::operator+(), Point::operator-(), and Point::operator/().

Point ( coordinate_t const &  xp,
coordinate_t const &  yp,
coordinate_t  zp = 0,
ReferenceFrameType_t  ref = unspecified 
)

Constructors.

Definition at line 20 of file Point.cc.

Point ( const NEWMAT::ColumnVector &  c,
ReferenceFrameType_t  ref = unspecified 
)

Constructors.

Definition at line 25 of file Point.cc.

Point ( const Point otherPt  )  [inline]

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  ) 

NEWMAT::ColumnVector& getCoords (  )  const [inline]

Definition at line 43 of file Point.h.

Referenced by BlobData::render(), and LineData::setDrawCoords().

float getHeightAbovePoint ( const Point groundPoint,
const NEWMAT::ColumnVector &  groundplane 
)

Definition at line 141 of file Point.cc.

Referenced by PyramidData::projectToGround(), and BrickData::projectToGround().

bool isAbove ( const Point other,
float  distance = 0 
) const

These functions need a ShapeSpace argument because left/right depends on reference frame type.

Definition at line 67 of file Point.cc.

Referenced by DualCoding::bottomMost(), LineData::bottomPt(), Point::isBelow(), DualCoding::topMost(), and LineData::topPt().

bool isBelow ( const Point other,
float  distance = 0 
) const

These functions need a ShapeSpace argument because left/right depends on reference frame type.

Definition at line 82 of file Point.cc.

Referenced by BrickData::addBrickWithTwoSides().

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 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 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 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).

bool isLeftOf ( const Point other,
float  distance = 0 
) const

These functions need a ShapeSpace argument because left/right depends on reference frame type.

Definition at line 49 of file Point.cc.

Referenced by PyramidData::findBoundingTriangle(), Point::isRightOf(), DualCoding::leftMost(), LineData::leftPt(), DualCoding::rightMost(), and LineData::rightPt().

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

Definition at line 182 of file Point.cc.

Point & operator *= ( float  b  ) 

Definition at line 184 of file Point.cc.

bool operator!= ( const Point b  )  const [inline]

Definition at line 103 of file Point.h.

Point operator+ ( const Point b  )  const

Definition at line 166 of file Point.cc.

Point & operator+= ( const Point b  ) 

Definition at line 168 of file Point.cc.

Point operator- ( const Point b  )  const

Definition at line 174 of file Point.cc.

Point & operator-= ( const Point b  ) 

Definition at line 176 of file Point.cc.

Point operator/ ( float  b  )  const

Definition at line 190 of file Point.cc.

Point & operator/= ( float  b  ) 

Definition at line 192 of file Point.cc.

Point& operator= ( const Point b  )  [inline]

Definition at line 105 of file Point.h.

bool operator== ( const Point b  )  const

Definition at line 197 of file Point.cc.

Referenced by Point::operator!=().

void printData (  ) 

Definition at line 209 of file Point.cc.

void projectToGround ( int  xres,
int  yres,
const NEWMAT::ColumnVector &  ground_plane 
)

Definition at line 119 of file Point.cc.

void projectToGround ( const NEWMAT::Matrix &  camToBase,
const NEWMAT::ColumnVector &  groundPlane 
)

void setCoords ( coordinate_t  _x,
coordinate_t  _y,
coordinate_t  z = 0 
)

Set Position.

Definition at line 34 of file Point.cc.

void setRefFrameType ( const ReferenceFrameType_t  ref  )  [inline]

Set reference frame type.

Definition at line 55 of file Point.h.

Referenced by EllipseData::EllipseData(), and LineData::update_derived_properties().

float xyDistanceFrom ( const Point other  )  const

Definition at line 43 of file Point.cc.

Referenced by EllipseData::updateProperties().


Friends And Related Function Documentation

friend class EndPoint [friend]

Definition at line 114 of file Point.h.


Member Data Documentation


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

DualCoding 3.0beta
Generated Wed Oct 4 00:02:29 2006 by Doxygen 1.4.7