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::coords, Vertex, VECTOR::x, VECTOR::y, and VECTOR::z.

00041 {
00042         VECTOR temp;
00043         VECTOR u;
00044         VECTOR v;
00045           u = Vertex[1].coords - Vertex[0].coords;
00046           v = Vertex[2].coords - Vertex[0].coords;
00047           temp.x = (u.y*v.z)-(v.y*u.z);
00048           temp.y = (u.z*v.x)-(v.z*u.x);
00049           temp.z = (u.x*v.y)-(v.x*u.y);
00050         return temp;
00051 }

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

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

Referenced by CreateLargePortal().

00054 {
00055         VECTOR u;
00056         VECTOR v;
00057           u = Vertex[1].coords - Vertex[0].coords;
00058           v = Vertex[2].coords - Vertex[0].coords;
00059           Vertex[0].normal.x = (u.y*v.z)-(v.y*u.z);
00060           Vertex[0].normal.y = (u.z*v.x)-(v.z*u.x);
00061           Vertex[0].normal.z = (u.x*v.y)-(v.x*u.y);
00062         Vertex[1].normal = Vertex[0].normal;
00063           Vertex[2].normal = Vertex[0].normal;
00064 }


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(), 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(), SetNormal(), SplitPortal(), and WndProc().


The documentation for this class was generated from the following files:
Generated on Fri Dec 23 05:15:52 2005 for Constructive Solid Geometry by doxygen1.2.15