|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CTextureGrouped Class ReferenceThis kind texture is used for grouping several other textures.
More...
#include <texture_grouped.h>
Inheritance diagram for NL3D::CTextureGrouped:
List of all members.
Public Types |
typedef std::vector< TFourUV > | TFourUVList |
Public Methods |
| CTextureGrouped () |
| =====================================================================================================. More...
|
| CTextureGrouped (const CTextureGrouped &src) |
| =====================================================================================================. More...
|
CTextureGrouped & | operator= (const CTextureGrouped &src) |
| =====================================================================================================. More...
|
bool | areValid (CSmartPtr< ITexture > *textureTab, uint nbTex) |
| =====================================================================================================. More...
|
void | setTextures (CSmartPtr< ITexture > *textureTab, uint nbTex) |
| =====================================================================================================. More...
|
uint32 | getNbTextures (void) const |
| Retrieve the number of textures grouped in this one. More...
|
void | getTextures (CSmartPtr< ITexture > *textureTab) const |
| =====================================================================================================. More...
|
CSmartPtr< ITexture > | getTexture (uint32 index) |
const CUV & | getUVDelta (void) const |
| Get the U-delta and V delta in the groupedTexture for one unit texture (they all have the same size). More...
|
const CUV & | getUV (uint32 index) const |
| Get the origin UV for one texture. Its index is the same than in the tab that was sent to setTextures(). More...
|
virtual bool | supportSharing () const |
| =====================================================================================================. More...
|
virtual std::string | getShareName () const |
| =====================================================================================================. More...
|
void | doGenerate () |
| =====================================================================================================. More...
|
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| =====================================================================================================. More...
|
const TFourUV & | getUVQuad (uint texIndex) |
virtual void | release () |
| =====================================================================================================. More...
|
| NLMISC_DECLARE_CLASS (CTextureGrouped) |
Protected Types |
typedef std::vector< CSmartPtr<
ITexture > > | TTexList |
| pointers to the original textures. More...
|
Protected Methods |
void | duplicate (const CTextureGrouped &src) |
| =====================================================================================================. More...
|
void | makeDummies (CSmartPtr< ITexture > *textureTab, uint nbTex) |
| =====================================================================================================. More...
|
void | displayIncompatibleTextureWarning (CSmartPtr< ITexture > *textureTab, uint nbTex) |
| =====================================================================================================. More...
|
Protected Attributes |
uint32 | _NbTex |
TTexList | _Textures |
CUV | _DeltaUV |
| uv delta for one texture in the group. More...
|
TFourUVList | _TexUVs |
| the UVs for each texture in the group. More...
|
Detailed Description
This kind texture is used for grouping several other textures.
Each texture must have the same size. The textures are copied into one single surface, so animation can be performed only by UV shifting (if there's no wrapping). This is useful when objects sorting (by texture) is too complex or cost too much time (particles for examples...) -
Author:
-
Nicolas Vizerie , Nevrax France
-
Date:
-
2001
Definition at line 49 of file texture_grouped.h.
Member Typedef Documentation
typedef std::vector< TFourUV > NL3D::CTextureGrouped::TFourUVList
|
|
typedef std::vector< CSmartPtr<ITexture> > NL3D::CTextureGrouped::TTexList [protected]
|
|
Constructor & Destructor Documentation
NL3D::CTextureGrouped::CTextureGrouped |
( |
|
) |
|
|
NL3D::CTextureGrouped::CTextureGrouped |
( |
const CTextureGrouped & |
src |
) |
|
|
|
=====================================================================================================.
Definition at line 95 of file texture_grouped.cpp.
References duplicate, and src. |
Member Function Documentation
bool NL3D::CTextureGrouped::areValid |
( |
CSmartPtr< ITexture > * |
textureTab, |
|
|
uint |
nbTex |
|
) |
|
|
|
=====================================================================================================.
-
Parameters:
-
textureTab |
: pointer to a texture list* \nbTex the number of textures in the list (>0) |
-
See also:
-
setTextures()
Definition at line 120 of file texture_grouped.cpp.
Referenced by setTextures. |
void NL3D::CTextureGrouped::displayIncompatibleTextureWarning |
( |
CSmartPtr< ITexture > * |
textureTab, |
|
|
uint |
nbTex |
|
) |
[protected] |
|
void NL3D::CTextureGrouped::doGenerate |
( |
|
) |
[virtual] |
|
void NL3D::CTextureGrouped::duplicate |
( |
const CTextureGrouped & |
src |
) |
[protected] |
|
uint32 NL3D::CTextureGrouped::getNbTextures |
( |
void |
|
) |
const [inline] |
|
std::string NL3D::CTextureGrouped::getShareName |
( |
|
) |
const [virtual] |
|
CSmartPtr<ITexture> NL3D::CTextureGrouped::getTexture |
( |
uint32 |
index |
) |
[inline] |
|
void NL3D::CTextureGrouped::getTextures |
( |
CSmartPtr< ITexture > * |
textureTab |
) |
const |
|
|
=====================================================================================================.
-
Parameters:
-
textureTab |
a tab containing enough space for the pointers |
-
See also:
-
getNbTextures()
Definition at line 239 of file texture_grouped.cpp.
References _Textures. |
const CUV& NL3D::CTextureGrouped::getUV |
( |
uint32 |
index |
) |
const [inline] |
|
const CUV& NL3D::CTextureGrouped::getUVDelta |
( |
void |
|
) |
const [inline] |
|
|
Get the U-delta and V delta in the groupedTexture for one unit texture (they all have the same size).
return (0, 0) if no textures have been set
Definition at line 97 of file texture_grouped.h.
References _DeltaUV. |
const TFourUV& NL3D::CTextureGrouped::getUVQuad |
( |
uint |
texIndex |
) |
[inline] |
|
void NL3D::CTextureGrouped::makeDummies |
( |
CSmartPtr< ITexture > * |
textureTab, |
|
|
uint |
nbTex |
|
) |
[protected] |
|
|
=====================================================================================================.
Definition at line 326 of file texture_grouped.cpp.
Referenced by setTextures. |
NL3D::CTextureGrouped::NLMISC_DECLARE_CLASS |
( |
CTextureGrouped |
|
) |
|
|
CTextureGrouped & NL3D::CTextureGrouped::operator= |
( |
const CTextureGrouped & |
src |
) |
|
|
|
=====================================================================================================.
Definition at line 112 of file texture_grouped.cpp.
References duplicate, and src. |
void NL3D::CTextureGrouped::release |
( |
|
) |
[virtual] |
|
|
=====================================================================================================.
Reimplemented from NL3D::ITexture.
Definition at line 275 of file texture_grouped.cpp. |
void NL3D::CTextureGrouped::setTextures |
( |
CSmartPtr< ITexture > * |
textureTab, |
|
|
uint |
nbTex |
|
) |
|
|
|
=====================================================================================================.
They all must have the same size. An assertion is thrown otherwise. WARNING : if you touch one of the textures in the tab later, you may need to touch this one if it changed -
Parameters:
-
textureTab |
: pointer to a texture list \nbTex the number of textures in the list (>0) |
-
See also:
-
haveValidSizes()
Definition at line 146 of file texture_grouped.cpp.
References _DeltaUV, _NbTex, _Textures, _TexUVs, areValid, displayIncompatibleTextureWarning, NL3D::GetTextureSize, height, makeDummies, nlassert, NLMISC::raiseToNextPowerOf2, NL3D::ITexture::touch, and width. |
bool NL3D::CTextureGrouped::supportSharing |
( |
|
) |
const [virtual] |
|
Member Data Documentation
CUV NL3D::CTextureGrouped::_DeltaUV [protected]
|
|
uint32 NL3D::CTextureGrouped::_NbTex [protected]
|
|
TTexList NL3D::CTextureGrouped::_Textures [protected]
|
|
The documentation for this class was generated from the following files:
|
|