00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CULLRESULT_H
00020 #define CULLRESULT_H
00021
00022 #include "pandabase.h"
00023 #include "cullBin.h"
00024 #include "renderState.h"
00025 #include "cullableObject.h"
00026
00027 #include "referenceCount.h"
00028 #include "pointerTo.h"
00029 #include "pvector.h"
00030 #include "pset.h"
00031
00032 class GraphicsStateGuardianBase;
00033 class TransformState;
00034 class RenderState;
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 class EXPCL_PANDA CullResult : public ReferenceCount {
00048 public:
00049 INLINE CullResult(GraphicsStateGuardianBase *gsg);
00050 INLINE ~CullResult();
00051
00052 PT(CullResult) make_next() const;
00053
00054 INLINE CullBin *get_bin(int bin_index);
00055
00056 void add_object(CullableObject *object);
00057 void finish_cull();
00058 void draw();
00059
00060 public:
00061 static void bin_removed(int bin_index);
00062
00063 private:
00064 CullBin *make_new_bin(int bin_index);
00065
00066 static CPT(RenderState) get_binary_state();
00067 static CPT(RenderState) get_dual_transparent_state();
00068 static CPT(RenderState) get_dual_transparent_state_decals();
00069 static CPT(RenderState) get_dual_opaque_state();
00070
00071 GraphicsStateGuardianBase *_gsg;
00072
00073 typedef pvector< PT(CullBin) > Bins;
00074 Bins _bins;
00075
00076 typedef pset<CullResult *> CullResults;
00077 static CullResults _cull_results;
00078 };
00079
00080 #include "cullResult.I"
00081
00082 #endif
00083
00084
00085