Xface Core Library: XEngine::Drawable Class Reference

XFace / XEngine / XMath

XEngine::Drawable Class Reference
[XEngine]

#include <Drawable.h>

List of all members.


Detailed Description

Author:
Koray Balci
Version:
1.0
Date:
May 2003
Stores the information about the drawables that can be rendered. We store the name of the Mesh and Textures (for the moment, others in the future) as std::string member variables. This class acts only as an alias that stores the references (names) of the real data.

We store the Drawable instances for head, eyes, etc in RenderList object. Renderer (or derived RendererGL) class use the information in Drawable class and retrieves the appropriate data and renders them.


Public Member Functions

Drawableclone (bool duplicateData=true) const
void enableTexture (bool mode)
 Enable texture mapping on/off for this drawable.
bool isTextureOn () const
 Query if texture mapping is enabled.
 Drawable ()
 Default CTor.
 ~Drawable ()
 DTor (not virtual!).
void setMeshName (const std::string &MeshName)
 Sets the name of associated mesh.
const std::string & getMeshName () const
 Retrieves the name of associated mesh.
void setTexName (const std::string id, unsigned short layer=0)
const std::string & getTexName (unsigned short layer=0) const

Member Function Documentation

Drawable* XEngine::Drawable::clone bool  duplicateData = true  )  const [inline]
 

clones the drawable object instance. duplicates data by creating a new Geometry (DeformableGeometry) object and copying the data content by calling Geometry::copyFrom method if duplicateData parameter is true.

const std::string& XEngine::Drawable::getTexName unsigned short  layer = 0  )  const [inline]
 

Retrieves the name of the texture for each layer. Default parameter use the first texture unit.

Parameters:
layer Order of texture unit to be used for this texture.

void XEngine::Drawable::setTexName const std::string  id,
unsigned short  layer = 0
[inline]
 

Sets the name of the texture for each layer. Default parameter use the first texture unit.

Parameters:
id Name of the texture.
layer Order of texture unit to be used for this texture. Defaulted to 0 and cannot be greater than 3.


The documentation for this class was generated from the following file:
Generated on Mon Aug 28 15:39:25 2006 for Xface Core Library by  doxygen 1.4.6-NO