ChildObjectDisplayCallback Class Reference
 
 
 
ChildObjectDisplayCallback Class Reference

#include <SubobjectDisplayUtility.h>

Inheritance diagram for ChildObjectDisplayCallback:
IDisplayCallback ARefObject IDisposable IRefObject MaxHeapOperators MaxHeapOperators

Class Description

This is the utility display callback class for any compound object that would like to customize the display of its child objects so that each child object could decide on its own how its child render items would be rendered when IDisplayCallback::DoDisplay() is invoked.

See also:
class IDisplayCallback, class ImmediateRenderItemHandle

Public Member Functions

GraphicsDriverAPI  ChildObjectDisplayCallback ()
virtual GraphicsDriverAPI  ~ChildObjectDisplayCallback ()
GraphicsDriverAPI size_t  GetNumberOfRenderItems () const
  Get the number of child render items.
GraphicsDriverAPI RenderItemHandle  GetRenderItem (size_t i) const
  Get the i-th child render item.
GraphicsDriverAPI
BaseMaterialHandle 
GetDefaultMaterial (size_t i) const
  Get the material of the i-th child render item.
GraphicsDriverAPI void  AddRenderItem (const RenderItemHandle &pRenderItem, const BaseMaterialHandle &pMaterial)
  Add a child render item.
GraphicsDriverAPI void  RemoveRenderItem (size_t i)
  Remove the child render item with the specified index.
GraphicsDriverAPI void  ClearAllRenderItems ()
  Remove all child render items.

Protected Attributes

ChildObjectDisplayCallbackImp *  mpImp

Constructor & Destructor Documentation

GraphicsDriverAPI ChildObjectDisplayCallback ( )
virtual GraphicsDriverAPI ~ChildObjectDisplayCallback ( ) [virtual]

Member Function Documentation

GraphicsDriverAPI size_t GetNumberOfRenderItems ( ) const

Get the number of child render items.

Returns:
the number of child render items.
GraphicsDriverAPI RenderItemHandle GetRenderItem ( size_t  i ) const

Get the i-th child render item.

Parameters:
i the index of the render item to be retrieved.
Returns:
the i-th child render item.
GraphicsDriverAPI BaseMaterialHandle GetDefaultMaterial ( size_t  i ) const

Get the material of the i-th child render item.

Parameters:
i the index of the child render item.
Returns:
the material of i-th child render item.
GraphicsDriverAPI void AddRenderItem ( const RenderItemHandle pRenderItem,
const BaseMaterialHandle pMaterial 
)

Add a child render item.

Parameters:
pRenderItem the render item to add.
pMaterial the material that is to be assigned to this render item.
GraphicsDriverAPI void RemoveRenderItem ( size_t  i )

Remove the child render item with the specified index.

Parameters:
i the index of the render item to be removed.
GraphicsDriverAPI void ClearAllRenderItems ( )

Remove all child render items.


Member Data Documentation

ChildObjectDisplayCallbackImp* mpImp [protected]