RenderItemHandleDecorator Class Reference
 
 
 
RenderItemHandleDecorator Class Reference

This reference page is linked to from the following overview topics: Nitrous Graphics SDK Extensions, About RenderItem.


#include <RenderItemHandleDecorator.h>

Inheritance diagram for RenderItemHandleDecorator:
RenderItemHandle SmartHandle Noncopyable MaxHeapOperators

Class Description

This is a decorator class for RenderItemHandle.

RenderItemHandleDecorator is mainly used when we want to create an additional instance of an existing RenderItemHandle, namely a decorator. The decorator will share the same render geometry of the original render item but it will have some different visual appearance. For e.g, it would have different material assigned, different world position or visibility group, etc. In such cases, there's no need to completely copy the original render item of which we can simply create a decorator. And we can specify the different visual appearance/behavior for the decorator.

Public Member Functions

GraphicsDriverAPI  RenderItemHandleDecorator ()
GraphicsDriverAPI  RenderItemHandleDecorator (const RenderItemHandleDecorator &from)
GraphicsDriverAPI
RenderItemHandleDecorator
operator= (const RenderItemHandleDecorator &from)
virtual GraphicsDriverAPI  ~RenderItemHandleDecorator ()
GraphicsDriverAPI bool  Initialize (const RenderItemHandle &itemToDecorate)
  Initialize the decorator.
GraphicsDriverAPI RenderItemHandle  GetDecoratedRenderItem () const
  Get the decorated render item.
GraphicsDriverAPI void  SetOffsetMatrix (const Matrix44 &offsetMatrix)
  Set the offset matrix for the decorator.
GraphicsDriverAPI bool  GetOffsetMatrix (Matrix44 &offsetMatrix) const
  Get the offset matrix.
GraphicsDriverAPI void  SetAbsoluteMatrix (const Matrix44 &absoluteMatrix)
  Set the absolute matrix for the decorator.
GraphicsDriverAPI bool  GetAbsoluteMatrix (Matrix44 &absoluteMatrix) const
  Get the absolute matrix.

Constructor & Destructor Documentation

GraphicsDriverAPI RenderItemHandleDecorator ( )
GraphicsDriverAPI RenderItemHandleDecorator ( const RenderItemHandleDecorator from )
virtual GraphicsDriverAPI ~RenderItemHandleDecorator ( ) [virtual]

Member Function Documentation

GraphicsDriverAPI RenderItemHandleDecorator& operator= ( const RenderItemHandleDecorator from )
GraphicsDriverAPI bool Initialize ( const RenderItemHandle itemToDecorate )

Initialize the decorator.

Parameters:
itemToDecorate the original render item to be decorated.
Returns:
true if itemToDecorate can be decorated or false otherwise. Note CustomRenderItemHandle can't be decorated.
GraphicsDriverAPI RenderItemHandle GetDecoratedRenderItem ( ) const

Get the decorated render item.

Parameters:
the original render item to be decorated.
GraphicsDriverAPI void SetOffsetMatrix ( const Matrix44 offsetMatrix )

Set the offset matrix for the decorator.

The world position of this decorator would be an offset from the world position of the node owning it.

Note:
Calling this function will simply override the inner state resulted from any previous call to SetAbsoluteMatrix()
Parameters:
the offset matrix
GraphicsDriverAPI bool GetOffsetMatrix ( Matrix44 offsetMatrix ) const

Get the offset matrix.

Parameters:
[out] offsetMatrix use this parameter to get the offset matrix
Returns:
true if an offset matrix has been assign to this decorator or false otherwise
GraphicsDriverAPI void SetAbsoluteMatrix ( const Matrix44 absoluteMatrix )

Set the absolute matrix for the decorator.

The world position of this decorator would be directly determined by absoluteMatrix.

Note:
Calling this function will simply override the inner state resulted from any previous call to SetOffsetMatrix()
Parameters:
the absoluteMatrix matrix
GraphicsDriverAPI bool GetAbsoluteMatrix ( Matrix44 absoluteMatrix ) const

Get the absolute matrix.

Parameters:
[out] absoluteMatrix use this parameter to get the absolute matrix
Returns:
true if an absolute matrix has been assign to this decorator or false otherwise