Subversion Repositories gelsvn

Rev

Rev 208 | Rev 299 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 208 Rev 290
Line 6... Line 6...
6
#include "CGLA/Mat4x4f.h"
6
#include "CGLA/Mat4x4f.h"
7
#include "Geometry/TriMesh.h"
7
#include "Geometry/TriMesh.h"
8
 
8
 
9
#include "BBox.h"
9
#include "BBox.h"
10
 
10
 
11
namespace TriMeshTrace 
11
namespace Geometry 
12
{
12
{
13
  struct BSPNode;
13
  struct BSPNode;
14
 
14
 
15
  // Initialization structure
15
  // Initialization structure
16
  struct BSPNode 
16
  struct BSPNode 
Line 87... Line 87...
87
	      int _max_objects, int _max_level);
87
	      int _max_objects, int _max_level);
88
 
88
 
89
    void build();
89
    void build();
90
    bool is_build();
90
    bool is_build();
91
 
91
 
92
    bool intersect_node(BRender::Ray &ray, const BSPNode &node, 
92
    bool intersect_node(Ray &ray, const BSPNode &node, 
93
			double t_min, double t_max) const;
93
			double t_min, double t_max) const;
94
    bool intersect(BRender::Ray &ray) const;
94
    bool intersect(Ray &ray) const;
95
    void print(BSPNode *node, int depth);
95
    void print(BSPNode *node, int depth);
96
    int size(BSPNode *node);
96
    int size(BSPNode *node);
97
    int size();
97
    int size();
98
 
98
 
99
    void BSPTree::make_fast_tree(BSPNode *node);
99
    void BSPTree::make_fast_tree(BSPNode *node);
100
    void BSPTree::push_fast_bsp_node(BSPNode *node, int id);
100
    void BSPTree::push_fast_bsp_node(BSPNode *node, int id);
101
    void BSPTree::intersect_fast_node(BRender::Ray &ray, 
101
    void BSPTree::intersect_fast_node(Ray &ray, 
102
				      const FastBSPNode *node, 
102
				      const FastBSPNode *node, 
103
				      double t_min, double t_max) const;
103
				      double t_min, double t_max) const;
104
    bool intersect(BRender::Ray &ray, const ISectTri &isecttri, double t_max) const;
104
    bool intersect(Ray &ray, const ISectTri &isecttri, double t_max) const;
105
  };
105
  };
106
}
106
}
107
#endif
107
#endif
108
 
108