00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
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
00060 GZ_GRAPH_EXPORT virtual gzReference* clone() const=0;
00061
00062
00063 };
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
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
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
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
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);
00124
00125
00126 GZ_GRAPH_EXPORT virtual gzReference* clone() const;
00127
00128
00129
00130 GZ_GRAPH_EXPORT virtual gzBool isTraversable( gzTraverseAction *action , gzNode *node , gzULong index , gzContext *context );
00131
00132
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