00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018
00019
00020 #ifndef __BOX_H
00021 #define __BOX_H
00022
00023 #include "rvtypes.h"
00024
00026 struct Box
00027 {
00031 void add_safety(rvfloat dist);
00035 bool axis_para(void);
00036
00037 rvulong id;
00038 rvulong subid;
00039 Vector center;
00040 Matrix_3x3 rotation;
00041 Vector size;
00042 };
00043
00045 class BoxList
00046 {
00047 public:
00048 BoxList();
00049 ~BoxList();
00050
00051 void add(Box *box);
00052 int write_taz(const char *fname, rvfloat grow=0.0);
00053 int write_vis(const char *fname, rvfloat cameraGrow=0.0, rvfloat cubeGrow=0.0);
00054
00055 private:
00056
00057 void checkSanity();
00058 void reset();
00059 void grow();
00060
00061 private:
00062
00063 int cnt;
00064 int max;
00065 Box **list;
00066 };
00067
00068 #endif