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

cHV_Wall Class Reference

un cHVWall est un mur basé sur un segment horizontal ou vertical More...

#include <HV_bsp.h>

Inheritance diagram for cHV_Wall:

cWall List of all members.

Public Member Functions

 cHV_Wall ()
 default contructeur ( mur(0,0)->(0,0) )

 cHV_Wall (cWall &wall)
 copy constructeur

 cHV_Wall (cPoint2D &A, cPoint2D &B)
 construit un mur de A à B

BSP_POSITION_POINT Get_Position_Point (cPoint2D &A)
 retourne la position d'un point par rapport à ce divider

void Get_Wall_Seg (cHV_Seg &wall)
 copie dans 'wall' le segment de ce murs

bool Is_Horizontal ()
 retourne true si horizontal, false si vertical

BSP_POSITION_DIVIDER Get_Position_Divider_And_Split (cHV_Wall &w, cHV_Wall &w_front, cHV_Wall &w_back)
 retourne la position du cHVWall 'w' par rapport à ce divider


Private Member Functions

void Set_HV ()
 met a jour la donnée membre 'bHorizontal' selon les points p0 et p1 de ce mur

void Set_Order ()
 met les points p0 et p1 de ce mur dans l'ordre, c'est a dire que :

void Get_Intersection (cHV_Wall &w, cPoint2D &p_inter)
 met dans 'p_inter' le point d'intersections entre les deux droites


Private Attributes

bool bHorizontal
 true si horizontal, false si vertical


Friends

std::ostream & operator<< (std::ostream &os, const cHV_Wall &ex)
 envoie vers un ostream l'affichage du segment


Detailed Description

un cHVWall est un mur basé sur un segment horizontal ou vertical

Definition at line 43 of file HV_bsp.h.


Constructor & Destructor Documentation

cHV_Wall::cHV_Wall  ) 
 

default contructeur ( mur(0,0)->(0,0) )

Definition at line 28 of file HV_bsp.cpp.

References Set_HV(), and Set_Order().

cHV_Wall::cHV_Wall cWall wall  ) 
 

copy constructeur

Definition at line 35 of file HV_bsp.cpp.

References Set_HV(), and Set_Order().

cHV_Wall::cHV_Wall cPoint2D A,
cPoint2D B
 

construit un mur de A à B

Definition at line 44 of file HV_bsp.cpp.

References cWall::Get_Length(), Set_HV(), and Set_Order().


Member Function Documentation

void cHV_Wall::Get_Intersection cHV_Wall w,
cPoint2D p_inter
[private]
 

met dans 'p_inter' le point d'intersections entre les deux droites

d1-> droite portée par ce mur
d2-> droite portée par 'w'
imprime un message d'erreur si les deux segments sont parallelles
TOTO : retourner false si pas d'intersection plutot qu'un message d'erreur

Definition at line 129 of file HV_bsp.cpp.

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

Referenced by Get_Intersection(), and Get_Position_Divider_And_Split().

BSP_POSITION_DIVIDER cHV_Wall::Get_Position_Divider_And_Split cHV_Wall w,
cHV_Wall w_front,
cHV_Wall w_back
 

retourne la position du cHVWall 'w' par rapport à ce divider

dans le cas ou la position est DIVIDER_CROSS, alors le divider 'w' est coupé en deux
'w_front' recoit la partie de 'w' qui devant
'w_back' recoit la partie de 'w' qui derriere
les segments 'w_front' et 'w_back' ont alors pour intersection un unique point qui appartient a ce divider

Definition at line 162 of file HV_bsp.cpp.

References BSP_POSITION_DIVIDER, BSP_POSITION_POINT, Build_Two_Segments(), DIVIDER_BACK, DIVIDER_CROSS, DIVIDER_FRONT, DIVIDER_ON, Get_Intersection(), Get_Position_Divider_And_Split(), Get_Position_Point(), cWall::p0, cWall::p1, POINT_BACK, POINT_FRONT, and POINT_ON.

Referenced by Get_Position_Divider_And_Split().

BSP_POSITION_POINT cHV_Wall::Get_Position_Point cPoint2D A  )  [virtual]
 

retourne la position d'un point par rapport à ce divider

Reimplemented from cWall.

Definition at line 78 of file HV_bsp.cpp.

References bHorizontal, BSP_POSITION_POINT, Get_Position_Point(), cPoint2D::Get_X(), cPoint2D::Get_Y(), POINT_BACK, POINT_FRONT, and POINT_ON.

Referenced by Get_Position_Divider_And_Split(), and Get_Position_Point().

void cHV_Wall::Get_Wall_Seg cHV_Seg wall  ) 
 

copie dans 'wall' le segment de ce murs

Definition at line 71 of file HV_bsp.cpp.

References Get_Wall_Seg(), and cHV_Seg::Set().

Referenced by Get_Wall_Seg().

bool cHV_Wall::Is_Horizontal  )  [inline]
 

retourne true si horizontal, false si vertical

Definition at line 61 of file HV_bsp.h.

References bHorizontal.

Referenced by cSquare_Area::split().

void cHV_Wall::Set_HV  )  [private]
 

met a jour la donnée membre 'bHorizontal' selon les points p0 et p1 de ce mur

imprime un message d'erreur si le mur n'est ni horizontal ni vertical

Definition at line 57 of file HV_bsp.cpp.

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

Referenced by cHV_Wall().

void cHV_Wall::Set_Order  )  [private]
 

met les points p0 et p1 de ce mur dans l'ordre, c'est a dire que :

pour un segment horizontal, p0 est a une abcisse inférieure à celle de p1
pour un segment vertical, p0 est a une ordonnée inférieure à celle de p1

Definition at line 102 of file HV_bsp.cpp.

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

Referenced by cHV_Wall().


Friends And Related Function Documentation

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

envoie vers un ostream l'affichage du segment

Definition at line 18 of file HV_bsp.cpp.


Member Data Documentation

bool cHV_Wall::bHorizontal [private]
 

true si horizontal, false si vertical

Definition at line 74 of file HV_bsp.h.

Referenced by Get_Intersection(), Get_Position_Point(), Is_Horizontal(), Set_HV(), and Set_Order().


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