LightMap.h

Go to the documentation of this file.
00001 /* $Id:$ */
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;    // length (!) of x, y and z directions
00025     
00026 public:
00027     LightMap (unsigned       /* u res.   */,
00028               unsigned       /* v res.   */,
00029               const Vector3& /* extent   */,
00030               const Vector3& /* centroid */);
00031 
00032     ~LightMap ();
00033 
00034     virtual bool getPointEnergy (const Vector3& /* location of particle */,
00035                                  Vector3&       /* energy values */);
00036     
00037     virtual bool setPointEnergy (const Vector3& /* loc. of energy particle */,
00038                                  const Vector3& /* energy values */);
00039 
00040     bool setValue (MapIndex, unsigned, unsigned, const Color3f&);
00041     bool getValue (MapIndex, unsigned, unsigned, Color3f&) const;
00042 
00043     bool getMapCoords(const Vector3& /* point on surface       */,
00044                       MapIndex&      /* corresponding map      */,
00045                       unsigned&      /* corresponding u coord. */,
00046                       unsigned&      /* corresponding v coord. */) const;
00047 
00048     Vector3 centroid (void) const { return _centroid; }
00049     Vector3 extent   (void) const { return _extent;   }
00050 };
00051     
00052 }; // namespace
00053 
00054 #endif // __LIGHT_MAP_H

Generated on Wed Jun 28 12:24:28 2006 for esg by  doxygen 1.4.6