Subversion Repositories gelsvn

Rev

Rev 208 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 208 Rev 290
Line 4... Line 4...
4
#include "Ray.h"
4
#include "Ray.h"
5
#include "BBox.h"
5
#include "BBox.h"
6
 
6
 
7
using namespace std;
7
using namespace std;
8
using namespace CGLA;
8
using namespace CGLA;
9
using namespace BRender;
-
 
10
 
9
 
11
#define my_min(x,y) (x<y?x:y)
10
#define my_min(x,y) (x<y?x:y)
12
#define my_max(x,y) (x>y?x:y)
11
#define my_max(x,y) (x>y?x:y)
13
 
12
 
14
namespace TriMeshTrace 
13
namespace Geometry
15
{
14
{
16
  void BBox::intersect_min_max(Ray &ray, double &t_min, double &t_max) const 
15
  void BBox::intersect_min_max(Ray &ray, double &t_min, double &t_max) const 
17
  {
16
  {
18
    double tx1 = (min_corner[0]-ray.origin[0])/ray.direction[0];
17
    double tx1 = (min_corner[0]-ray.origin[0])/ray.direction[0];
19
    double ty1 = (min_corner[1]-ray.origin[1])/ray.direction[1];
18
    double ty1 = (min_corner[1]-ray.origin[1])/ray.direction[1];