Gizmo3D

gzRenderAction.h

Go to the documentation of this file.
00001 //*****************************************************************************
00002 // File         : gzRenderAction.h
00003 // Module       : 
00004 // Description  : Class definition of the gzRenderAction class
00005 // Author       : Anders Modén      
00006 // Product      : Gizmo3D 2.1.1
00007 //      
00008 // Copyright © 2003- Saab Training Systems AB, Sweden   
00009 //          
00010 // NOTE:    Gizmo3D is a high performance 3D Scene Graph and effect visualisation 
00011 //          C++ toolkit for Linux, Mac OS X, Windows (Win32) and IRIX® for  
00012 //          usage in Game or VisSim development.
00013 //
00014 //
00015 // Revision History...                          
00016 //                                  
00017 // Who  Date    Description                     
00018 //                                  
00019 // AMO  981127  Created file    
00020 //
00021 //******************************************************************************
00022 #ifndef __GZ_RENDER_ACTION_H__
00023 #define __GZ_RENDER_ACTION_H__
00024 
00031 #include "gzNode.h"
00032 #include "gzCamera.h"
00033 #include "gzMatrix.h"
00034 #include "gzEnvironment.h"
00035 
00036 class gzRenderNode
00037 {
00038 public:
00039     gzNode              *node;
00040     gzULong             stateAttributeIndex;
00041     gzULong             transformIndex;
00042     gzULong             transformUpdateID;
00043     gzULong             transformBaseIndex;
00044     gzULong             lightStateIndex;
00045     gzULong             clipStateIndex;
00046     gzULong             fogStateIndex;
00047 };
00048 
00049 //******************************************************************************
00050 // Class    : gzRenderAction
00051 //                                  
00052 // Purpose  : -
00053 //                                  
00054 // Notes    : - 
00055 //                                  
00056 // Revision History...                          
00057 //                                  
00058 // Who  Date    Description                     
00059 //                                  
00060 // AMO  981127  Created 
00061 //                                  
00062 //******************************************************************************
00063 class gzRenderAction : public gzTraverseAction
00064 {
00065 public:
00066     GZ_DECLARE_TYPE_INTERFACE_EXPORT(GZ_GRAPH_EXPORT);  // typed interface
00067 
00068     GZ_GRAPH_EXPORT gzRenderAction();
00069     GZ_GRAPH_EXPORT virtual ~gzRenderAction(){};
00070 
00071     GZ_GRAPH_EXPORT gzVoid reset(gzContext *context,gzBool mainLoop);
00072 
00073     GZ_GRAPH_EXPORT gzVoid render(gzNode *node ,gzContext *context,gzBool mainLoop);
00074     GZ_GRAPH_EXPORT gzVoid renderGroup(gzGroup *group ,gzContext *context,gzBool mainLoop);
00075     GZ_GRAPH_EXPORT gzVoid executeRenderStages(gzContext *context);
00076 
00077     // ----------------- stage management -------------------------------
00078     GZ_GRAPH_EXPORT gzVoid addNodeToRenderStage( gzContext *context , gzNode *node , gzActionStage stage);
00079     GZ_GRAPH_EXPORT gzVoid renderStage(gzContext *context , gzActionStage stage);
00080     GZ_GRAPH_EXPORT gzVoid setCamera(gzCamera *camera);
00081 
00082     // ----------------- Compiled stages --------------------------------
00083     GZ_GRAPH_EXPORT static gzVoid convertToCompiledStages(const gzMatrix4 &inv,gzContext *context);
00084     GZ_GRAPH_EXPORT static gzVoid addReferenceToCompiledStages(gzContext *context);
00085     GZ_GRAPH_EXPORT static gzVoid releaseReferenceToCompiledStages(gzContext *context);
00086     GZ_GRAPH_EXPORT static gzVoid expandMatrixGeometry(gzContext *context);
00087 
00088 
00089 protected:
00090 
00091     GZ_GRAPH_EXPORT virtual gzBool checkBoundary(gzContext *context , gzNode *node);
00092 
00093     GZ_GRAPH_EXPORT virtual gzVoid preTraverseAction( gzNode *node , gzContext *context);
00094     GZ_GRAPH_EXPORT virtual gzVoid postTraverseAction( gzNode *node , gzContext *context);
00095 private:
00096 
00097     gzCamera        *m_camera;
00098 };
00099 
00100 #endif

Documentation for Gizmo3D generated at Wed Feb 20 11:54:08 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond