Gizmo3D

gzRecursive.h

Go to the documentation of this file.
00001 //*****************************************************************************
00002 // File         : gzRecursive.h
00003 // Module       : 
00004 // Description  : Class definition of the gzRecursive 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  991116  Created file    
00020 //
00021 //******************************************************************************
00022 #ifndef __GZ_RECURSIVE_H__
00023 #define __GZ_RECURSIVE_H__
00024 
00029 #include "gzGroup.h"
00030 #include "gzThread.h"
00031 
00032 class gzRecursiveData 
00033 {
00034 public:
00035 
00036     gzRecursiveData():depth(0){};
00037     virtual ~gzRecursiveData(){};
00038 
00039     gzReal depth;
00040 
00041     gzQueue<gzReal> depthStorage;
00042 };
00043 
00044 
00045 //******************************************************************************
00046 // Class    : gzRecursive
00047 //                                  
00048 // Purpose  : -
00049 //                                  
00050 // Notes    : - 
00051 //                                  
00052 // Revision History...                          
00053 //                                  
00054 // Who  Date    Description                     
00055 //                                  
00056 // AMO  991116  Created 
00057 //                                  
00058 //******************************************************************************
00059 class gzRecursive : public gzGroup
00060 {
00061 public:
00062     GZ_GRAPH_EXPORT gzRecursive(const gzString & name=GZ_EMPTY_STRING);
00063     GZ_GRAPH_EXPORT virtual ~gzRecursive();
00064 
00065     GZ_GRAPH_EXPORT gzRecursive(const gzRecursive &copy);
00066 
00067     GZ_DECLARE_TYPE_INTERFACE_EXPORT(GZ_GRAPH_EXPORT);  // typed interface
00068 
00069 
00070     // ---------- Clone interface ---------------------------------------
00071     GZ_GRAPH_EXPORT virtual gzReference* clone() const;
00072 
00073 
00074     // ---------- Common graph functions --------------------------------
00075 
00076     GZ_GRAPH_EXPORT virtual gzVoid updateNode();
00077 
00078     GZ_GRAPH_EXPORT virtual gzVoid  updateNodeData(gzBool force=FALSE);
00079 
00080     // ---------- Action Interface --------------------------------------
00081 
00082     GZ_GRAPH_EXPORT virtual gzVoid preTraverseAction( gzTraverseAction *actionclass , gzContext *context);
00083     GZ_GRAPH_EXPORT virtual gzBool isTraversable( gzTraverseAction *action , gzNode *node , gzULong index, gzContext *context);
00084     GZ_GRAPH_EXPORT virtual gzVoid postTraverseAction( gzTraverseAction *actionclass , gzContext *context);
00085 
00086     GZ_GRAPH_EXPORT virtual gzActionStage useActionStage( gzTraverseAction *actionclass , gzContext *context);
00087 
00088     // ---------- Recursive ---------------------------------------------
00089 
00090     GZ_GRAPH_EXPORT gzVoid  setMaxDepth( gzReal depth );
00091     GZ_GRAPH_EXPORT gzVoid  setTransform(const gzMatrix4 &transform);
00092     GZ_GRAPH_EXPORT gzVoid  setMaxDepthNode(gzNode *node);
00093     GZ_GRAPH_EXPORT gzVoid  useDistanceDepth(gzBool on);
00094     GZ_GRAPH_EXPORT gzVoid  setDistanceDepthEquation(gzReal farDistance=100,gzReal speed=1);
00095 
00096     // ---------- Render models -----------------------------------------
00097 
00098     GZ_GRAPH_EXPORT gzVoid  renderOnRecursion( gzBool on=FALSE );
00099 
00100     GZ_GRAPH_EXPORT gzVoid  transferLightStates( gzBool on=FALSE );
00101 
00102 
00103     // ---------- Debug function ----------------------------------------
00104     GZ_GRAPH_EXPORT virtual gzVoid  debugOutputTraverse(gzString base , gzString anchor , gzDebugFlags features);
00105     GZ_GRAPH_EXPORT virtual gzVoid  debugOutput(gzString base , gzString anchor , gzDebugFlags features);
00106 
00107     GZ_GRAPH_EXPORT virtual gzNode *    find(const gzString &path,gzBool recursive=TRUE);
00108     GZ_GRAPH_EXPORT virtual gzBool      hasSiblingNode(gzNode *child);
00109 
00110     // --------- Properties --------------------------------------------
00111 
00112     GZ_PROPERTY_EXPORT(gzBool,          RelativeSceneTransform,     GZ_GRAPH_EXPORT);
00113 
00114 protected:
00115 
00116     GZ_GRAPH_EXPORT gzReal  evaluateMaxDepth(gzContext *context);
00117 
00118     gzReal                                              m_maxDepth;
00119     gzLateBindData<gzMatrix4>                           m_transform;
00120     gzReal                                              m_maxscale;
00121     gzRefPointer<gzNode>                                m_maxDepthNode;
00122 
00123     gzLateBindData<gzRealXY>                            m_distanceEquation;
00124 
00125     gzBool                                              m_renderOnRecursion:1;
00126     gzBool                                              m_transferLightState:1;
00127 
00128     gzULong                                             m_id;
00129     static gzUniqueIDManager                            s_idManager;
00130 };
00131 
00132 
00133 #endif

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