23 INLINE CullBinManager::SortBins::
36 INLINE
bool CullBinManager::SortBins::
37 operator () (
int a,
int b)
const {
38 return _manager->_bin_definitions[a]._sort < _manager->_bin_definitions[b]._sort;
53 if (!_bins_are_sorted) {
56 return _sorted_bins.size();
70 nassertr(n >= 0 && n < (
int)_sorted_bins.size(), -1);
71 return _sorted_bins[n];
84 nassertr(bin_index >= 0 && bin_index < (
int)_bin_definitions.size(), string());
85 nassertr(_bin_definitions[bin_index]._in_use,
string());
86 return _bin_definitions[bin_index]._name;
98 nassertr(bin_index >= 0 && bin_index < (
int)_bin_definitions.size(), BT_invalid);
99 nassertr(_bin_definitions[bin_index]._in_use, BT_invalid);
100 return _bin_definitions[bin_index]._type;
112 nassertr(bin_index != -1, BT_invalid);
129 nassertv(bin_index >= 0 && bin_index < (
int)_bin_definitions.size());
130 nassertv(_bin_definitions[bin_index]._in_use);
131 _bin_definitions[bin_index]._type = type;
147 nassertv(bin_index != -1);
164 nassertr(bin_index >= 0 && bin_index < (
int)_bin_definitions.size(), 0);
165 nassertr(_bin_definitions[bin_index]._in_use, 0);
166 return _bin_definitions[bin_index]._sort;
182 nassertr(bin_index != -1, 0);
199 nassertv(bin_index >= 0 && bin_index < (
int)_bin_definitions.size());
200 nassertv(_bin_definitions[bin_index]._in_use);
201 _bin_definitions[bin_index]._sort = sort;
202 _bins_are_sorted =
false;
218 nassertv(bin_index != -1);
234 nassertr(bin_index >= 0 && bin_index < (
int)_bin_definitions.size(),
false);
235 nassertr(_bin_definitions[bin_index]._in_use,
false);
236 return _bin_definitions[bin_index]._active;
251 nassertr(bin_index != -1,
false);
267 nassertv(bin_index >= 0 && bin_index < (
int)_bin_definitions.size());
268 nassertv(_bin_definitions[bin_index]._in_use);
269 _bin_definitions[bin_index]._active = active;
284 nassertv(bin_index != -1);
300 nassertr(bin_index >= 0 && bin_index < (
int)_bin_definitions.size(),
false);
301 return _bin_definitions[bin_index]._flash_active;
314 nassertr(bin_index >= 0 && bin_index < (
int)_bin_definitions.size(),
LColor::zero());
315 return _bin_definitions[bin_index]._flash_color;
329 nassertv(bin_index >= 0 && bin_index < (
int)_bin_definitions.size());
330 _bin_definitions[bin_index]._flash_active = active;
342 nassertv(bin_index >= 0 && bin_index < (
int)_bin_definitions.size());
343 _bin_definitions[bin_index]._flash_color = color;
void set_bin_flash_active(int bin_index, bool active)
When set to true, the given bin_index is configured to flash at a predetermined color (where bin_inde...
void set_bin_type(int bin_index, BinType type)
Changes the type of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() ...
void set_bin_active(int bin_index, bool active)
Changes the active flag of the bin with the indicated bin_index (where bin_index was retrieved by get...
const LColor & get_bin_flash_color(int bin_index) const
Returns the color that this bin has been configured to flash to, if configured.
int get_bin_sort(int bin_index) const
Returns the sort order of the bin with the indicated bin_index (where bin_index was retrieved by get_...
bool get_bin_flash_active(int bin_index) const
Returns true if the bin with the given bin_index is configured to flash at a predetermined color (whe...
int get_num_bins() const
Returns the number of bins in the world.
string get_bin_name(int bin_index) const
Returns the name of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() ...
static CullBinManager * get_global_ptr()
Returns the pointer to the global CullBinManager object.
int find_bin(const string &name) const
Returns the bin_index associated with the bin of the given name, or -1 if no bin has that name...
bool get_bin_active(int bin_index) const
Returns the active flag of the bin with the indicated bin_index (where bin_index was retrieved by get...
This is the base class for all three-component vectors and points.
This is a global object that maintains the collection of named CullBins in the world.
void set_bin_flash_color(int bin_index, const LColor &color)
Changes the flash color for the given bin index.
static const LVecBase4f & zero()
Returns a zero-length vector.
void set_bin_sort(int bin_index, int sort)
Changes the sort order of the bin with the indicated bin_index (where bin_index was retrieved by get_...
int get_bin(int n) const
Returns the bin_index of the nth bin in the set, where n is a number between 0 and get_num_bins()...
BinType get_bin_type(int bin_index) const
Returns the type of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() ...