JeVoisBase  1.5
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Point2D.H File Reference
#include <jevoisbase/Components/RoadFinder/Types.H>
#include <jevoisbase/Components/RoadFinder/Promotions.H>
#include <cmath>
#include <string>
#include <vector>
Include dependency graph for Point2D.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Point2D< T >
 This is a basic class to encode 2D integer coordinates. More...
 

Functions

template<class T , class U >
bool operator== (const Point2D< T > &p1, const Point2D< U > &p2)
 == operator More...
 
template<class T , class U >
bool operator!= (const Point2D< T > &p1, const Point2D< U > &p2)
 != operator More...
 
template<class T , class U >
bool operator> (const Point2D< T > &p1, const Point2D< U > &p2)
 

operator

More...
 
template<class T , class U >
bool operator< (const Point2D< T > &p1, const Point2D< U > &p2)
 < operator More...
 
template<class T >
bool pnpoly (const std::vector< Point2D< T > > &polygon, const Point2D< T > &p)
 Is a point inside a polygon? More...
 
template<class T >
Point2D< T > centroid (const std::vector< Point2D< T > > &polygon)
 Where is the center of mass of a polygon? More...
 
template<class T >
double area (const std::vector< Point2D< T > > &polygon, const bool getsigned=false)
 What is the area of a polygon? More...
 
template<class T >
double angleMeasure (const Point2D< T > &A, const Point2D< T > &B, const Point2D< T > &C)
 What is the measure (in radians, signed -pi to pi) of angle BAC? More...
 
template<class T >
bool pnTriangle (const Point2D< T > &A, const Point2D< T > &B, const Point2D< T > &C, const Point2D< T > &P)
 determine if a point P is inside a triangle with vertices A,B,C More...
 

Function Documentation

◆ angleMeasure()

template<class T >
double angleMeasure ( const Point2D< T > &  A,
const Point2D< T > &  B,
const Point2D< T > &  C 
)
inline

What is the measure (in radians, signed -pi to pi) of angle BAC?

Definition at line 434 of file Point2D.H.

References Point2D< T >::distance(), Point2D< T >::i, and Point2D< T >::j.

◆ area()

template<class T >
double area ( const std::vector< Point2D< T > > &  polygon,
const bool  getsigned = false 
)
inline

What is the area of a polygon?

Definition at line 422 of file Point2D.H.

References Point2D< T >::i, and Point2D< T >::j.

Referenced by ObjectTracker::process().

◆ centroid()

template<class T >
Point2D< T > centroid ( const std::vector< Point2D< T > > &  polygon)
inline

Where is the center of mass of a polygon?

Definition at line 412 of file Point2D.H.

References Point2D< T >::i.

◆ operator!=()

template<class T , class U >
bool operator!= ( const Point2D< T > &  p1,
const Point2D< U > &  p2 
)
inline

!= operator

Definition at line 326 of file Point2D.H.

References Point2D< T >::i, and Point2D< T >::j.

◆ operator<()

template<class T , class U >
bool operator< ( const Point2D< T > &  p1,
const Point2D< U > &  p2 
)
inline

< operator

Definition at line 336 of file Point2D.H.

References Point2D< T >::i.

◆ operator==()

template<class T , class U >
bool operator== ( const Point2D< T > &  p1,
const Point2D< U > &  p2 
)
inline

== operator

Definition at line 321 of file Point2D.H.

References Point2D< T >::i, and Point2D< T >::j.

◆ operator>()

template<class T , class U >
bool operator> ( const Point2D< T > &  p1,
const Point2D< U > &  p2 
)
inline

operator

Definition at line 331 of file Point2D.H.

References Point2D< T >::i, and Point2D< T >::j.

◆ pnpoly()

template<class T >
bool pnpoly ( const std::vector< Point2D< T > > &  polygon,
const Point2D< T > &  p 
)
inline

Is a point inside a polygon?

Definition at line 395 of file Point2D.H.

References Point2D< T >::i, and Point2D< T >::j.

◆ pnTriangle()

template<class T >
bool pnTriangle ( const Point2D< T > &  A,
const Point2D< T > &  B,
const Point2D< T > &  C,
const Point2D< T > &  P 
)
inline

determine if a point P is inside a triangle with vertices A,B,C

Definition at line 451 of file Point2D.H.

References Point2D< T >::i, and Point2D< T >::j.