sources:
BOX.CPP (3.1k)
BOX.H (507 bytes)
RAY.CPP (609 bytes)
RAY.H (604 bytes)
SPHERE.CPP (1.9k)
SPHERE.H (564 bytes)
TRIANGLE.CPP (2.1k)
TRIANGLE.H (1.2k)
UTIL.H (1.7k)
VECTOR.CPP (1.6k)
VECTOR.H (5.0k)
cgapplication.cpp (3.2k)
cgapplication.h (3.5k)
cgraytracer.cpp (18.8k)
cgraytracer.h (1.6k)
shape.h (754 bytes)


binaries:
Release/raytracer.exe (38.0k)


website:
more info here


screenshot:
studies/grafik2/Computergrafik-Code6/Aufgabe17/BOX.H
download file

  1 #ifndef _BOX_H
  2 #define _BOX_H
  3
  4 #include "shape.h"
  5
  6 //- Box
  7 class Box : public Shape {
  8 //. 3D Box Class.
  9 public:
 10     Box(const Vector& llf, const Vector& urb);
 11            
 12     const Vector& getLLF() const;
 13     void setLLF(const Vector& llf);
 14     const Vector& getURB() const;
 15     void setURB(const Vector& n);   
 16    
 17     // intersect
 18     virtual bool intersect(const Ray& r,Vector& p,Vector& n, double& d) const;
 19
 20 private:
 21     Vector llf_;
 22     Vector urb_; 
 23 };
 24
 25 #endif // _Box_H
 26