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

cWall Class Reference

un wall est un divider pour diviser le plan en deux sous-espaces More...

#include <2D_bsp.h>

Inheritance diagram for cWall:

cHV_Wall List of all members.

Public Member Functions

 cWall ()
 constructeur par defaut, construit un mur entre (0,0) et (0,0)

 cWall (cWall &wall)
 copy constructeur

 cWall (cPoint2D &A, cPoint2D &B)
 constucteur, le mur va de A à Bdgd

void Display (CDisplay *display)
BSP_POSITION_DIVIDER Get_Position_Divider (cWall &w)
 retourne la position du mur 'w' par rapport à ce mur

BSP_POSITION_DIVIDER Get_Position_Divider_And_Split (cWall &w, cWall &w_front, cWall &w_back)
 retourne la position du mur 'w' par rapport à ce mur et le split si necessaire

double Get_Length ()
 retourne la longueur du mur


Public Attributes

cPoint2D p0
 point de depart du mur

cPoint2D p1
 point d'arrivée du mur


Private Member Functions

virtual BSP_POSITION_POINT Get_Position_Point (cPoint2D &p)
 retourne la position du poit 'p' par rapport à ce mur


Friends

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

Detailed Description

un wall est un divider pour diviser le plan en deux sous-espaces

cette classe gere tous les murs (ie. pas forcement verticaux ou horizontaux)

Definition at line 38 of file 2D_bsp.h.


Constructor & Destructor Documentation

cWall::cWall  ) 
 

constructeur par defaut, construit un mur entre (0,0) et (0,0)

Definition at line 20 of file 2D_bsp.cpp.

References p0, and p1.

cWall::cWall cWall wall  ) 
 

copy constructeur

Definition at line 27 of file 2D_bsp.cpp.

References p0, and p1.

cWall::cWall cPoint2D A,
cPoint2D B
 

constucteur, le mur va de A à Bdgd

Definition at line 34 of file 2D_bsp.cpp.

References p0, and p1.


Member Function Documentation

void cWall::Display CDisplay display  ) 
 

Definition at line 57 of file 2D_bsp.cpp.

References Display(), Draw_Line(), p0, and p1.

Referenced by Display().

double cWall::Get_Length  ) 
 

retourne la longueur du mur

Definition at line 49 of file 2D_bsp.cpp.

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

Referenced by cHV_Wall::cHV_Wall().

BSP_POSITION_DIVIDER cWall::Get_Position_Divider cWall w  ) 
 

retourne la position du mur 'w' par rapport à ce mur

Definition at line 64 of file 2D_bsp.cpp.

References BSP_POSITION_DIVIDER, BSP_POSITION_POINT, DIVIDER_BACK, DIVIDER_CROSS, DIVIDER_FRONT, DIVIDER_ON, Get_Position_Divider(), Get_Position_Point(), p0, p1, POINT_BACK, POINT_FRONT, and POINT_ON.

Referenced by Get_Position_Divider().

BSP_POSITION_DIVIDER cWall::Get_Position_Divider_And_Split cWall w,
cWall w_front,
cWall w_back
 

retourne la position du mur 'w' par rapport à ce mur et le split si necessaire

si la position est 'DIVIDER_CROSS' alors
'w_front' contiendra la partie de 'w' devant ce mur
'w_back' contiendra la partie de 'w' derriere ce mur

Definition at line 41 of file 2D_bsp.cpp.

References BSP_POSITION_DIVIDER, DIVIDER_ON, and Get_Position_Divider_And_Split().

Referenced by Get_Position_Divider_And_Split().

virtual BSP_POSITION_POINT cWall::Get_Position_Point cPoint2D p  )  [inline, private, virtual]
 

retourne la position du poit 'p' par rapport à ce mur

Reimplemented in cHV_Wall.

Definition at line 72 of file 2D_bsp.h.

References BSP_POSITION_POINT, Get_Position_Point(), and POINT_ON.

Referenced by Get_Position_Divider(), and Get_Position_Point().


Friends And Related Function Documentation

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

Definition at line 10 of file 2D_bsp.cpp.


Member Data Documentation

cPoint2D cWall::p0
 

point de depart du mur

Definition at line 67 of file 2D_bsp.h.

Referenced by cWall(), Display(), cHV_Wall::Get_Intersection(), Get_Length(), Get_Position_Divider(), cHV_Wall::Get_Position_Divider_And_Split(), operator<<(), and cSquare_Area::split().

cPoint2D cWall::p1
 

point d'arrivée du mur

Definition at line 68 of file 2D_bsp.h.

Referenced by cWall(), Display(), Get_Length(), Get_Position_Divider(), cHV_Wall::Get_Position_Divider_And_Split(), and operator<<().


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