Drag[en]gine Game Engine  1.0
deModelTexture Class Reference

Model texture. More...

#include <deModelTexture.h>

Public Member Functions

Constructors and Destructors
 deModelTexture (const char *name, int width, int height)
 Create model texture. More...
 
 ~deModelTexture ()
 Clean up model texture. More...
 
Management
const decStringGetName () const
 Name. More...
 
int GetWidth () const
 Width. More...
 
int GetHeight () const
 Height. More...
 
bool GetDoubleSided () const
 Faces of this texture are double sided. More...
 
void SetDoubleSided (bool doubleSided)
 Set if faces of this texture are double sided. More...
 
bool GetDecal () const
 Faces of this texture are rendered as decals. More...
 
void SetDecal (bool decal)
 Set if faces of this texture are rendered as decals. More...
 
int GetDecalOffset () const
 Decal offset. More...
 
void SetDecalOffset (int offset)
 Set decal offset. More...
 

Detailed Description

Model texture.

Faces viewn from the back side are invisible. If double-sided is set back faces are also rendered as if they are front faces. This can be used for thin geometry represented by a single face. THe same is true for shadow casting. Back faces do not cast shadows unless double-sided is set.

If faces are set to be rendered as decals they are rendered similar to how deDecal are rendered with the difference they are not generated by projecting a quadrilateral onto the mesh but using the faces instead. If decal is set the decal offset parameter is used to determine the amount of offset relative to other decal set textures. Larger numbers cover textures with lower decal offset.

Author
Pl├╝ss Roland
Version
1.0
Date
2016

Constructor & Destructor Documentation

◆ deModelTexture()

deModelTexture::deModelTexture ( const char *  name,
int  width,
int  height 
)

Create model texture.

◆ ~deModelTexture()

deModelTexture::~deModelTexture ( )

Clean up model texture.

Member Function Documentation

◆ GetDecal()

bool deModelTexture::GetDecal ( ) const
inline

Faces of this texture are rendered as decals.

References SetDecal().

◆ GetDecalOffset()

int deModelTexture::GetDecalOffset ( ) const
inline

Decal offset.

References SetDecalOffset().

◆ GetDoubleSided()

bool deModelTexture::GetDoubleSided ( ) const
inline

Faces of this texture are double sided.

References SetDoubleSided().

◆ GetHeight()

int deModelTexture::GetHeight ( ) const
inline

Height.

◆ GetName()

const decString& deModelTexture::GetName ( ) const
inline

Name.

◆ GetWidth()

int deModelTexture::GetWidth ( ) const
inline

Width.

◆ SetDecal()

void deModelTexture::SetDecal ( bool  decal)

Set if faces of this texture are rendered as decals.

Referenced by GetDecal().

◆ SetDecalOffset()

void deModelTexture::SetDecalOffset ( int  offset)

Set decal offset.

Referenced by GetDecalOffset().

◆ SetDoubleSided()

void deModelTexture::SetDoubleSided ( bool  doubleSided)

Set if faces of this texture are double sided.

Referenced by GetDoubleSided().


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