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

cSeg Class Reference

segment More...

#include <geo_utils.h>

Inheritance diagram for cSeg:

cHV_Seg List of all members.

Public Member Functions

 cSeg ()
 constructeur par default, seg=[0,0]->[0,0]

 cSeg (cPoint2D &pA, cPoint2D &pB)
 construit un segment entre 'pA' et 'pB'

void Get_Middle (cPoint2D &p)
 met dans 'p' le milieu du segment

float Get_Square_Distance_From_Point (cPoint2D &pA)
 retourne la distance entre 'pA' et ce segment

cPoint2DGet_p0 ()
 retourne une reference vers le premier point du segment

cPoint2DGet_p1 ()
 retourne une reference vers le second point du segment

bool operator== (cSeg &seg2)
 retourne vrai si ce seg est egal à 'seg2'

unsigned int Get_Square_Length ()
 retourne la longueur au carré de ce segment

virtual void Set (cPoint2D &pA, cPoint2D &pB)

Protected Attributes

cPoint2D p0
 point de départ du segment

cPoint2D p1
 point d'arrivée du segment


Friends

std::ostream & operator<< (std::ostream &os, const cSeg &ex)

Detailed Description

segment

Definition at line 165 of file geo_utils.h.


Constructor & Destructor Documentation

cSeg::cSeg  )  [inline]
 

constructeur par default, seg=[0,0]->[0,0]

Definition at line 170 of file geo_utils.h.

References p0, p1, and cPoint2D::Set().

cSeg::cSeg cPoint2D pA,
cPoint2D pB
[inline]
 

construit un segment entre 'pA' et 'pB'

Definition at line 177 of file geo_utils.h.

References p0, and p1.


Member Function Documentation

void cSeg::Get_Middle cPoint2D p  ) 
 

met dans 'p' le milieu du segment

Definition at line 171 of file geo_utils.cpp.

References Get_Middle(), cPoint2D::Get_X(), cPoint2D::Get_Y(), p0, p1, and cPoint2D::Set().

Referenced by cGame_World::Add_Wall_And_Portals(), Get_Middle(), cSquare_Area::Manage_Paralell_Portals(), and cGame_World::Split_Portal().

cPoint2D& cSeg::Get_p0  )  [inline]
 

retourne une reference vers le premier point du segment

Definition at line 188 of file geo_utils.h.

References p0.

Referenced by cSquare_Area::Add_Paralells_Portals(), cSquare_Area::Add_Portal(), cSquare_Area::Add_Wall(), cGame_World::Add_Wall_And_Portals(), cHV_Seg::Contient_Point(), cGame_World::Creates_And_Add_Portals(), cGame_World::Declare_Portal(), cSquare_Area_Debug_Displayer::Display(), cGame_World::Do_Segment_Intersect_Walls(), cHV_Seg::Get_Complementaires(), cHV_Seg::Get_Intersection(), cHV_Seg::On_Same_Line(), operator<<(), operator==(), and cGame_World::Split_Portal().

cPoint2D& cSeg::Get_p1  )  [inline]
 

retourne une reference vers le second point du segment

Definition at line 190 of file geo_utils.h.

References p1.

Referenced by cSquare_Area::Add_Paralells_Portals(), cSquare_Area::Add_Portal(), cSquare_Area::Add_Wall(), cGame_World::Add_Wall_And_Portals(), cHV_Seg::Contient_Point(), cGame_World::Creates_And_Add_Portals(), cGame_World::Declare_Portal(), cSquare_Area_Debug_Displayer::Display(), cGame_World::Do_Segment_Intersect_Walls(), cHV_Seg::Get_Complementaires(), operator<<(), operator==(), and cGame_World::Split_Portal().

float cSeg::Get_Square_Distance_From_Point cPoint2D pA  ) 
 

retourne la distance entre 'pA' et ce segment

Definition at line 122 of file geo_utils.cpp.

References Get_Square_Distance_From_Point(), cPoint2D::Get_X(), cPoint2D::Get_Y(), p0, and p1.

Referenced by Get_Square_Distance_From_Point().

unsigned int cSeg::Get_Square_Length  ) 
 

retourne la longueur au carré de ce segment

Definition at line 184 of file geo_utils.cpp.

References cPoint2D::Get_X(), cPoint2D::Get_Y(), p0, and p1.

Referenced by cGame_World::Do_Segment_Intersect_Walls().

bool cSeg::operator== cSeg seg2  ) 
 

retourne vrai si ce seg est egal à 'seg2'

Definition at line 177 of file geo_utils.cpp.

References Get_p0(), Get_p1(), operator==(), p0, and p1.

Referenced by operator==().

virtual void cSeg::Set cPoint2D pA,
cPoint2D pB
[inline, virtual]
 

Reimplemented in cHV_Seg.

Definition at line 196 of file geo_utils.h.

References p0, p1, and Set().

Referenced by Set().


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  os,
const cSeg ex
[friend]
 

Definition at line 167 of file geo_utils.h.


Member Data Documentation

cPoint2D cSeg::p0 [protected]
 

point de départ du segment

Definition at line 199 of file geo_utils.h.

Referenced by cSeg(), cHV_Seg::Get_Intersection(), Get_Middle(), Get_p0(), Get_Square_Distance_From_Point(), Get_Square_Length(), operator==(), and Set().

cPoint2D cSeg::p1 [protected]
 

point d'arrivée du segment

Definition at line 200 of file geo_utils.h.

Referenced by cSeg(), cHV_Seg::Get_Intersection(), Get_Middle(), Get_p1(), Get_Square_Distance_From_Point(), Get_Square_Length(), operator==(), and Set().


The documentation for this class was generated from the following files:
Generated on Fri May 21 19:22:37 2004 for LIBELL by doxygen 1.3.7