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 3... Line 3...
3
 
3
 
4
#include "CGLA/Vec3f.h"
4
#include "CGLA/Vec3f.h"
5
 
5
 
6
#include "Ray.h"
6
#include "Ray.h"
7
 
7
 
8
namespace TriMeshTrace 
8
namespace Geometry 
9
{
9
{
10
  struct ISectTri 
10
  struct ISectTri 
11
  {
11
  {
12
    CGLA::Vec3f point0;
12
    CGLA::Vec3f point0;
13
    CGLA::Vec3f point1;
13
    CGLA::Vec3f point1;
Line 47... Line 47...
47
  struct BBox 
47
  struct BBox 
48
  {
48
  {
49
    CGLA::Vec3f min_corner;
49
    CGLA::Vec3f min_corner;
50
    CGLA::Vec3f max_corner;
50
    CGLA::Vec3f max_corner;
51
 
51
 
52
    void intersect_min_max(BRender::Ray &ray, double &t_min, double &t_max) const ;
52
    void intersect_min_max(Ray &ray, double &t_min, double &t_max) const ;
53
    bool intersect(BRender::Ray &ray);
53
    bool intersect(Ray &ray);
54
    bool ray_triangle(CGLA::Vec3f &ray_start, CGLA::Vec3f &ray_end, ISectTri &tri);
54
    bool ray_triangle(CGLA::Vec3f &ray_start, CGLA::Vec3f &ray_end, ISectTri &tri);
55
    bool intersect_edge_box(CGLA::Vec3f &ray_start, CGLA::Vec3f &ray_end);
55
    bool intersect_edge_box(CGLA::Vec3f &ray_start, CGLA::Vec3f &ray_end);
56
    bool intersect_triangle(ISectTri &tri);
56
    bool intersect_triangle(ISectTri &tri);
57
    bool in_interval(double min_limit, double test_value, double max_limit);
57
    bool in_interval(double min_limit, double test_value, double max_limit);
58
    void compute_bbox(std::vector<ISectTri> &isectmesh);
58
    void compute_bbox(std::vector<ISectTri> &isectmesh);