00001
00002
00003
00004
00005
00006 #ifndef RC_AABOX_H
00007 #define RC_AABOX_H
00008
00009 class Sphere;
00010
00011 class AABox : public Volume {
00012
00013 public:
00014
00015 AABox();
00016
00017 AABox(
00018 AABox &box
00019 );
00020
00021 ~AABox();
00022
00023 void include(
00024 vec3f point
00025 );
00026
00027 void combine(
00028 AABox *aabox
00029 );
00030
00031 void combine(
00032 Sphere *sphere
00033 );
00034
00035 vec3f centrum();
00036
00037 vec3f getCornerPoint(
00038 u32 i
00039 );
00040
00041
00042
00043 f32 area();
00044
00045 f32 volume();
00046
00047 bool encloses(
00048 vec3f *point
00049 );
00050
00051 bool intersect(
00052 Ray *ray
00053 );
00054
00055 bool intersect(
00056 Ray *ray,
00057 vec3f inv_dir,
00058 f32 *dist
00059 );
00060
00061 bool intersect(
00062 Ray *ray,
00063 f32 *dist
00064 );
00065
00066 bool intersect(
00067 AABox *aabox
00068 );
00069
00070 bool intersect(
00071 Sphere *sphere
00072 );
00073
00074 void calculateBounds(
00075 VertexArray *vertexArray,
00076 f32 overCompensate = 0.0f
00077 );
00078
00079
00080 public:
00081
00082 vec3f minCorner;
00083 vec3f maxCorner;
00084
00085 };
00086
00087 #endif
00088