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

cHV_Seg Class Reference

seg horizontal ou vertical More...

#include <geo_utils.h>

Inheritance diagram for cHV_Seg:

cSeg List of all members.

Public Member Functions

 cHV_Seg ()
 constructeur par default

 cHV_Seg (cPoint2D &pA, cPoint2D &pB)
 construit un segment de 'pA' à 'pB'

void Set (cPoint2D &pA, cPoint2D &pB)
bool Get_Intersection (cHV_Seg &seg, cHV_Seg &result)
 calcule l'intersection de ce segment avec seg et met le resultat ds cHv_Seg

int Get_Complementaires (cHV_Seg &seg, cHV_Seg &complementaire1, cHV_Seg &complementaire2)
 calcule l'intersection entre ce segment et 'seg', predond : 'seg' contenu dans ce segment!!!

bool Contient_Point (cPoint2D &A)
 bool Contient_Point(cPoint2D & A);

int Get_Exact_Intersection (cSeg &seg, cPoint2D &A, cHV_Seg &seg_result)
 int Get_Exact_Intersection(cSeg &seg , cPoint2D & A , cHV_Seg& seg_result);

bool Is_Horizontal ()
 true si horizontal, false si vertical

bool Contient (cHV_Seg &seg)
bool On_Same_Line (cHV_Seg &seg)

Private Attributes

bool bHorizontal
 true si le segment est horizontal, false si vertical


Detailed Description

seg horizontal ou vertical

les coordonnes sont ds l'ordre croissant!

Definition at line 209 of file geo_utils.h.


Constructor & Destructor Documentation

cHV_Seg::cHV_Seg  )  [inline]
 

constructeur par default

Definition at line 213 of file geo_utils.h.

References bHorizontal.

cHV_Seg::cHV_Seg cPoint2D pA,
cPoint2D pB
 

construit un segment de 'pA' à 'pB'

Definition at line 199 of file geo_utils.cpp.

References bHorizontal, cPoint2D::Get_X(), cPoint2D::Get_Y(), and cPoint2D::Set().


Member Function Documentation

bool cHV_Seg::Contient cHV_Seg seg  ) 
 

Definition at line 370 of file geo_utils.cpp.

References Contient(), and Get_Intersection().

Referenced by Contient(), Get_Complementaires(), and cGame_World::Split_Portal().

bool cHV_Seg::Contient_Point cPoint2D A  ) 
 

bool Contient_Point(cPoint2D & A);

Definition at line 445 of file geo_utils.cpp.

References bHorizontal, Contient_Point(), cSeg::Get_p0(), cSeg::Get_p1(), cPoint2D::Get_X(), and cPoint2D::Get_Y().

Referenced by Contient_Point(), and cGame_World::Do_Segment_Intersect_Walls().

int cHV_Seg::Get_Complementaires cHV_Seg seg,
cHV_Seg complementaire1,
cHV_Seg complementaire2
 

calcule l'intersection entre ce segment et 'seg', predond : 'seg' contenu dans ce segment!!!

return : 0 -> pas d'intersection 1 -> egalité entre les segments ( this == seg) 2 -> seg est strictement contenu ds ce segment, comp1 et comp2 contiennent les segments complementaires tq que complementaire1 soit au dessus de complementaire 2 ( abcisse inférieure, ou ord inférieure) this = comp1<->inter<->comp2 3 -> complementaire1 est valide, complementaire 2 est vide this = comp1<->inter 4 -> complementaire2 est valide, complementaire 1 est vide this = inter<->comp2

Definition at line 399 of file geo_utils.cpp.

References Contient(), Get_Complementaires(), Get_Intersection(), cSeg::Get_p0(), cSeg::Get_p1(), and Set().

Referenced by cGame_World::Declare_Portal(), Get_Complementaires(), and cGame_World::Split_Portal().

int cHV_Seg::Get_Exact_Intersection cSeg seg,
cPoint2D A,
cHV_Seg seg_result
 

int Get_Exact_Intersection(cSeg &seg , cPoint2D & A , cHV_Seg& seg_result);

bool cHV_Seg::Get_Intersection cHV_Seg seg,
cHV_Seg result
 

calcule l'intersection de ce segment avec seg et met le resultat ds cHv_Seg

retourne false si intersection vide, true sinon
si l'intersection est un point, le seg resultat est reduit a un point

Definition at line 286 of file geo_utils.cpp.

References bHorizontal, Get_Intersection(), cSeg::Get_p0(), cPoint2D::Get_X(), cPoint2D::Get_Y(), Is_Horizontal(), cSeg::p0, cSeg::p1, Set(), cPoint2D::X, and cPoint2D::Y.

Referenced by cGame_World::Add_Wall_And_Portals(), Contient(), Get_Complementaires(), and Get_Intersection().

bool cHV_Seg::Is_Horizontal  )  [inline]
 

true si horizontal, false si vertical

Definition at line 247 of file geo_utils.h.

References bHorizontal.

Referenced by Get_Intersection(), cSquare_Area::Manage_Paralell_Portals(), and On_Same_Line().

bool cHV_Seg::On_Same_Line cHV_Seg seg  ) 
 

Definition at line 467 of file geo_utils.cpp.

References bHorizontal, cSeg::Get_p0(), Is_Horizontal(), On_Same_Line(), cPoint2D::X, and cPoint2D::Y.

Referenced by cSquare_Area::Add_Portal(), and On_Same_Line().

void cHV_Seg::Set cPoint2D pA,
cPoint2D pB
[virtual]
 

Reimplemented from cSeg.

Definition at line 242 of file geo_utils.cpp.

References bHorizontal, cPoint2D::Get_X(), cPoint2D::Get_Y(), cPoint2D::Set(), and Set().

Referenced by cGame_World::Add_Wall_And_Portals(), cParalell_Portal::cParalell_Portal(), cGame_World::Creates_And_Add_Portals(), cGame_World::Do_Segment_Intersect_Walls(), Get_Complementaires(), cPositive_Rectangle::Get_Est_Seg(), Get_Intersection(), cPositive_Rectangle::Get_Nord_Seg(), cPositive_Rectangle::Get_Ouest_Seg(), cPositive_Rectangle::Get_Sud_Seg(), cHV_Wall::Get_Wall_Seg(), cSquare_Area::Manage_Paralell_Portals(), Set(), and cGame_World::Split_Portal().


Member Data Documentation

bool cHV_Seg::bHorizontal [private]
 

true si le segment est horizontal, false si vertical

Definition at line 253 of file geo_utils.h.

Referenced by cHV_Seg(), Contient_Point(), Get_Intersection(), Is_Horizontal(), On_Same_Line(), 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