Gizmo3D

gzCuller.h

Go to the documentation of this file.
00001 //*****************************************************************************
00002 // File         : gzCuller.h
00003 // Module       : 
00004 // Description  : Class definition of the gzCuller utility 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  991222  Created file    
00020 //
00021 //******************************************************************************
00022 #ifndef __GZ_CULLER_H__
00023 #define __GZ_CULLER_H__
00024 
00030 #include "gzMatrix.h"
00031 #include "gzGroup.h"
00032 
00033 
00034 
00035 //******************************************************************************
00036 // Class    : gzCuller
00037 //                                  
00038 // Purpose  : Base Interface for culling and occlusion testing in scene graph
00039 //                                  
00040 // Notes    : Only used internally  
00041 //                                  
00042 // Revision History...                          
00043 //                                  
00044 // Who  Date    Description                     
00045 //                                  
00046 // AMO  991222  Created 
00047 //                                  
00048 //******************************************************************************
00049 class gzCuller : public gzReference
00050 {
00051 public:
00052 
00053     GZ_GRAPH_EXPORT gzCuller(){};
00054 
00055     GZ_GRAPH_EXPORT virtual ~gzCuller(){};
00056 
00057     GZ_GRAPH_EXPORT virtual gzBool isVisible( const gzVec3 &pos , const gzReal &rad , gzNode *node)=0;
00058 
00059     // ---------- Clone interface ---------------------------------------
00060     GZ_GRAPH_EXPORT virtual gzReference* clone() const=0;
00061 
00062 
00063 };
00064 
00065 //******************************************************************************
00066 // Class    : gzConeCuller
00067 //                                  
00068 // Purpose  : Base Interface for culling and occlusion testing in scene graph
00069 //                                  
00070 // Notes    : Only used internally  
00071 //                                  
00072 // Revision History...                          
00073 //                                  
00074 // Who  Date    Description                     
00075 //                                  
00076 // AMO  991222  Created 
00077 //                                  
00078 //******************************************************************************
00079 class gzConeCuller : public gzCuller
00080 {
00081 public:
00082 
00083     GZ_GRAPH_EXPORT gzConeCuller(gzNode *node , gzMatrix4 & transform , gzReal & maxscale);
00084 
00085     GZ_GRAPH_EXPORT virtual ~gzConeCuller(){};
00086 
00087     GZ_GRAPH_EXPORT virtual gzBool isVisible( const gzVec3 &pos , const gzReal &rad , gzNode *node);
00088 
00089     // ---------- Clone interface ---------------------------------------
00090     GZ_GRAPH_EXPORT virtual gzReference* clone() const;
00091 
00092 private:
00093 
00094     gzVec3  m_pos;
00095     gzReal  m_rad;
00096     gzReal  m_length;
00097     gzReal  m_alpha;
00098 };
00099 
00100 
00101 //******************************************************************************
00102 // Class    : gzViewPlaneCuller
00103 //                                  
00104 // Purpose  : Culls children when loceated on a certian side of a view plane
00105 //                                  
00106 // Notes    :   
00107 //                                  
00108 // Revision History...                          
00109 //                                  
00110 // Who  Date    Description                     
00111 //                                  
00112 // AMO  030718  Created 
00113 //                                  
00114 //******************************************************************************
00115 class gzViewPlaneCuller : public gzGroup
00116 {
00117 public:
00118 
00119     GZ_GRAPH_EXPORT gzViewPlaneCuller(const gzString & name=GZ_EMPTY_STRING);
00120 
00121     GZ_GRAPH_EXPORT virtual ~gzViewPlaneCuller(){};
00122 
00123     GZ_DECLARE_TYPE_INTERFACE_EXPORT(GZ_GRAPH_EXPORT);  // typed interface
00124 
00125     // ---------- Clone interface ---------------------------------------
00126     GZ_GRAPH_EXPORT virtual gzReference* clone() const;
00127 
00128     // ---------- Action Interface --------------------------------------
00129 
00130     GZ_GRAPH_EXPORT virtual gzBool  isTraversable( gzTraverseAction *action , gzNode *node , gzULong index , gzContext *context );
00131 
00132     // ---------- gzConeCuller ----------------------------------
00133 
00134     GZ_GRAPH_EXPORT gzVoid setViewPlane(const gzVec3 &position, const gzVec3 & cullDirection);
00135 
00136 private:
00137 
00138     gzVec3  m_cullPosition;
00139 
00140     gzVec3  m_cullDirection;
00141 
00142 };
00143 
00144 
00145 
00146 #endif

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