#include <stdlib.h>#include <stdio.h>#include <OSGConfig.h>#include <OSGDrawActionBase.h>#include <OSGCamera.h>#include <OSGViewport.h>#include <OSGTextureChunk.h>#include <OSGImage.h>#include <OSGRemoteAspect.h>#include "OSGSkyBackground.h"#include <OSGGL.h>Go to the source code of this file.
Namespaces | |
| namespace | osg |
Functions | |
| static void | interpolateColor (const Color4f &startColor, const Color4f &endColor, Real32 t, Color4f &result) |
| static const Vec3f * | tfac (const TextureChunkPtr &t, UInt32 c) |
| static void interpolateColor | ( | const Color4f & | startColor, | |
| const Color4f & | endColor, | |||
| Real32 | t, | |||
| Color4f & | result | |||
| ) | [inline, static] |
Definition at line 170 of file OSGSkyBackground.cpp.
Referenced by osg::SkyBackground::changed().
00171 { 00172 Real32 t_inv = 1.f - t; 00173 result[0] = startColor[0] * t_inv + endColor[0] * t; 00174 result[1] = startColor[1] * t_inv + endColor[1] * t; 00175 result[2] = startColor[2] * t_inv + endColor[2] * t; 00176 result[3] = startColor[3] * t_inv + endColor[3] * t; 00177 }
| static const Vec3f* tfac | ( | const TextureChunkPtr & | t, | |
| UInt32 | c | |||
| ) | [inline, static] |
Definition at line 388 of file OSGSkyBackground.cpp.
References osg::NullFC.
Referenced by osg::SkyBackground::drawBox().
00389 { 00390 static Vec3f defaulttc[7][4] = { 00391 // 2D default TCs 00392 { Vec3f(0,0,0), Vec3f(1,0,0), Vec3f(1,1,0), Vec3f(0,1,0) }, 00393 00394 // Cubetex Default TCs 00395 { Vec3f(-1, 1,-1), Vec3f( 1, 1,-1), Vec3f( 1,-1,-1), Vec3f(-1,-1,-1) }, 00396 { Vec3f( 1, 1, 1), Vec3f(-1, 1, 1), Vec3f(-1,-1, 1), Vec3f( 1,-1, 1) }, 00397 { Vec3f( 1, 1,-1), Vec3f(-1, 1,-1), Vec3f(-1, 1, 1), Vec3f( 1, 1, 1) }, 00398 { Vec3f( 1,-1, 1), Vec3f(-1,-1, 1), Vec3f(-1,-1,-1), Vec3f( 1,-1,-1) }, 00399 { Vec3f( 1, 1,-1), Vec3f( 1, 1, 1), Vec3f( 1,-1, 1), Vec3f( 1,-1,-1) }, 00400 { Vec3f(-1, 1, 1), Vec3f(-1, 1,-1), Vec3f(-1,-1,-1), Vec3f(-1,-1, 1) }, 00401 }; 00402 00403 return defaulttc[c * ((t != NullFC) && (t->getImage() != NullFC) && 00404 (t->getImage()->getSideCount() == 6))]; 00405 }
1.6.1