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 22 of file portal.cpp.

00023 {
00024 }

PORTAL::~PORTAL  
 

Definition at line 26 of file portal.cpp.

00027 {
00028 }


Member Function Documentation

int PORTAL::Compare const PORTAL &    Portal
 

Definition at line 30 of file portal.cpp.

References bigger, linkPosition, same, and smaller.

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

int PORTAL::GetMyPosition   const [inline]
 

Definition at line 20 of file portal.h.

References linkPosition.

00020 {return linkPosition;}

VECTOR PORTAL::GetNormal  
 

Definition at line 40 of file portal.cpp.

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

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

void PORTAL::SetMyPosition int    newPosition [inline]
 

Definition at line 21 of file portal.h.

References linkPosition.

00021 {linkPosition = newPosition;}

void PORTAL::SetNormal  
 

Definition at line 61 of file portal.cpp.

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

Referenced by CreateLargePortal().

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


Member Data Documentation

BSP_node* PORTAL::backleaf
 

Definition at line 28 of file portal.h.

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

BSP_node* PORTAL::frontleaf
 

Definition at line 27 of file portal.h.

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

int PORTAL::linkPosition
 

Definition at line 22 of file portal.h.

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

unsigned int PORTAL::numVertices
 

Definition at line 31 of file portal.h.

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

int PORTAL::PartitionNodeId
 

Definition at line 30 of file portal.h.

Referenced by MakePortalList().

int PORTAL::PortalId
 

Definition at line 29 of file portal.h.

Referenced by CheckForSinglePortals(), and MakePortalList().

float PORTAL::Rotate
 

Definition at line 35 of file portal.h.

float PORTAL::Scale[2]
 

Definition at line 33 of file portal.h.

float PORTAL::Shift[2]
 

Definition at line 34 of file portal.h.

unsigned int PORTAL::Texture
 

Definition at line 32 of file portal.h.

VERTEX* PORTAL::Vertex
 

Definition at line 36 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:19:59 2005 for Particles by doxygen1.2.15