Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
CullBinManager Class Reference

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

Inheritance diagram for CullBinManager:
CullBinEnums

List of all members.

Public Member Functions

int addBin (string name, BinType type, int sort)
 Defines a new bin with the indicated name, and returns the new bin_index.
int findBin (string name)
 Returns the bin_index associated with the bin of the given name, or -1 if no bin has that name.
int getBin (int n)
 Returns the bin_index of the nth bin in the set, where n is a number between 0 and get_num_bins().
bool getBinActive (string name)
 Returns the active flag of the bin with the indicated name.
bool getBinActive (int bin_index)
 Returns the active flag of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() or find_bin()).
string getBinName (int bin_index)
 Returns the name of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() or find_bin()).
list getBins ()
int getBinSort (string name)
 Returns the sort order of the bin with the indicated name.
int getBinSort (int bin_index)
 Returns the sort order of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() or find_bin()).
BinType getBinType (string name)
 Returns the type of the bin with the indicated name.
BinType getBinType (int bin_index)
 Returns the type of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() or find_bin()).
int getNumBins ()
 Returns the number of bins in the world.
 removeBin (int bin_index)
 Permanently removes the indicated bin.
 setBinActive (string name, bool active)
 Changes the active flag of the bin with the indicated name.
 setBinActive (int bin_index, bool active)
 Changes the active flag of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() or find_bin()).
 setBinSort (string name, int sort)
 Changes the sort order of the bin with the indicated name.
 setBinSort (int bin_index, int sort)
 Changes the sort order of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() or find_bin()).
 setBinType (string name, BinType type)
 Changes the type of the bin with the indicated name.
 setBinType (int bin_index, BinType type)
 Changes the type of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() or find_bin()).
 write (ostream out)

Static Public Member Functions

static CullBinManager getGlobalPtr ()
 Returns the pointer to the global CullBinManager object.

Detailed Description

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


Member Function Documentation

int addBin ( string  name,
BinType  type,
int  sort 
)

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.

int findBin ( string  name)

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

int getBin ( int  n)

Returns the bin_index of the nth bin in the set, where n is a number between 0 and get_num_bins().

This returns the list of bin_index numbers, in sorted order (that is, in the order in which the bins should be rendered).

bool getBinActive ( string  name)

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.

bool getBinActive ( int  bin_index)

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

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

string getBinName ( int  bin_index)

Returns the name of the bin with the indicated bin_index (where bin_index was retrieved by get_bin() or find_bin()).

The bin's name may not be changed during the life of the bin.

list getBins ( )
int getBinSort ( string  name)

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.

int getBinSort ( int  bin_index)

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

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

BinType getBinType ( string  name)

Returns the type of the bin with the indicated name.

BinType getBinType ( int  bin_index)

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

static CullBinManager getGlobalPtr ( ) [static]

Returns the pointer to the global CullBinManager object.

Returns the number of bins in the world.

removeBin ( int  bin_index)

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.

setBinActive ( string  name,
bool  active 
)

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.

setBinActive ( int  bin_index,
bool  active 
)

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

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

setBinSort ( string  name,
int  sort 
)

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.

setBinSort ( int  bin_index,
int  sort 
)

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

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

setBinType ( string  name,
BinType  type 
)

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.

setBinType ( int  bin_index,
BinType  type 
)

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

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

write ( ostream  out)
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties