# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CTextureCube Class Reference

CTextureCube. More...

#include <texture_cube.h>

Inheritance diagram for NL3D::CTextureCube:

NL3D::ITexture NLMISC::CBitmap NLMISC::CRefCount NLMISC::IStreamable NLMISC::IClassable List of all members.

Public Types

enum  TFace {
  positive_x = 0, negative_x, positive_y, negative_y,
  positive_z, negative_z
}

Public Methods

 CTextureCube ()
 Default constructor. More...

void setTexture (TFace f, ITexture *t)
 Accessors. More...

ITexturegetTexture (TFace f)
void setFileName (std::string s)
 Set the name of the file containing the texture. More...

virtual bool supportSharing () const
 sharing system. More...

virtual std::string getShareName () const
 Return the Unique ident/name of the texture, used for Driver sharing caps. More...

void doGenerate ()
 Generate the texture, looking in CPath if necessary. More...

virtual void release ()
 Release the texure (free memory). More...

virtual bool isTextureCube () const
 Does this texture is a cube texture. More...

virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 Save the texture file name. More...

 NLMISC_DECLARE_CLASS (CTextureCube)
virtual void selectTexture (uint index)
 If the face support multiple texture (such has CTextureMultiFile), this allow to select the active set. More...

virtual bool isSelectable () const
 Test wether this texture is selectable. More...

virtual ITexturebuildNonSelectableVersion (uint index)
 If this texture is selectable, build a non selectable version of this texture that is setupped with the given slot. More...

void setNoFlip (bool noFip=true)
 No flip is done on faces (to match OpenGL / DX orientation). More...

bool getNoFlip () const

Private Attributes

NLMISC::CSmartPtr< ITexture_Textures [6]
bool _NoFlip

Detailed Description

CTextureCube.

Author:
Matthieu Besson , Nevrax France
Date:
2000

Definition at line 44 of file texture_cube.h.


Member Enumeration Documentation

enum NL3D::CTextureCube::TFace
 

Enumeration values:
positive_x 
negative_x 
positive_y 
negative_y 
positive_z 
negative_z 

Definition at line 48 of file texture_cube.h.

Referenced by getTexture.


Constructor & Destructor Documentation

NL3D::CTextureCube::CTextureCube  
 

Default constructor.

Definition at line 42 of file texture_cube.cpp.

References _Textures.

Referenced by buildNonSelectableVersion.


Member Function Documentation

ITexture * NL3D::CTextureCube::buildNonSelectableVersion uint    index [virtual]
 

If this texture is selectable, build a non selectable version of this texture that is setupped with the given slot.

NB : If this texture is selectable, you are ensured that the return pointer is not 'this'

Reimplemented from NL3D::ITexture.

Definition at line 218 of file texture_cube.cpp.

References _NoFlip, _Textures, CTextureCube, index, isSelectable, and NL3D::ITexture::ITexture.

void NL3D::CTextureCube::doGenerate   [virtual]
 

Generate the texture, looking in CPath if necessary.

Implements NL3D::ITexture.

Definition at line 66 of file texture_cube.cpp.

References _NoFlip, _Textures, getShareName, NL3D::ITexture::ITexture, negative_x, negative_y, negative_z, nlwarning, positive_x, positive_y, and positive_z.

bool NL3D::CTextureCube::getNoFlip   const [inline]
 

Definition at line 102 of file texture_cube.h.

References _NoFlip.

string NL3D::CTextureCube::getShareName   const [virtual]
 

Return the Unique ident/name of the texture, used for Driver sharing caps.

Deriver should add a prefix for their texture type. eg "file::pipoland", "noise::4-4-2" etc....

Reimplemented from NL3D::ITexture.

Definition at line 55 of file texture_cube.cpp.

References _Textures.

Referenced by doGenerate.

ITexture* NL3D::CTextureCube::getTexture TFace    f [inline]
 

Definition at line 62 of file texture_cube.h.

References _Textures, NL3D::ITexture::ITexture, and TFace.

bool NL3D::CTextureCube::isSelectable   const [virtual]
 

Test wether this texture is selectable.

Reimplemented from NL3D::ITexture.

Definition at line 208 of file texture_cube.cpp.

References _Textures.

Referenced by buildNonSelectableVersion.

virtual bool NL3D::CTextureCube::isTextureCube   const [inline, virtual]
 

Does this texture is a cube texture.

Reimplemented from NL3D::ITexture.

Definition at line 86 of file texture_cube.h.

NL3D::CTextureCube::NLMISC_DECLARE_CLASS CTextureCube   
 

void NL3D::CTextureCube::release void    [virtual]
 

Release the texure (free memory).

Reimplemented from NL3D::ITexture.

Definition at line 164 of file texture_cube.cpp.

References _Textures.

void NL3D::CTextureCube::selectTexture uint    index [virtual]
 

If the face support multiple texture (such has CTextureMultiFile), this allow to select the active set.

Reimplemented from NL3D::ITexture.

Definition at line 198 of file texture_cube.cpp.

References _Textures, index, and NL3D::ITexture::touch.

void NL3D::CTextureCube::serial NLMISC::IStream   f throw (NLMISC::EStream) [virtual]
 

Save the texture file name.

Reimplemented from NL3D::ITexture.

Definition at line 173 of file texture_cube.cpp.

void NL3D::CTextureCube::setFileName std::string    s
 

Set the name of the file containing the texture.

Parameters:
name  of the file

void NL3D::CTextureCube::setNoFlip bool    noFip = true [inline]
 

No flip is done on faces (to match OpenGL / DX orientation).

Definition at line 101 of file texture_cube.h.

References _NoFlip.

void NL3D::CTextureCube::setTexture TFace    f,
ITexture   t
 

Accessors.

Definition at line 49 of file texture_cube.cpp.

References _Textures, and t.

virtual bool NL3D::CTextureCube::supportSharing   const [inline, virtual]
 

sharing system.

Reimplemented from NL3D::ITexture.

Definition at line 75 of file texture_cube.h.


Member Data Documentation

bool NL3D::CTextureCube::_NoFlip [private]
 

Definition at line 106 of file texture_cube.h.

Referenced by buildNonSelectableVersion, doGenerate, getNoFlip, and setNoFlip.

NLMISC::CSmartPtr<ITexture> NL3D::CTextureCube::_Textures[6] [private]
 

Definition at line 105 of file texture_cube.h.

Referenced by buildNonSelectableVersion, CTextureCube, doGenerate, getShareName, getTexture, isSelectable, release, selectTexture, and setTexture.


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