00001
00002
00003 #ifndef __CORNELL_BOX_H
00004 #define __CORNELL_BOX_H
00005
00006 #include <gra/scene/Scene.h>
00007
00008 namespace gra {
00009
00015 class GRA_EXPORT CornellBox : public Scene {
00016 protected:
00017 static const int _upperLeftNear;
00018 static const int _upperLeftFar;
00019 static const int _upperRightFar;
00020 static const int _upperRightNear;
00021 static const int _lowerLeftFar;
00022 static const int _lowerLeftNear;
00023 static const int _lowerRightNear;
00024 static const int _lowerRightFar;
00025 static const float _lightScale;
00026 static const Vector3 _box [8];
00027
00028 protected:
00029 void _build_walls();
00030 void _build_lights();
00031 void _create_sf_object_set(Vector3 [9]);
00032 void _build_sphere_flake(unsigned, const Vector4&,
00033 const Vector4&, Vector3 [9]);
00034
00035 public:
00039 CornellBox (const SDS & proto);
00040
00046 void addMirrorSphere(float radius = 0.32);
00047
00053 void addCrystalicSphere(float radius = 0.32);
00054
00061 void addSphereFlake(unsigned factor, float radius = 0.32);
00062 };
00063
00064 }
00065
00066 #endif // __CORNELL_BOX_H