15 #ifndef CULLBINMANAGER_H 16 #define CULLBINMANAGER_H 18 #include "pandabase.h" 20 #include "cullBinEnums.h" 21 #include "pointerTo.h" 25 #include "vector_int.h" 26 #include "pStatCollector.h" 42 typedef CullBin::BinType BinType;
44 int add_bin(
const string &name, BinType type,
int sort);
45 void remove_bin(
int bin_index);
47 INLINE
int get_num_bins()
const;
48 INLINE
int get_bin(
int n)
const;
49 MAKE_SEQ(get_bins, get_num_bins, get_bin);
50 int find_bin(
const string &name)
const;
52 INLINE
string get_bin_name(
int bin_index)
const;
54 INLINE BinType get_bin_type(
int bin_index)
const;
55 INLINE BinType get_bin_type(
const string &name)
const;
56 INLINE
void set_bin_type(
int bin_index, BinType type);
57 INLINE
void set_bin_type(
const string &name, BinType type);
59 INLINE
int get_bin_sort(
int bin_index)
const;
60 INLINE
int get_bin_sort(
const string &name)
const;
61 INLINE
void set_bin_sort(
int bin_index,
int sort);
62 INLINE
void set_bin_sort(
const string &name,
int sort);
64 INLINE
bool get_bin_active(
int bin_index)
const;
65 INLINE
bool get_bin_active(
const string &name)
const;
66 INLINE
void set_bin_active(
int bin_index,
bool active);
67 INLINE
void set_bin_active(
const string &name,
bool active);
70 INLINE
bool get_bin_flash_active(
int bin_index)
const;
71 INLINE
const LColor &get_bin_flash_color(
int bin_index)
const;
72 INLINE
void set_bin_flash_active(
int bin_index,
bool active);
73 INLINE
void set_bin_flash_color(
int bin_index,
const LColor &
color);
76 void write(ostream &out)
const;
88 typedef CullBin *BinConstructor(
const string &name,
92 void register_bin_type(BinType type, BinConstructor *constructor);
96 void setup_initial_bins();
97 static BinType parse_bin_type(
const string &bin_type);
99 class EXPCL_PANDA_PGRAPH BinDefinition {
111 typedef epvector<BinDefinition> BinDefinitions;
112 BinDefinitions _bin_definitions;
117 INLINE
bool operator () (
int a,
int b)
const;
122 BinsByName _bins_by_name;
124 typedef vector_int SortedBins;
125 SortedBins _sorted_bins;
126 bool _bins_are_sorted;
127 bool _unused_bin_index;
130 BinConstructors _bin_constructors;
133 friend class SortBins;
136 EXPCL_PANDA_PGRAPH ostream &
137 operator << (ostream &out, CullBinManager::BinType bin_type);
139 #include "cullBinManager.I"
A collection of Geoms and their associated state, for a particular scene.
Provides scoping for the enumerated type shared by CullBin and CullBinManager.
A lightweight class that represents a single element that may be timed and/or counted via stats...
This is the base class for all three-component vectors and points.
This stores the result of a BinCullHandler traversal: an ordered collection of CullBins, each of which holds a number of Geoms and RenderStates to be rendered in some defined order.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
This is a global object that maintains the collection of named CullBins in the world.