Skybox Class Reference

#include <Skybox.h>

Collaboration diagram for Skybox:

List of all members.


Public Member Functions

 Skybox ()
 ~Skybox ()
bool init (float xSize, float ySize, float zSize, float farClipDist, std::string texNegY, std::string texPosY, std::string texNegX, std::string texPosX, std::string texNegZ, std::string texPosZ, int sortKey=0)
bool setTextures (std::string texNegY, std::string texPosY, std::string texNegX, std::string texPosX, std::string texNegZ, std::string texPosZ)
void setSize (float xSize, float ySize, float zSize, float farClipDist)
OSG::NodePtr getNodePtr ()
void setupRender (OSG::Vec3f camPos)
void setupRender (gmtl::Vec3f camPos)
OSG::CubeTextureChunkPtr getSkyboxCubemap ()

Protected Types

enum  SIDE {
  SIDE_NEGY = 0, SIDE_POSY = 1, SIDE_NEGX = 2, SIDE_POSX = 3,
  SIDE_NEGZ = 4, SIDE_POSZ = 5
}

Protected Member Functions

OSG::GeometryPtr createQuad (OSG::Pnt3f v0, OSG::Pnt3f v1, OSG::Pnt3f v2, OSG::Pnt3f v3, OSG::TextureChunkPtr texture)
void createSide (SIDE s, OSG::Pnt3f v0, OSG::Pnt3f v1, OSG::Pnt3f v2, OSG::Pnt3f v3)

Protected Attributes

OSG::TextureChunkPtr textures [6]
OSG::CubeTextureChunkPtr asCubemap
std::string texPaths [6]
float xSize
float ySize
float zSize
float farClipDistance
OSG::NodePtr transf
OSG::TransformPtr transfCore
OSG::NodePtr skybox
OSG::GroupPtr skyboxCore
OSG::NodePtr side [6]
OSG::GeometryPtr sideGeometryCore [6]
OSG::Matrix4f scale
bool initialized
int sortKey
SkyboxTextureManager textureManager

Detailed Description

Simple class for box shaped skyboxes. Allows the size and textures to be changed at runtime (via setTextures() and setSize() methods). Usage: First call init() to specify the initial properties of the skybox. Call getNodePtr() to integrate the skybox into your scene graph. Call setupRender() each frame before drawing

Member Enumeration Documentation

enum Skybox::SIDE [protected]

Enumerator:
SIDE_NEGY 
SIDE_POSY 
SIDE_NEGX 
SIDE_POSX 
SIDE_NEGZ 
SIDE_POSZ 


Constructor & Destructor Documentation

OSG_USING_NAMESPACE Skybox::Skybox (  ) 

Skybox::~Skybox (  ) 


Member Function Documentation

OSG::GeometryPtr Skybox::createQuad ( OSG::Pnt3f  v0,
OSG::Pnt3f  v1,
OSG::Pnt3f  v2,
OSG::Pnt3f  v3,
OSG::TextureChunkPtr  texture 
) [protected]

void Skybox::createSide ( SIDE  s,
OSG::Pnt3f  v0,
OSG::Pnt3f  v1,
OSG::Pnt3f  v2,
OSG::Pnt3f  v3 
) [protected]

NodePtr Skybox::getNodePtr (  ) 

CubeTextureChunkPtr Skybox::getSkyboxCubemap (  ) 

bool Skybox::init ( float  xSize,
float  ySize,
float  zSize,
float  farClipDist,
std::string  texNegY,
std::string  texPosY,
std::string  texNegX,
std::string  texPosX,
std::string  texNegZ,
std::string  texPosZ,
int  sortKey = 0 
)

void Skybox::setSize ( float  xSize,
float  ySize,
float  zSize,
float  farClipDist 
)

bool Skybox::setTextures ( std::string  texNegY,
std::string  texPosY,
std::string  texNegX,
std::string  texPosX,
std::string  texNegZ,
std::string  texPosZ 
)

void Skybox::setupRender ( gmtl::Vec3f  camPos  ) 

void Skybox::setupRender ( OSG::Vec3f  camPos  ) 

adjusts the position and size of the skybox this method must be called whenever the camera position has been changed


Member Data Documentation

OSG::CubeTextureChunkPtr Skybox::asCubemap [protected]

float Skybox::farClipDistance [protected]

bool Skybox::initialized [protected]

OSG::Matrix4f Skybox::scale [protected]

OSG::NodePtr Skybox::side[6] [protected]

OSG::GeometryPtr Skybox::sideGeometryCore[6] [protected]

OSG::NodePtr Skybox::skybox [protected]

OSG::GroupPtr Skybox::skyboxCore [protected]

int Skybox::sortKey [protected]

std::string Skybox::texPaths[6] [protected]

OSG::TextureChunkPtr Skybox::textures[6] [protected]

OSG::NodePtr Skybox::transf [protected]

OSG::TransformPtr Skybox::transfCore [protected]

float Skybox::xSize [protected]

float Skybox::ySize [protected]

float Skybox::zSize [protected]


The documentation for this class was generated from the following files:

Generated on Wed Oct 20 16:12:00 2010 for inVRs by doxygen 1.5.8