00001
00002
00003
00004
00005
00006 #ifndef BOX_H
00007 #define BOX_H
00008 #include<ImplicitShape.h>
00009
00010 #include<AABoundingBox.h>
00011 #include<Vertex3.h>
00012
00013 #include<real.h>
00014
00017 class Box : public ImplicitShape
00018 {
00019 DYNAMIC_OBJECT;
00020 public:
00021 Box();
00022
00023
00024 real distance(const Vertex3 &v);
00025
00026
00027 real intersect(const Ray &ray, real t = step, real T = infinity);
00028
00029
00030 void parseSymbol(Token &t, ObjectFile &file);
00031 void writeParams(ostream &stream);
00032
00033 protected:
00034
00035 void createSymbols();
00036
00037 AABoundingBox box;
00038
00039 private:
00040 typedef ImplicitShape super;
00041 };
00042 #endif