c7dab4abea
Add more points to the dome, giving it a dome shape rather than a dunce cap shape. Represent as OpenGL DrawElements instead of as triangle strips. Only calculate have the sky colors and reflect those across the dome.
24 lines
399 B
C++
24 lines
399 B
C++
#ifndef SIMGEAR_MATH_MATH_HXX
|
|
#define SIMGEAR_MATH_MATH_HXX 1
|
|
namespace simgear
|
|
{
|
|
namespace math
|
|
{
|
|
/** Linear interpolation between two values.
|
|
*/
|
|
template<typename T>
|
|
inline T lerp(const T& x, const T& y, double alpha)
|
|
{
|
|
return x * (1.0 - alpha) + y * alpha;
|
|
}
|
|
|
|
template<typename T>
|
|
inline T lerp(const T& x, const T& y, float alpha)
|
|
{
|
|
return x * (1.0f - alpha) + y * alpha;
|
|
}
|
|
|
|
}
|
|
}
|
|
#endif
|