GluonGraphics::Item Class Reference

An object in 3D-space. More...

#include <item.h>

Inheritance diagram for GluonGraphics::Item:
QObject

List of all members.

Classes

class  ItemPrivate

Public Slots

virtual void render ()
void setTransform (const QMatrix4x4 transform)
void setMesh (Mesh *mesh)
void setMaterialInstance (MaterialInstance *material)

Public Member Functions

 Item (QObject *parent=0)
virtual ~Item ()
QMatrix4x4 transform ()
Meshmesh ()
MaterialInstancematerialInstance ()

Detailed Description

An object in 3D-space.

The item class describes an object in 3D-space. It is essentially a transformation matrix and a mesh. The Item object tells the associated mesh where it should be rendered. This allows us to reuse a mesh multiple times.

Definition at line 47 of file item.h.


Constructor & Destructor Documentation

Item::Item ( QObject parent = 0  ) 

Definition at line 51 of file item.cpp.

Item::~Item (  )  [virtual]

Definition at line 58 of file item.cpp.


Member Function Documentation

MaterialInstance * Item::materialInstance (  ) 

Retrieve the material instance used by this item.

See also:
GluonGraphics::MaterialInstance
Returns:
The material instance used by this item.

Definition at line 76 of file item.cpp.

Mesh * Item::mesh (  ) 

Retrieve the mesh currently used by this item.

Returns:
The item's mesh.

Definition at line 64 of file item.cpp.

void Item::render (  )  [virtual, slot]

Render the item to screen.

Definition at line 82 of file item.cpp.

void Item::setMaterialInstance ( MaterialInstance material  )  [slot]

Set the material instance that needs to be used by this item.

Parameters:
material The material instance to use.

Definition at line 113 of file item.cpp.

void Item::setMesh ( Mesh mesh  )  [slot]

Set the mesh used by this item.

Parameters:
mesh The mesh to use.

Definition at line 107 of file item.cpp.

void Item::setTransform ( const QMatrix4x4  transform  )  [slot]

Set the transformation used for this item.

Parameters:
transform The new transformation to use.

Definition at line 101 of file item.cpp.

QMatrix4x4 Item::transform (  ) 

Retrieve the transformation matrix associated with this item.

Returns:
The item's transformation matrix.

Definition at line 70 of file item.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:43 2010 for Gluon by  doxygen 1.6.3