panda3d.core.CullBinManager

class CullBinManager

Bases: CullBinEnums

This is a global object that maintains the collection of named CullBins in the world.

Inheritance diagram

Inheritance diagram of CullBinManager

addBin(name: str, type: BinType, sort: int) → int

Defines a new bin with the indicated name, and returns the new bin_index. If there is already a bin with the same name returns its bin_index if it had the same properties; otherwise, reports an error and returns -1.

removeBin(bin_index: int) → None

Permanently removes the indicated bin. This operation is not protected from the pipeline and will disturb whatever is currently rendering in draw. You should not call this during the normal course of rendering a frame; it is intended only as an aid to development, to allow the developer to interactively fiddle with the set of bins.

getNumBins() → int

Returns the number of bins in the world.

getBin(n: int) → int

Returns the bin_index of the nth bin in the set, where n is a number between 0 and getNumBins(). This returns the list of bin_index numbers, in sorted order (that is, in the order in which the bins should be rendered).

findBin(name: str) → int

Returns the bin_index associated with the bin of the given name, or -1 if no bin has that name.

getBinName(bin_index: int) → str

Returns the name of the bin with the indicated bin_index (where bin_index was retrieved by getBin() or findBin()). The bin’s name may not be changed during the life of the bin.

getBinType(bin_index: int) → BinType

Returns the type of the bin with the indicated bin_index (where bin_index was retrieved by getBin() or findBin()).

Return type

BinType

getBinType(name: str) → BinType

Returns the type of the bin with the indicated name.

Return type

BinType

setBinType(bin_index: int, type: BinType) → None

Changes the type of the bin with the indicated bin_index (where bin_index was retrieved by getBin() or findBin()).

The change might be effective immediately, or it might take place next frame, depending on the bin type.

setBinType(name: str, type: BinType) → None

Changes the type of the bin with the indicated name.

The change might be effective immediately, or it might take place next frame, depending on the bin type.

getBinSort(bin_index: int) → int

Returns the sort order of the bin with the indicated bin_index (where bin_index was retrieved by getBin() or findBin()).

The bins are rendered in increasing order by their sort order; this number may be changed from time to time to reorder the bins.

getBinSort(name: str) → int

Returns the sort order of the bin with the indicated name.

The bins are rendered in increasing order by their sort order; this number may be changed from time to time to reorder the bins.

setBinSort(bin_index: int, sort: int) → None

Changes the sort order of the bin with the indicated bin_index (where bin_index was retrieved by getBin() or findBin()).

The bins are rendered in increasing order by their sort order; this number may be changed from time to time to reorder the bins.

setBinSort(name: str, sort: int) → None

Changes the sort order of the bin with the indicated name.

The bins are rendered in increasing order by their sort order; this number may be changed from time to time to reorder the bins.

getBinActive(bin_index: int) → bool

Returns the active flag of the bin with the indicated bin_index (where bin_index was retrieved by getBin() or findBin()).

When a bin is marked inactive, all geometry assigned to it is not rendered.

getBinActive(name: str) → bool

Returns the active flag of the bin with the indicated name.

When a bin is marked inactive, all geometry assigned to it is not rendered.

setBinActive(bin_index: int, active: bool) → None

Changes the active flag of the bin with the indicated bin_index (where bin_index was retrieved by getBin() or findBin()).

When a bin is marked inactive, all geometry assigned to it is not rendered.

setBinActive(name: str, active: bool) → None

Changes the active flag of the bin with the indicated name.

When a bin is marked inactive, all geometry assigned to it is not rendered.

getBinFlashActive(bin_index: int) → bool

Returns true if the bin with the given bin_index is configured to flash at a predetermined color (where bin_index was retrieved by getBin() or findBin()).

This method is not available in release builds.

getBinFlashColor(bin_index: int) → LColor

Returns the color that this bin has been configured to flash to, if configured.

This method is not available in release builds.

Return type

LColor

setBinFlashActive(bin_index: int, active: bool) → None

When set to true, the given bin_index is configured to flash at a predetermined color (where bin_index was retrieved by getBin() or findBin()).

This method is not available in release builds.

setBinFlashColor(bin_index: int, color: LColor) → None

Changes the flash color for the given bin index.

This method is not available in release builds.

write(out: ostream) → None
static getGlobalPtr() → CullBinManager

Returns the pointer to the global CullBinManager object.

Return type

CullBinManager

getBins() → list