Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/bsp_model/src/lib/graphics/importer/bsp_manager.h @ 7385

Last change on this file since 7385 was 7385, checked in by bottac, 18 years ago

Minor improvements (transparancy). Code formatting revised.

File size: 1.3 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2006 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: bottac@ee.ethz.ch
13*/
14
15#include <vector>
16#include <deque>
17
18
19// FORWARD DECLARATION
20class  BspFile;
21class BspTreeLeaf;
22class BspTreeNode;
23class Vector;
24class set;
25struct face;
26
27class BspManager
28{
29public:
30// Constructors
31 BspManager();
32
33// Functions
34 void draw();
35 void draw_leaf();
36 void draw_debug_face(int Face);
37 void draw_face(int Face);
38 void draw_patch(face* Face);
39 
40
41private:
42// Functions
43 BspFile*  bspFile;
44 BspTreeNode* root;
45 const BspTreeNode* getLeaf(const BspTreeNode*  node, const Vector& cam) const;  // Traverses the tree
46 void  checkCollision(BspTreeNode* node, Vector* cam);
47 void drawDebugCube(Vector* cam);
48 Vector cam;
49 Vector ship;
50 Vector  viewDir;
51 bool * alreadyVisible;
52 bool isAlreadyVisible(int Face);
53 void addFace(int Face);
54 int lastTex;
55
56
57// Vectors to store the visible faces
58 ::std::deque<int> trasparent; // the ones with transparancy go here
59 ::std::deque<int> opal; // the others here.
60
61};
62
Note: See TracBrowser for help on using the repository browser.