//---------------------------------------------------------------------------- // William Baxter III's Ray Tracer // // Project for Comp 238, Raster Graphics // University of North Carolina at Chapel Hill // // $Id:$ //---------------------------------------------------------------------------- #ifndef WB3TEXTUREIMAGE_H #define WB3TEXTUREIMAGE_H //---------------------------------------------------------------------------- // The TextureImage class encapsulates access to bitmap texture // data, and allows sharing of that data by several Texture objects. //---------------------------------------------------------------------------- // Colosseum Image Library Headers #include #include // Math stuff #include #include class wb3TextureImage { public: wb3TextureImage(); ~wb3TextureImage(); void LoadFromFile(const char *filename); Vec3f &GetValue(Vec3f &ret, const Vec2f& UV, bool bilerp = false); protected: Colosseum::BitmapImage m_img; }; //---------------------------------------------------------------------------- inline void wb3TextureImage::LoadFromFile(const char *filename) { Colosseum::ReadImage(filename, m_img, 0, 0); } #endif