Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

worked on collision detection

File size: 1.5 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 DECLARATIONS
20class  BspFile;
21class BspTreeLeaf;
22class BspTreeNode;
23class Vector;
24class set;
25struct face;
26struct brush;
27
28class BspManager
29{
30public:
31  // Constructors
32  BspManager();
33
34  // Functions
35  void draw();
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  BspTreeNode* getLeaf(BspTreeNode*  node,   Vector* cam) ;  //!< Traverses the tree
44  void  checkCollision(BspTreeNode* node, Vector* cam);
45  void  checkCollisionRay(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 
46  void  checkBrushRay(brush* curBrush);
47  void drawDebugCube(Vector* cam);
48  bool isAlreadyVisible(int Face);
49  void addFace(int Face);
50 
51  // Data
52  BspFile*  bspFile;
53  BspTreeNode* root;
54  Vector cam;
55  Vector ship;
56  Vector  viewDir;
57  int lastTex;
58 
59  //obsolete
60  bool  outputStartsOut;
61  bool  outputAllSolid;
62  float outputFraction;
63 
64  bool * alreadyVisible;
65  // Deques to store the visible faces
66  ::std::deque<int> trasparent; //!< the ones with transparancy go here
67  ::std::deque<int> opal; //!< the others here.
68
69};
70
Note: See TracBrowser for help on using the repository browser.