Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Point2D< T > Class Template Reference

un point de 2 dimmentions More...

#include <trigo.h>

List of all members.

Public Member Functions

 Point2D ()
 Point2D (T _x, T _y)
void Set (T _x, T _y)
void Zero ()
BOOL operator== (Point2D< T > &src)
BOOL operator!= (Point2D< T > &src)
void operator= (Point3D< T > &src)
void operator= (Point2D< T > &src)
void operator+= (Point2D< T > &src)
Point2D< T > operator- (Point2D< T > &src)
Point2D< T > operator+ (Point2D< T > &src)
Point2D< T > operator * (double coef)
Point2D< T > operator/ (double coef)
void operator/= (double coef)
void operator *= (double coef)
double Power ()
BOOL IsOnSegment (Point2D< T > &a, Point2D< T > &b, double *alpha=NULL)
BOOL IsOnLine (Point2D< T > &a, Point2D< T > &b, double *alpha=NULL, double precision=PRECISION)
BOOL IsOnTriangle (Point2D< T > &a, Point2D< T > &b, Point2D< T > &c, double *alphaBC, double *alphaAPP, Point2D< T > *pp=NULL)
 Determine si un point (p) est contenu dans un triangle [abc].

BOOL IsOnQuadrilatere (Point2D< T > &a, Point2D< T > &b, Point2D< T > &c, Point2D< T > &d, double *alphaX=NULL, double *alphaY=NULL)
 Le point fait il partie du quadrilatere ?

BOOL IsOnRectangle (Point2D< T > &a, Point2D< T > &c, double *alphaX=NULL, double *alphaY=NULL)
 Le point fait il partie du rectangle delimité par les points a et d?

BOOL GetRelativePtOnQuadrilatere (Point2D< T > &a, Point2D< T > &b, Point2D< T > &c, Point2D< T > &d, double *deltaX, double *deltaY)
 Calcul les "coordonnée local relative" d'un point p dans un quadrilatere [abcd].

BOOL GetRelativePtOn2Lines (Point2D< T > &a, Point2D< T > &b, Point2D< T > &c, Point2D< T > &d, double *alpha)
void ToNormalVector (BOOL asTrigo=TRUE)

Public Attributes

x
y


Detailed Description

template<class T>
class Point2D< T >

un point de 2 dimmentions

Definition at line 73 of file trigo.h.


Constructor & Destructor Documentation

template<class T>
Point2D< T >::Point2D  )  [inline]
 

Definition at line 80 of file trigo.h.

template<class T>
Point2D< T >::Point2D _x,
_y
[inline]
 

Definition at line 81 of file trigo.h.


Member Function Documentation

template<class T>
BOOL Point2D< T >::GetRelativePtOn2Lines Point2D< T > &  a,
Point2D< T > &  b,
Point2D< T > &  c,
Point2D< T > &  d,
double *  alpha
 

Definition at line 473 of file trigo.h.

References alpha, BOOL(), c, Point2D< T >::x, and Point2D< T >::y.

Referenced by Point2D< T >::GetRelativePtOnQuadrilatere().

template<class T>
BOOL Point2D< T >::GetRelativePtOnQuadrilatere Point2D< T > &  a,
Point2D< T > &  b,
Point2D< T > &  c,
Point2D< T > &  d,
double *  alphaX,
double *  alphaY
 

Calcul les "coordonnée local relative" d'un point p dans un quadrilatere [abcd].

Ex.: Example "rectangulaire" resultat pp={2.5,2.5}

Point2D<float> a,b,c,d,p,pp; a.Set(0,0); b.Set(10,0); c.Set(10,10); c.Set(0,10); p.Set(2.5,2.5); BOOL res = p.GetRelativePtOnQuadrilatere(&a,&b,&c,&d,&pp);

Ex.: Example "quelquonque" resultat pp={2.5,2.5}

Point2D<float> a,b,c,d,p,pp; a.Set(0,0); b.Set(20,0); c.Set(10,20); c.Set(0,10); p.Set(2.5,2.5); BOOL res = p.GetRelativePbOnQuadrilatere(&a,&b,&c,&d,&pp);

Definition at line 460 of file trigo.h.

References BOOL(), c, and Point2D< T >::GetRelativePtOn2Lines().

Referenced by Primitive::GetLocalPos(), and Point2D< T >::IsOnQuadrilatere().

template<class T>
BOOL Point2D< T >::IsOnLine Point2D< T > &  a,
Point2D< T > &  b,
double *  alpha = NULL,
double  precision = PRECISION
 

Definition at line 326 of file trigo.h.

References alpha, and BOOL().

Referenced by Point2D< T >::IsOnSegment().

template<class T>
BOOL Point2D< T >::IsOnQuadrilatere Point2D< T > &  a,
Point2D< T > &  b,
Point2D< T > &  c,
Point2D< T > &  d,
double *  alphaX = NULL,
double *  alphaY = NULL
 

Le point fait il partie du quadrilatere ?

Definition at line 425 of file trigo.h.

References BOOL(), c, Point2D< T >::GetRelativePtOnQuadrilatere(), and res.

Referenced by Point2D< T >::IsOnRectangle().

template<class T>
BOOL Point2D< T >::IsOnRectangle Point2D< T > &  a,
Point2D< T > &  c,
double *  alphaX = NULL,
double *  alphaY = NULL
 

Le point fait il partie du rectangle delimité par les points a et d?

Definition at line 416 of file trigo.h.

References b, BOOL(), c, and Point2D< T >::IsOnQuadrilatere().

template<class T>
BOOL Point2D< T >::IsOnSegment Point2D< T > &  a,
Point2D< T > &  b,
double *  alpha = NULL
 

Definition at line 317 of file trigo.h.

References alpha, BOOL(), and Point2D< T >::IsOnLine().

Referenced by Point2D< T >::IsOnTriangle().

template<class T>
BOOL Point2D< T >::IsOnTriangle Point2D< T > &  a,
Point2D< T > &  b,
Point2D< T > &  c,
double *  alphaBC,
double *  alphaAPP,
Point2D< T > *  pp = NULL
 

Determine si un point (p) est contenu dans un triangle [abc].

Si les pointeur alhpa sont données, il donne la projection sur les segments qui compose le tirangle en pourcentage par rapport a leur premier sommet.

Point2D<float> a,b,c,p,pp; a.Set(0,0); b.Set(10,0); c.Set(0,10); p.Set(2,2); double alphaBC,alphaAPP; BOOL res = p.IsOnTriangle(&a,&b,&c,&alphaBC,&alphaAPP,&pp);

Definition at line 393 of file trigo.h.

References BOOL(), c, LinearEqu2D< T >::GetCrossPtFromLine(), and Point2D< T >::IsOnSegment().

Referenced by Point3D< T >::IsOnTriangle().

template<class T>
Point2D< T > Point2D< T >::operator * double  coef  ) 
 

Definition at line 283 of file trigo.h.

References Point2D< T >::x, and Point2D< T >::y.

template<class T>
void Point2D< T >::operator *= double  coef  )  [inline]
 

Definition at line 94 of file trigo.h.

template<class T>
BOOL Point2D< T >::operator!= Point2D< T > &  src  )  [inline]
 

Definition at line 85 of file trigo.h.

template<class T>
Point2D< T > Point2D< T >::operator+ Point2D< T > &  src  ) 
 

Definition at line 274 of file trigo.h.

References src, Point2D< T >::x, and Point2D< T >::y.

template<class T>
void Point2D< T >::operator+= Point2D< T > &  src  )  [inline]
 

Definition at line 88 of file trigo.h.

template<class T>
Point2D< T > Point2D< T >::operator- Point2D< T > &  src  ) 
 

Definition at line 265 of file trigo.h.

References src, Point2D< T >::x, and Point2D< T >::y.

template<class T>
Point2D< T > Point2D< T >::operator/ double  coef  ) 
 

Definition at line 292 of file trigo.h.

References Point2D< T >::x, and Point2D< T >::y.

template<class T>
void Point2D< T >::operator/= double  coef  )  [inline]
 

Definition at line 93 of file trigo.h.

template<class T>
void Point2D< T >::operator= Point2D< T > &  src  )  [inline]
 

Definition at line 87 of file trigo.h.

template<class T>
void Point2D< T >::operator= Point3D< T > &  src  ) 
 

Definition at line 301 of file trigo.h.

References src.

template<class T>
BOOL Point2D< T >::operator== Point2D< T > &  src  )  [inline]
 

Definition at line 84 of file trigo.h.

template<class T>
double Point2D< T >::Power  )  [inline]
 

Definition at line 95 of file trigo.h.

template<class T>
void Point2D< T >::Set _x,
_y
[inline]
 

Definition at line 82 of file trigo.h.

Referenced by Cursor::GetHotSpot(), Primitive::GetLocalPos(), and Point2D< LayoutDouble >::Point2D().

template<class T>
void Point2D< T >::ToNormalVector BOOL  asTrigo = TRUE  ) 
 

Definition at line 361 of file trigo.h.

template<class T>
void Point2D< T >::Zero  )  [inline]
 

Definition at line 83 of file trigo.h.

Referenced by Point2D< LayoutDouble >::Point2D().


Member Data Documentation

template<class T>
T Point2D< T >::x
 

Definition at line 76 of file trigo.h.

Referenced by Region::Compute(), ControlEngine::DrawCursor(), Inertia::GetMoyValue(), Point2D< T >::GetRelativePtOn2Lines(), ResizingAndRotateControl::OnHover(), EventInertia::OnInertia(), Slider::OnMouseMove(), Tutorial::BaseDemo::OnWinMove(), Point2D< T >::operator *(), Point2D< T >::operator+(), Point2D< T >::operator-(), Point2D< T >::operator/(), and Text3D::SetClipping().

template<class T>
T Point2D< T >::y
 

Definition at line 77 of file trigo.h.

Referenced by Region::Compute(), ControlEngine::DrawCursor(), Inertia::GetMoyValue(), Point2D< T >::GetRelativePtOn2Lines(), ResizingAndRotateControl::OnHover(), EventInertia::OnInertia(), Tutorial::BaseDemo::OnWinMove(), Point2D< T >::operator *(), Point2D< T >::operator+(), Point2D< T >::operator-(), Point2D< T >::operator/(), and Text3D::SetClipping().


The documentation for this class was generated from the following file:
Generated on Fri Aug 20 19:21:30 2004 for 3d Controls by doxygen 1.3.6