Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
MSlot Struct Reference

#include <slot.hpp>

Inheritance diagram for MSlot:
Slot VSlot

Public Member Functions

 MSlot ()
 
void reset ()
 
void cleanup ()
 
void addtexture (int type, const char *filename)
 
Texfindtexture (int type)
 Find a texture in the sts array, depending on type (beeing one of TEX_DIFFUSE to TEX_NUM). More...
 
void addvariant (VSlot *vs)
 
VSlotsetvariantchain (VSlot *vs)
 Sets a chain of VSlot variants for the owner slot. More...
 
VSlotfindvariant (const VSlot &src, const VSlot &delta)
 
void combinetextures (int index, Slot::Tex &t, bool msg=true, bool forceload=false)
 Combine and load texture data to be ready for sending it to the gpu. More...
 
Slotload (bool msg, bool forceload)
 
Textureloadthumbnail ()
 Generate a preview image of this slot for the texture browser. More...
 
void loadlayermask ()
 

Public Attributes

int index
 
vector< Texsts
 
Shadershader
 
vector< SlotShaderParamparams
 
VSlotvariants
 All virtual Slots deriving from this slot in a node chain. More...
 
bool loaded
 
uint texmask
 
char * autograss
 
Texturegrasstex
 
Texturethumbnail
 
char * layermaskname
 
int layermaskmode
 
float layermaskscale
 
ImageDatalayermask
 
Slotslot
 The Slot this VSlot derived from. More...
 
VSlotnext
 The next VSlot in the variant chain of the Slot. More...
 
int index
 
int changed
 
vector< SlotShaderParamparams
 
bool linked
 
float scale
 
int rotation
 
ivec2 offset
 
vec2 scroll
 
int layer
 
float alphafront
 
float alphaback
 
vec colorscale
 
vec glowcolor
 

Constructor & Destructor Documentation

MSlot::MSlot ( )
inline

Member Function Documentation

void Slot::addtexture ( int  type,
const char *  filename 
)
inherited
void Slot::addvariant ( VSlot vs)
inlineinherited

References VSlot::next.

Referenced by VSlot::VSlot().

void MSlot::cleanup ( )
inline

References VSlot::cleanup(), and Slot::cleanup().

Referenced by cleanupmaterialslots().

void Slot::combinetextures ( int  index,
Slot::Tex t,
bool  msg = true,
bool  forceload = false 
)
inherited

Combine and load texture data to be ready for sending it to the gpu.

Combination is used to merge the diffuse and the specularity map into one texture (spec as alpha) and to merge the normal info and the depth info into another (depth as alpha)

Parameters
index
tOutput texture made from seperate textures being combined
msgshow progress bar
forceload

References Slot::Tex::combined, tiger::compress(), ImageData::compressed, gencombinedname(), vector< T, MINSIZE >::getbuf(), gettexture(), ImageData::h, loopv, mergedepth(), mergespec(), newtexture(), notexture, scaleimage(), Slot::sts, Slot::Tex::t, TEX_DEPTH, TEX_DIFFUSE, TEX_NORMAL, TEX_SPEC, Slot::texmask, texturedata(), Slot::Tex::type, and ImageData::w.

Referenced by Slot::load().

Slot::Tex * Slot::findtexture ( int  type)
inherited

Find a texture in the sts array, depending on type (beeing one of TEX_DIFFUSE to TEX_NUM).

References loopv, and Slot::sts.

Referenced by gencombinedname().

VSlot * Slot::findvariant ( const VSlot src,
const VSlot delta 
)
inherited

References VSlot::changed, comparevslot(), and VSlot::next.

Referenced by editvslot(), and unpacktex().

Slot & Slot::load ( bool  msg,
bool  forceload 
)
inherited
void Slot::loadlayermask ( )
inherited
Texture * Slot::loadthumbnail ( )
inherited
void MSlot::reset ( )
inline

References VSlot::reset(), and Slot::reset().

Referenced by clearslots(), and materialreset().

VSlot * Slot::setvariantchain ( VSlot vs)
inherited

Sets a chain of VSlot variants for the owner slot.

References VSlot::linked, VSlot::next, and VSlot::slot.

Referenced by emptyvslot().

Member Data Documentation

float VSlot::alphaback
inherited
float VSlot::alphafront
inherited
char* Slot::autograss
inherited
int VSlot::changed
inherited
vec VSlot::colorscale
inherited
vec VSlot::glowcolor
inherited
Texture* Slot::grasstex
inherited
int VSlot::index
inherited
int Slot::index
inherited
int VSlot::layer
inherited
ImageData* Slot::layermask
inherited
int Slot::layermaskmode
inherited
char* Slot::layermaskname
inherited
float Slot::layermaskscale
inherited
bool VSlot::linked
inherited
bool Slot::loaded
inherited
VSlot* VSlot::next
inherited
ivec2 VSlot::offset
inherited
vector<SlotShaderParam> VSlot::params
inherited
vector<SlotShaderParam> Slot::params
inherited
int VSlot::rotation
inherited
float VSlot::scale
inherited
vec2 VSlot::scroll
inherited
Shader* Slot::shader
inherited
Slot* VSlot::slot
inherited
vector<Tex> Slot::sts
inherited
uint Slot::texmask
inherited
Texture * Slot::thumbnail
inherited
VSlot* Slot::variants
inherited

The documentation for this struct was generated from the following file: