awScene.MaterialCatalog Class Reference


Detailed Description

MaterialCatalog manages the material tables associated with a scene.

A scene may have multiple material tables, representing the sets of of materials available to the scene. Material tables are identified by specifying an ID when adding a table to the catalog.

MaterialCatalog is a singleton, with a reference accessible through the instance() method. The MaterialCatalog must be explicitly destroyed before program termination through the destruct() method.

#include <classaw_scene_1_1_material_catalog.h>

List of all members.

Public Member Functions

MaterialCatalog  instance ()
  Returns an instance of material catalog.
  destruct ()
  Deletes the instance of material catalog if one exists.
  setMaterialTable (str id, awScene.MaterialTableRef materials)
  Associates and stores the given material table using the given ID.
  removeMaterialTable (str id)
  Removes the material table associated with the given ID, if it exists.
int  getMaterialTableCount ()
  Returns the number of material tables currently in the catalog.
bool  hasMaterialTable (str id)
  Returns true if there is a table associated with the given ID; false otherwise.
awScene MaterialTableRef  getMaterialTable (str id)
  Returns the material table associated with the given ID; a NULL ref if the table for the given ID does not exist.
  setDefaultMaterial (MaterialRef material)
  Set and get default material.
MaterialRef  getDefaultMaterial ()
  setSelectedMaterial (MaterialRef material)
  Set and get "selected" and "highlighted" material.
MaterialRef  getSelectedMaterial ()
  setSelectedParentMaterial (MaterialRef material)
MaterialRef  getSelectedParentMaterial ()
  setHighlightMaterial (MaterialRef material)
MaterialRef  getHighlightMaterial ()
  setAffectedMaterial (MaterialRef material)
MaterialRef  getAffectedMaterial ()
  setSelectedDecalMaterial (MaterialRef material)
MaterialRef  getSelectedDecalMaterial ()
  setSelectedParentDecalMaterial (MaterialRef material)
MaterialRef  getSelectedParentDecalMaterial ()
  setHighlightDecalMaterial (MaterialRef material)
MaterialRef  getHighlightDecalMaterial ()
  setSelectionGridVelocity (float v)
float  getSelectionGridVelocity ()
  setNormalAndDepthMaterial (MaterialRef material)
  This material is used in SSAO to generate the (normal,depth) texture.
MaterialRef  getNormalAndDepthMaterial ()
  setNormalDepthIDMaterial (MaterialRef material)
  This material is used in NPR to generate the (normal,depth, objectID) texture.
MaterialRef  getNormalDepthIDMaterial ()

Protected Member Functions

  __init__ ()
  __del__ ()

Member Function Documentation

MaterialCatalog awScene.MaterialCatalog.instance ( )

Returns an instance of material catalog.

awScene.MaterialCatalog.destruct ( )

Deletes the instance of material catalog if one exists.

awScene.MaterialCatalog.setMaterialTable ( str  id,
awScene.MaterialTableRef  materials 
)

Associates and stores the given material table using the given ID.

awScene.MaterialCatalog.removeMaterialTable ( str  id )

Removes the material table associated with the given ID, if it exists.

int awScene.MaterialCatalog.getMaterialTableCount ( )

Returns the number of material tables currently in the catalog.

bool awScene.MaterialCatalog.hasMaterialTable ( str  id )

Returns true if there is a table associated with the given ID; false otherwise.

awScene MaterialTableRef awScene.MaterialCatalog.getMaterialTable ( str  id )

Returns the material table associated with the given ID; a NULL ref if the table for the given ID does not exist.

awScene.MaterialCatalog.setDefaultMaterial ( MaterialRef  material )

Set and get default material.

MaterialRef awScene.MaterialCatalog.getDefaultMaterial ( )
awScene.MaterialCatalog.setSelectedMaterial ( MaterialRef  material )

Set and get "selected" and "highlighted" material.

Be careful with set, not everything is appropriate for display :-)

MaterialRef awScene.MaterialCatalog.getSelectedMaterial ( )
awScene.MaterialCatalog.setSelectedParentMaterial ( MaterialRef  material )
MaterialRef awScene.MaterialCatalog.getSelectedParentMaterial ( )
awScene.MaterialCatalog.setHighlightMaterial ( MaterialRef  material )
MaterialRef awScene.MaterialCatalog.getHighlightMaterial ( )
awScene.MaterialCatalog.setAffectedMaterial ( MaterialRef  material )
MaterialRef awScene.MaterialCatalog.getAffectedMaterial ( )
awScene.MaterialCatalog.setSelectedDecalMaterial ( MaterialRef  material )
MaterialRef awScene.MaterialCatalog.getSelectedDecalMaterial ( )
awScene.MaterialCatalog.setSelectedParentDecalMaterial ( MaterialRef  material )
MaterialRef awScene.MaterialCatalog.getSelectedParentDecalMaterial ( )
awScene.MaterialCatalog.setHighlightDecalMaterial ( MaterialRef  material )
MaterialRef awScene.MaterialCatalog.getHighlightDecalMaterial ( )
awScene.MaterialCatalog.setSelectionGridVelocity ( float  v )
float awScene.MaterialCatalog.getSelectionGridVelocity ( )
awScene.MaterialCatalog.setNormalAndDepthMaterial ( MaterialRef  material )

This material is used in SSAO to generate the (normal,depth) texture.

MaterialRef awScene.MaterialCatalog.getNormalAndDepthMaterial ( )
awScene.MaterialCatalog.setNormalDepthIDMaterial ( MaterialRef  material )

This material is used in NPR to generate the (normal,depth, objectID) texture.

MaterialRef awScene.MaterialCatalog.getNormalDepthIDMaterial ( )
awScene.MaterialCatalog.__init__ ( ) [protected]
awScene.MaterialCatalog.__del__ ( ) [protected]

awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog
awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog awScene.MaterialCatalog