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