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
RevLine 
[7353]1/*
2   orxonox - the future of 3D-vertical-scrollers
[7395]3 
[7353]4   Copyright (C) 2006 orx
[7395]5 
[7353]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.
[7395]10 
[7353]11   ### File Specific:
12   main-programmer: bottac@ee.ethz.ch
13*/
14
[7385]15#include <vector>
16#include <deque>
[7353]17
[7385]18
[7563]19// FORWARD DECLARATIONS
[7353]20class  BspFile;
21class BspTreeLeaf;
22class BspTreeNode;
23class Vector;
24class set;
25struct face;
[7563]26struct brush;
[7353]27
28class BspManager
29{
30public:
[7395]31  // Constructors
32  BspManager();
[7353]33
[7395]34  // Functions
35  void draw();
[7563]36  void draw_debug_face(int Face); 
[7395]37  void draw_face(int Face);
38  void draw_patch(face* Face);
[7353]39
[7395]40
[7353]41private:
[7395]42  // Functions
43  BspTreeNode* getLeaf(BspTreeNode*  node,   Vector* cam) ;  //!< Traverses the tree
44  void  checkCollision(BspTreeNode* node, Vector* cam);
[7563]45  void  checkCollisionRay(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 
46  void  checkBrushRay(brush* curBrush);
[7395]47  void drawDebugCube(Vector* cam);
[7563]48  bool isAlreadyVisible(int Face);
49  void addFace(int Face);
50 
51  // Data
52  BspFile*  bspFile;
53  BspTreeNode* root;
[7395]54  Vector cam;
55  Vector ship;
56  Vector  viewDir;
[7563]57  int lastTex;
58 
59  //obsolete
60  bool  outputStartsOut;
61  bool  outputAllSolid;
62  float outputFraction;
63 
[7395]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.
[7385]68
[7353]69};
70
Note: See TracBrowser for help on using the repository browser.