|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CPSMultiTexturedParticle Class ReferenceThis class add multitexturing support to particles.
More...
#include <ps_particle_basic.h>
Inheritance diagram for NL3D::CPSMultiTexturedParticle:
List of all members.
Public Types |
enum | TOperator {
Add = 0,
Modulate,
Decal,
EnvBumpMap,
Last = 0xff
} |
| we only use a useful set of operations. More...
|
Public Methods |
| CPSMultiTexturedParticle () |
| ctor. More...
|
void | enableMultiTexture (bool enabled=true) |
| when set to false, this discard the textures that have been set. More...
|
bool | isMultiTextureEnabled () const |
void | setTexture2 (ITexture *tex) |
| Set the main texture for multitexturing. Convert the texture to / from a bumpmap if needed (so you just provide its heightmap). More...
|
const ITexture * | getTexture2 () const |
| Get the main texture for multitexturing. More...
|
ITexture * | getTexture2 () |
void | setMainTexOp (TOperator op) |
| Set the operation for the main texture. More...
|
TOperator | getMainTexOp () const |
void | enableAlternateTex (bool enabled=true) |
bool | isAlternateTexEnabled () const |
void | setTexture2Alternate (ITexture *tex) |
| Set the alternate texture for multitexturing. It is used when the main operator is not supported by the gfx board. More...
|
const ITexture * | getTexture2Alternate () const |
| Get the alternate texture for multitexturing. More...
|
ITexture * | getTexture2Alternate () |
void | setAlternateTexOp (TOperator op) |
| Set the operation for the alternate texture. Convert the texture to / from a bumpmap if needed. More...
|
TOperator | getAlternateTexOp () const |
void | setScrollSpeed (uint stage, const NLMISC::CVector2f &sp) |
| set the scroll speed for tex 1 & 2 when the main op is used. More...
|
const NLMISC::CVector2f & | getScrollSpeed (uint stage) const |
void | setAlternateScrollSpeed (uint stage, const NLMISC::CVector2f &sp) |
| set the scroll speed for tex 1 & 2 when the alternate op is used. More...
|
const NLMISC::CVector2f & | getAlternateScrollSpeed (uint stage) const |
void | serialMultiTex (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serial this object. More...
|
void | setupMaterial (ITexture *primary, IDriver *drv, CMaterial &mat) |
| setup a material from this object and a primary texture drv is used to check the device caps. More...
|
void | setUseLocalDate (bool use) |
| Use the particle age rather than the global time to compute textures coordinates. More...
|
bool | getUseLocalDate () |
void | setUseLocalDateAlt (bool use) |
| Use the particle age rather than the global time to compute textures coordinates. (when alternate texture is used). More...
|
bool | getUseLocalDateAlt () |
void | setBumpFactor (float bumpFactor) |
| Set a bump factor (when embm is used). More...
|
float | getBumpFactor () const |
Static Public Methods |
void | forceBasicCaps (bool force=true) |
| this act as if the system had the most basic caps supported (no EMBM for example...) Should be used only in edition mode for test. More...
|
bool | areBasicCapsForced () |
| test wether basic caps are forced. More...
|
Protected Types |
enum | TMultiTexState {
TouchFlag = 0x01,
MultiTextureEnabled = 0x02,
AlternateTextureEnabled = 0x04,
AlternateTextureUsed = 0x08,
EnvBumpMapUsed = 0x10,
BasicCapsForced = 0x20,
ScrollUseLocalDate = 0x40,
ScrollUseLocalDateAlternate = 0x80
} |
Protected Methods |
void | setupMultiTexEnv (TOperator op, ITexture *tex1, ITexture *tex2, CMaterial &mat) |
bool | isAlternateTextureUsed () const |
| test wether the alternate texture is used. More...
|
bool | isEnvBumpMapUsed () const |
void | touch () |
void | unTouch () |
bool | isTouched () |
bool | areBasicCapsForcedLocal () const |
void | forceBasicCapsLocal (bool force) |
Protected Attributes |
TOperator | _MainOp |
TOperator | _AlternateOp |
NLMISC::CSmartPtr< ITexture > | _Texture2 |
NLMISC::CSmartPtr< ITexture > | _AlternateTexture2 |
NLMISC::CVector2f | _TexScroll [2] |
| texture scrolling. More...
|
NLMISC::CVector2f | _TexScrollAlternate [2] |
| alternate texture scrollMultiTextureEnabled. More...
|
uint8 | _MultiTexState |
float | _BumpFactor |
Static Protected Attributes |
bool | _ForceBasicCaps = false |
Detailed Description
This class add multitexturing support to particles.
It doesn't support texture animation however. It adds a second texture that is combined with the main texture by using a given operation. An alternate mode must be provided, for gfx boards that doesn't support the op. For now, 2 stages only are supported.
Definition at line 482 of file ps_particle_basic.h.
Member Enumeration Documentation
enum NL3D::CPSMultiTexturedParticle::TMultiTexState [protected]
|
|
|
-
Enumeration values:
-
TouchFlag |
|
MultiTextureEnabled |
|
AlternateTextureEnabled |
|
AlternateTextureUsed |
|
EnvBumpMapUsed |
|
BasicCapsForced |
|
ScrollUseLocalDate |
|
ScrollUseLocalDateAlternate |
|
Definition at line 597 of file ps_particle_basic.h. |
enum NL3D::CPSMultiTexturedParticle::TOperator
|
|
Constructor & Destructor Documentation
NL3D::CPSMultiTexturedParticle::CPSMultiTexturedParticle |
( |
|
) |
|
|
Member Function Documentation
bool NL3D::CPSMultiTexturedParticle::areBasicCapsForced |
( |
|
) |
[inline, static] |
|
bool NL3D::CPSMultiTexturedParticle::areBasicCapsForcedLocal |
( |
|
) |
const [inline, protected] |
|
void NL3D::CPSMultiTexturedParticle::enableAlternateTex |
( |
bool |
enabled = true |
) |
|
|
|
Definition at line 636 of file ps_particle_basic.cpp.
References _AlternateOp, _MultiTexState, _TexScrollAlternate, _Texture2, AlternateTextureEnabled, isAlternateTexEnabled, isMultiTextureEnabled, Modulate, nlassert, NLMISC::CVector2f::set, and touch. |
void NL3D::CPSMultiTexturedParticle::enableMultiTexture |
( |
bool |
enabled = true |
) |
|
|
|
when set to false, this discard the textures that have been set.
Definition at line 616 of file ps_particle_basic.cpp.
References _AlternateTexture2, _MainOp, _MultiTexState, _TexScroll, _Texture2, isMultiTextureEnabled, Modulate, MultiTextureEnabled, NLMISC::CVector2f::set, and touch. |
void NL3D::CPSMultiTexturedParticle::forceBasicCaps |
( |
bool |
force = true |
) |
[inline, static] |
|
|
this act as if the system had the most basic caps supported (no EMBM for example...) Should be used only in edition mode for test.
Definition at line 569 of file ps_particle_basic.h.
References _ForceBasicCaps. |
void NL3D::CPSMultiTexturedParticle::forceBasicCapsLocal |
( |
bool |
force |
) |
[inline, protected] |
|
const NLMISC::CVector2f& NL3D::CPSMultiTexturedParticle::getAlternateScrollSpeed |
( |
uint |
stage |
) |
const [inline] |
|
TOperator NL3D::CPSMultiTexturedParticle::getAlternateTexOp |
( |
|
) |
const [inline] |
|
float NL3D::CPSMultiTexturedParticle::getBumpFactor |
( |
|
) |
const [inline] |
|
TOperator NL3D::CPSMultiTexturedParticle::getMainTexOp |
( |
|
) |
const [inline] |
|
ITexture* NL3D::CPSMultiTexturedParticle::getTexture2 |
( |
|
) |
[inline] |
|
const ITexture* NL3D::CPSMultiTexturedParticle::getTexture2 |
( |
|
) |
const [inline] |
|
ITexture* NL3D::CPSMultiTexturedParticle::getTexture2Alternate |
( |
|
) |
[inline] |
|
const ITexture* NL3D::CPSMultiTexturedParticle::getTexture2Alternate |
( |
|
) |
const [inline] |
|
bool NL3D::CPSMultiTexturedParticle::getUseLocalDate |
( |
|
) |
[inline] |
|
bool NL3D::CPSMultiTexturedParticle::getUseLocalDateAlt |
( |
|
) |
[inline] |
|
bool NL3D::CPSMultiTexturedParticle::isAlternateTexEnabled |
( |
|
) |
const [inline] |
|
bool NL3D::CPSMultiTexturedParticle::isAlternateTextureUsed |
( |
|
) |
const [inline, protected] |
|
bool NL3D::CPSMultiTexturedParticle::isEnvBumpMapUsed |
( |
|
) |
const [inline, protected] |
|
bool NL3D::CPSMultiTexturedParticle::isMultiTextureEnabled |
( |
|
) |
const [inline] |
|
bool NL3D::CPSMultiTexturedParticle::isTouched |
( |
|
) |
[inline, protected] |
|
void NL3D::CPSMultiTexturedParticle::setAlternateScrollSpeed |
( |
uint |
stage, |
|
|
const NLMISC::CVector2f & |
sp |
|
) |
[inline] |
|
void NL3D::CPSMultiTexturedParticle::setAlternateTexOp |
( |
TOperator |
op |
) |
|
|
void NL3D::CPSMultiTexturedParticle::setBumpFactor |
( |
float |
bumpFactor |
) |
[inline] |
|
void NL3D::CPSMultiTexturedParticle::setMainTexOp |
( |
TOperator |
op |
) |
|
|
void NL3D::CPSMultiTexturedParticle::setScrollSpeed |
( |
uint |
stage, |
|
|
const NLMISC::CVector2f & |
sp |
|
) |
[inline] |
|
void NL3D::CPSMultiTexturedParticle::setTexture2 |
( |
ITexture * |
tex |
) |
|
|
void NL3D::CPSMultiTexturedParticle::setTexture2Alternate |
( |
ITexture * |
tex |
) |
|
|
|
setup a material from this object and a primary texture drv is used to check the device caps.
Must be called before display when multitextureing is used
Definition at line 713 of file ps_particle_basic.cpp.
References _AlternateOp, _AlternateTexture2, _BumpFactor, _ForceBasicCaps, _MainOp, _MultiTexState, _Texture2, AlternateTextureUsed, areBasicCapsForced, areBasicCapsForcedLocal, Decal, EnvBumpMap, EnvBumpMapUsed, isAlternateTexEnabled, isMultiTextureEnabled, isTouched, setupMultiTexEnv, and unTouch.
Referenced by NL3D::CPSQuad::updateMatBeforeRendering. |
void NL3D::CPSMultiTexturedParticle::setUseLocalDate |
( |
bool |
use |
) |
|
|
void NL3D::CPSMultiTexturedParticle::setUseLocalDateAlt |
( |
bool |
use |
) |
|
|
void NL3D::CPSMultiTexturedParticle::touch |
( |
|
) |
[inline, protected] |
|
void NL3D::CPSMultiTexturedParticle::unTouch |
( |
|
) |
[inline, protected] |
|
Member Data Documentation
TOperator NL3D::CPSMultiTexturedParticle::_AlternateOp [protected]
|
|
float NL3D::CPSMultiTexturedParticle::_BumpFactor [protected]
|
|
bool NL3D::CPSMultiTexturedParticle::_ForceBasicCaps = false [static, protected]
|
|
TOperator NL3D::CPSMultiTexturedParticle::_MainOp [protected]
|
|
uint8 NL3D::CPSMultiTexturedParticle::_MultiTexState [protected]
|
|
|
Definition at line 600 of file ps_particle_basic.h.
Referenced by areBasicCapsForcedLocal, enableAlternateTex, enableMultiTexture, forceBasicCapsLocal, getUseLocalDate, getUseLocalDateAlt, isAlternateTexEnabled, isAlternateTextureUsed, isEnvBumpMapUsed, isMultiTextureEnabled, isTouched, setupMaterial, setUseLocalDate, setUseLocalDateAlt, touch, and unTouch. |
The documentation for this class was generated from the following files:
|
|