vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OSGskybox.cpp File Reference
#include <osg/AlphaFunc>
#include <osg/Texture2D>
#include <osgDB/ReadFile>
#include <osg/Geometry>
#include <osg/BlendFunc>
#include <iostream>
#include <vreckoAP/Nature/Clouds/CloudsManager.h>
#include <vreckoAP/Nature/Clouds/OSGskybox.h>

Functions

void CreateSkyBox (osg::ref_ptr< osg::Geode > skyboxGeode, long x, long y, long z, long width, long height, long length)
 
void CreateGround (osg::ref_ptr< osg::Geode > groundGeode, long x, long y, long z, long width, long length, long tileCount)
 
void CreateSun (osg::ref_ptr< osg::Billboard > sunBillBoard, int x, int y, int z)
 

Detailed Description

Author
Jakub Kroupal (original Atmospheric plug-in)
Rastislav Tisovcik (revised Clouds ability)
Version
2.0
Date
2008 (Atmospheric), December 2010 (Clouds)

Function Documentation

void CreateGround ( osg::ref_ptr< osg::Geode >  groundGeode,
long  x,
long  y,
long  z,
long  width,
long  length,
long  tileCount 
)

Creates a basic ground with texture

Parameters
[out]groundGeodePointer to the osg::geode, where the ground should be stored
[in]xX coordinate of the center of the ground
[in]yY coordinate of the ground (since the thickness is zero the parameter only determines the Y coordinate)
[in]zZ coordinate of the center of the ground
[in]widthWidth of the ground
[in]lengthLength of the ground
[in]tileCountNumber of tiles in one coordinate
void CreateSkyBox ( osg::ref_ptr< osg::Geode >  skyboxGeode,
long  x,
long  y,
long  z,
long  width,
long  height,
long  length 
)

Creates a skybox

Parameters
[out]skyboxGeodePointer to the osg::geode, where the skybox should be stored
[in]xX coordinate of the center of the skybox
[in]yY coordinate of the center of the skybox
[in]zZ coordinate of the center of the skybox
[in]widthWidth of the skybox
[in]heightHeight of the skybox
[in]lengthLength of the skybox
void CreateSun ( osg::ref_ptr< osg::Billboard >  sunBillBoard,
int  x,
int  y,
int  z 
)

Creates a basic ground with texture

Parameters
[out]sunBillBoardPointer to the osg::BillBoard, where the sun should be stored
[in]xX coordinate of the center of the sun
[in]yY coordinate of the center of the sun
[in]zZ coordinate of the center of the sun