00001
00002
00003 #ifndef __LIGHT_MAP_H
00004 #define __LIGHT_MAP_H
00005
00006 #include <esg/energy/EnergyMap.h>
00007
00008 namespace esg {
00009
00010 class OGSCENE_EXPORT LightMap : public EnergyMap {
00011 public:
00012 enum MapIndex {
00013 LEFT_MAP = 0,
00014 RIGHT_MAP = 1,
00015 NEAR_MAP = 2,
00016 FAR_MAP = 3,
00017 BOTTOM_MAP = 4,
00018 TOP_MAP = 5
00019 };
00020
00021 protected:
00022 Color3f ** _lightMap;
00023 Vector3 _centroid;
00024 Vector3 _extent;
00025
00026 public:
00027 LightMap (unsigned ,
00028 unsigned ,
00029 const Vector3& ,
00030 const Vector3& );
00031
00032 ~LightMap ();
00033
00034 virtual bool getPointEnergy (const Vector3& ,
00035 Vector3& );
00036
00037 virtual bool setPointEnergy (const Vector3& ,
00038 const Vector3& );
00039
00040 bool setValue (MapIndex, unsigned, unsigned, const Color3f&);
00041 bool getValue (MapIndex, unsigned, unsigned, Color3f&) const;
00042
00043 bool getMapCoords(const Vector3& ,
00044 MapIndex& ,
00045 unsigned& ,
00046 unsigned& ) const;
00047
00048 Vector3 centroid (void) const { return _centroid; }
00049 Vector3 extent (void) const { return _extent; }
00050 };
00051
00052 };
00053
00054 #endif // __LIGHT_MAP_H