AutoRestoreWorldMatrix Class Reference
 
 
 
AutoRestoreWorldMatrix Class Reference

#include <IPrimitiveRenderer.h>

Inheritance diagram for AutoRestoreWorldMatrix:
MaxHeapOperators

Class Description

Description
This is a utility class for automatically restoring the world matrix when we finished rendering a render item.

Public Member Functions

  AutoRestoreWorldMatrix (IPrimitiveRenderer *render)
  The default ctor.
  ~AutoRestoreWorldMatrix ()
  The default dtor.

Constructor & Destructor Documentation

AutoRestoreWorldMatrix ( IPrimitiveRenderer render ) [inline]

The default ctor.

Parameters:
render The primitive render that is to restore its world matrix
                                                                   : 
                        mpRender(render),
                        mOldWorldMatrix(render->GetWorldMatrix())
                { }
~AutoRestoreWorldMatrix ( ) [inline]

The default dtor.

It will restore the world matrix

                {
                        mpRender->SetWorldMatrix(mOldWorldMatrix);
                }