Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::TextureCubeMap Class Reference

TextureCubeMap state class which encapsulates OpenGl texture cubemap functionality. More...

Inheritance diagram for osg::TextureCubeMap:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Face {
  POSITIVE_X = 0, NEGATIVE_X = 1, POSITIVE_Y = 2, NEGATIVE_Y = 3,
  POSITIVE_Z = 4, NEGATIVE_Z = 5
}

Public Methods

 TextureCubeMap ()
 TextureCubeMap (const TextureCubeMap &cm, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.

 META_StateAttribute (osg, TextureCubeMap, TEXTURE)
virtual int compare (const StateAttribute &rhs) const
 return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

void setImage (const Face, Image *image)
 Set the texture image for specified face.

ImagegetImage (const Face)
 Get the texture image for specified face.

const ImagegetImage (const Face) const
 Get the const texture image for specified face.

void setTextureSize (const int width, const int height) const
 Set the texture width and height.

void getTextureSize (int &width, int &height) const
 Get the texture subload width.

void setSubloadCallback (SubloadCallback *cb)
SubloadCallbackgetSubloadCallback ()
const SubloadCallbackgetSubloadCallback () const
void setNumMipmapLevels (unsigned int num) const
 Set the number of mip map levels the the texture has been created with, should only be called within an osg::Texuture::apply() and custom OpenGL texture load.

unsigned int getNumMipmapLevels () const
 Get the number of mip map levels the the texture has been created with.

virtual void apply (State &state) const
 On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture.


Protected Methods

virtual ~TextureCubeMap ()
bool imagesValid () const
virtual void computeInternalFormat () const

Protected Attributes

ref_ptr< Image_images [6]
GLsizei _textureWidth
GLsizei _textureHeight
GLsizei _numMimpmapLevels
ref_ptr< SubloadCallback_subloadCallback

Detailed Description

TextureCubeMap state class which encapsulates OpenGl texture cubemap functionality.


Member Enumeration Documentation

enum osg::TextureCubeMap::Face
 

Enumeration values:
POSITIVE_X 
NEGATIVE_X 
POSITIVE_Y 
NEGATIVE_Y 
POSITIVE_Z 
NEGATIVE_Z 


Constructor & Destructor Documentation

osg::TextureCubeMap::TextureCubeMap  
 

osg::TextureCubeMap::TextureCubeMap const TextureCubeMap &    cm,
const CopyOp   copyop = CopyOp::SHALLOW_COPY
 

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::TextureCubeMap::~TextureCubeMap   [protected, virtual]
 


Member Function Documentation

virtual void osg::TextureCubeMap::apply State   state const [virtual]
 

On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture.

Implements osg::Texture.

virtual int osg::TextureCubeMap::compare const StateAttribute   rhs const [virtual]
 

return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Implements osg::StateAttribute.

virtual void osg::TextureCubeMap::computeInternalFormat   const [protected, virtual]
 

Implements osg::Texture.

const Image* osg::TextureCubeMap::getImage const    Face const
 

Get the const texture image for specified face.

Image* osg::TextureCubeMap::getImage const    Face
 

Get the texture image for specified face.

unsigned int osg::TextureCubeMap::getNumMipmapLevels   const [inline]
 

Get the number of mip map levels the the texture has been created with.

const SubloadCallback* osg::TextureCubeMap::getSubloadCallback   const [inline]
 

SubloadCallback* osg::TextureCubeMap::getSubloadCallback   [inline]
 

void osg::TextureCubeMap::getTextureSize int &    width,
int &    height
const [inline]
 

Get the texture subload width.

bool osg::TextureCubeMap::imagesValid   const [protected]
 

osg::TextureCubeMap::META_StateAttribute osg   ,
TextureCubeMap   ,
TEXTURE   
 

void osg::TextureCubeMap::setImage const    Face,
Image   image
 

Set the texture image for specified face.

void osg::TextureCubeMap::setNumMipmapLevels unsigned int    num const [inline]
 

Set the number of mip map levels the the texture has been created with, should only be called within an osg::Texuture::apply() and custom OpenGL texture load.

void osg::TextureCubeMap::setSubloadCallback SubloadCallback   cb [inline]
 

void osg::TextureCubeMap::setTextureSize const int    width,
const int    height
const [inline]
 

Set the texture width and height.

If width or height are zero then the repsective size value is calculated from the source image sizes.


Member Data Documentation

ref_ptr<Image> osg::TextureCubeMap::_images[6] [protected]
 

GLsizei osg::TextureCubeMap::_numMimpmapLevels [protected]
 

ref_ptr<SubloadCallback> osg::TextureCubeMap::_subloadCallback [protected]
 

GLsizei osg::TextureCubeMap::_textureHeight [protected]
 

GLsizei osg::TextureCubeMap::_textureWidth [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:45 2002 for the Open Scene Graph by doxygen 1.2.16.