Panda3D
 All Classes Functions Variables Enumerations
cullBinBackToFront.I
1 // Filename: cullBinBackToFront.I
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: CullBinBackToFront::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE CullBinBackToFront::
22 CullBinBackToFront(const string &name, GraphicsStateGuardianBase *gsg,
23  const PStatCollector &draw_region_pcollector) :
24  CullBin(name, BT_back_to_front, gsg, draw_region_pcollector)
25 {
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: CullBinBackToFront::ObjectData::Constructor
30 // Access: Public
31 // Description:
32 ////////////////////////////////////////////////////////////////////
33 INLINE CullBinBackToFront::ObjectData::
34 ObjectData(CullableObject *object, PN_stdfloat dist) :
35  _object(object),
36  _dist(dist)
37 {
38 }
39 
40 ////////////////////////////////////////////////////////////////////
41 // Function: CullBinBackToFront::ObjectData::operator <
42 // Access: Public
43 // Description: Specifies the correct sort ordering for these
44 // objects.
45 ////////////////////////////////////////////////////////////////////
46 INLINE bool CullBinBackToFront::ObjectData::
47 operator < (const ObjectData &other) const {
48  return _dist > other._dist;
49 }
50 
A collection of Geoms and their associated state, for a particular scene.
Definition: cullBin.h:44
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...