Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

PORTAL Class Reference

#include <portal.h>

List of all members.

Public Methods

 PORTAL ()
 ~PORTAL ()
int Compare (const PORTAL &Portal)
int GetMyPosition () const
void SetMyPosition (int newPosition)
VECTOR GetNormal ()
void SetNormal ()

Public Attributes

int linkPosition
BSP_nodefrontleaf
BSP_nodebackleaf
int PortalId
int PartitionNodeId
unsigned int numVertices
unsigned int Texture
float Scale [2]
float Shift [2]
float Rotate
VERTEXVertex


Constructor & Destructor Documentation

PORTAL::PORTAL  
 

Definition at line 21 of file portal.cpp.

00022 {
00023 }

PORTAL::~PORTAL  
 

Definition at line 25 of file portal.cpp.

00026 {
00027 }


Member Function Documentation

int PORTAL::Compare const PORTAL &    Portal
 

Definition at line 29 of file portal.cpp.

References bigger, linkPosition, same, and smaller.

00030 {
00031     if (linkPosition < Portal.linkPosition)
00032             return smaller;
00033       if (linkPosition > Portal.linkPosition)
00034             return bigger;
00035       else
00036             return same;
00037 }

int PORTAL::GetMyPosition   const [inline]
 

Definition at line 19 of file portal.h.

References linkPosition.

00019 {return linkPosition;}

VECTOR PORTAL::GetNormal  
 

Definition at line 39 of file portal.cpp.

References Vertex, VECTOR::x, VERTEX::x, VECTOR::y, VERTEX::y, VECTOR::z, and VERTEX::z.

00040 {
00041         VECTOR temp;
00042         float ux;
00043         float uy;
00044         float uz;
00045         float vx;
00046         float vy;
00047         float vz;
00048           ux = Vertex[1].x - Vertex[0].x;
00049           uy = Vertex[1].y - Vertex[0].y;
00050           uz = Vertex[1].z - Vertex[0].z;
00051           vx = Vertex[2].x - Vertex[0].x;
00052           vy = Vertex[2].y - Vertex[0].y;
00053           vz = Vertex[2].z - Vertex[0].z;
00054           temp.x = (uy*vz)-(vy*uz);
00055           temp.y = (uz*vx)-(vz*ux);
00056           temp.z = (ux*vy)-(vx*uy);
00057         return temp;
00058 }

void PORTAL::SetMyPosition int    newPosition [inline]
 

Definition at line 20 of file portal.h.

References linkPosition.

00020 {linkPosition = newPosition;}

void PORTAL::SetNormal  
 

Definition at line 60 of file portal.cpp.

References VERTEX::nx, VERTEX::ny, VERTEX::nz, Vertex, VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by CreateLargePortal().

00061 {
00062         float ux;
00063         float uy;
00064         float uz;
00065         float vx;
00066         float vy;
00067         float vz;
00068           ux = Vertex[1].x - Vertex[0].x;
00069           uy = Vertex[1].y - Vertex[0].y;
00070           uz = Vertex[1].z - Vertex[0].z;
00071           vx = Vertex[2].x - Vertex[0].x;
00072           vy = Vertex[2].y - Vertex[0].y;
00073           vz = Vertex[2].z - Vertex[0].z;
00074           Vertex[0].nx = (uy*vz)-(vy*uz);
00075           Vertex[0].ny = (uz*vx)-(vz*ux);
00076           Vertex[0].nz = (ux*vy)-(vx*uy);
00077         Vertex[1].nx = Vertex[0].nx;
00078           Vertex[1].ny = Vertex[0].ny;
00079           Vertex[1].nz = Vertex[0].nz;
00080           Vertex[2].nx = Vertex[0].nx;
00081           Vertex[2].ny = Vertex[0].ny;
00082           Vertex[2].nz = Vertex[0].nz;
00083 }


Member Data Documentation

BSP_node* PORTAL::backleaf
 

Definition at line 27 of file portal.h.

Referenced by CheckForSinglePortals(), ClipPortalToBackLeaf(), FindVisibleLeaves(), InvertPortals(), and RemoveExtraPortals().

BSP_node* PORTAL::frontleaf
 

Definition at line 26 of file portal.h.

Referenced by CheckForSinglePortals(), ClipPortalToFrontLeaf(), and InvertPortals().

int PORTAL::linkPosition
 

Definition at line 21 of file portal.h.

Referenced by AddPortal(), Compare(), GetMyPosition(), MakePortalList(), and SetMyPosition().

unsigned int PORTAL::numVertices
 

Definition at line 30 of file portal.h.

Referenced by ClassifyInvertedPortal(), ClassifyPortal(), ClipPortalToBackLeaf(), ClipPortalToFrontLeaf(), CopyPortal(), CreateLargePortal(), FindVisibleLeaves(), InvertPortal(), RenderBSP(), and SplitPortal().

int PORTAL::PartitionNodeId
 

Definition at line 29 of file portal.h.

Referenced by MakePortalList().

int PORTAL::PortalId
 

Definition at line 28 of file portal.h.

Referenced by CheckForSinglePortals(), and MakePortalList().

float PORTAL::Rotate
 

Definition at line 34 of file portal.h.

float PORTAL::Scale[2]
 

Definition at line 32 of file portal.h.

float PORTAL::Shift[2]
 

Definition at line 33 of file portal.h.

unsigned int PORTAL::Texture
 

Definition at line 31 of file portal.h.

VERTEX* PORTAL::Vertex
 

Definition at line 35 of file portal.h.

Referenced by CalculatePVS(), ClassifyInvertedPortal(), ClassifyPortal(), ClipPortalToBackLeaf(), ClipPortalToFrontLeaf(), CopyPortal(), CreateLargePortal(), DeleteBSP(), FindTruePortals(), FindVisibleLeaves(), GetNormal(), InvertPortal(), InvertPortals(), MakePortalList(), RenderBSP(), SetNormal(), SplitPortal(), and WndProc().


The documentation for this class was generated from the following files:
Generated on Fri Dec 23 05:20:21 2005 for Portals by doxygen1.2.15