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

portal.h

Go to the documentation of this file.
00001 // Portal Class    by Alan Baylis 2001
00002 
00003 #ifndef PortalH
00004 #define PortalH
00005 
00006 #include "vector.h"
00007 #include "vertex.h"
00008 #include "polygon.h"
00009 
00010 struct BSP_node;
00011 
00012 class PORTAL
00013 {
00014     public:
00015         PORTAL();
00016           ~PORTAL();
00017 
00018     int Compare(const PORTAL& Portal);
00019     int GetMyPosition() const {return linkPosition;}
00020     void SetMyPosition(int newPosition) {linkPosition = newPosition;}
00021     int linkPosition;
00022 
00023         VECTOR GetNormal();
00024         void SetNormal();
00025 
00026         BSP_node* frontleaf;
00027         BSP_node* backleaf;
00028         int PortalId;
00029         int PartitionNodeId;
00030         unsigned int numVertices;
00031         unsigned int Texture;
00032         float Scale[2];
00033         float Shift[2];
00034         float Rotate;
00035         VERTEX* Vertex;
00036 };
00037 
00038 PORTAL* CopyPortal(PORTAL* portal);
00039 void CreateLargePortal(POLYGON splittingPolygon, PORTAL* largePortal);
00040 int SplitPortal(PORTAL* portalToSplit, POLYGON planePolygon, PORTAL* front, PORTAL* back);
00041 void MakePortalList();
00042 int ClassifyPortal(PORTAL* portal, POLYGON planePolygon);
00043 int ClassifyInvertedPortal(PORTAL* portal, POLYGON planePolygon);
00044 void InvertPortal(PORTAL* portal);
00045 void InvertPortals(BSP_node* node);
00046 void AddPortal(PORTAL* thisportal, BSP_node* node);
00047 void AddPortalsToLeaves(BSP_node* root);
00048 int ClipPortalToFrontLeaf(PORTAL* portal);
00049 int ClipPortalToBackLeaf(PORTAL* portal);
00050 void CheckForSinglePortals(BSP_node* node, BSP_node* originalnode, PORTAL* portal, int* flag);
00051 int RemoveExtraPortals(PORTAL* portal);
00052 void FindTruePortals(BSP_node* node);
00053 
00054 #endif

Generated on Fri Dec 23 05:20:18 2005 for Portals by doxygen1.2.15