Panda3D
 All Classes Functions Variables Enumerations
cullBinUnsorted.h
1 // Filename: cullBinUnsorted.h
2 // Created by: drose (28Feb02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef CULLBINUNSORTED_H
16 #define CULLBINUNSORTED_H
17 
18 #include "pandabase.h"
19 
20 #include "cullBin.h"
21 #include "pointerTo.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : CullBinUnsorted
25 // Description : A specific kind of CullBin that does not reorder the
26 // geometry; it simply passes it through to the GSG in
27 // the same order it was encountered, which will be in
28 // scene-graph order.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDA_CULL CullBinUnsorted : public CullBin {
31 public:
32  INLINE CullBinUnsorted(const string &name,
34  const PStatCollector &draw_region_pcollector);
35  ~CullBinUnsorted();
36 
37  static CullBin *make_bin(const string &name,
39  const PStatCollector &draw_region_pcollector);
40 
41  virtual void add_object(CullableObject *object, Thread *current_thread);
42  virtual void draw(bool force, Thread *current_thread);
43 
44 protected:
45  virtual void fill_result_graph(ResultGraphBuilder &builder);
46 
47 private:
49  Objects _objects;
50 
51 public:
52  static TypeHandle get_class_type() {
53  return _type_handle;
54  }
55  static void init_type() {
56  CullBin::init_type();
57  register_type(_type_handle, "CullBinUnsorted",
58  CullBin::get_class_type());
59  }
60  virtual TypeHandle get_type() const {
61  return get_class_type();
62  }
63  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
64 
65 private:
66  static TypeHandle _type_handle;
67 };
68 
69 #include "cullBinUnsorted.I"
70 
71 #endif
72 
73 
74 
A collection of Geoms and their associated state, for a particular scene.
Definition: cullBin.h:44
A specific kind of CullBin that does not reorder the geometry; it simply passes it through to the GSG...
A lightweight class that represents a single element that may be timed and/or counted via stats...
The smallest atom of cull.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
A thread; that is, a lightweight process.
Definition: thread.h:51
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85