// // texture_skydome.cc // // Skydome texture. // // Copyright (C) J. Belson 2003.10.05 // // $Id: texture_skydome.cc,v 1.1 2003/10/11 18:11:00 jon Exp $ // #include "texture_skydome.h" /** * Constructor. */ texture_skydome::texture_skydome(textset& ts) : texture(ts) { ; } /** * Calculate colour at specified point. * @param s Texture coordinate. * @param t Texture coordinate. * @param u Texture coordinate. * @return Colour at specified point. */ fcolour texture_skydome::colour(float /*s*/, float /*t*/, float u, vector3d* view_direction) { fg.alpha = 0.5; bg.alpha = 0.5; fcolour difference = bg - fg; fcolour sky = bg + difference * (u - SKYDOME_OFFSET)/SKYDOME_SCALE; sky.alpha = 1.0; return sky; }