Panda3D
 All Classes Functions Variables Enumerations
tinyGeomMunger.h
1 // Filename: tinyGeomMunger.h
2 // Created by: drose (29Apr08)
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 TINYGEOMMUNGER_H
16 #define TINYGEOMMUNGER_H
17 
18 #include "pandabase.h"
19 #include "standardMunger.h"
20 #include "graphicsStateGuardian.h"
21 #include "renderState.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : TinyGeomMunger
25 // Description : This specialization on GeomMunger finesses vertices
26 // for TinyPanda rendering. This actually doesn't have
27 // to do very much, since TinyPanda is not that
28 // particular.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_TINYDISPLAY TinyGeomMunger : public StandardMunger {
31 public:
33  virtual ~TinyGeomMunger();
34  ALLOC_DELETED_CHAIN_DECL(TinyGeomMunger);
35 
36 protected:
37  virtual CPT(GeomVertexFormat) munge_format_impl(const GeomVertexFormat *orig,
38  const GeomVertexAnimationSpec &animation);
39  virtual CPT(GeomVertexFormat) premunge_format_impl(const GeomVertexFormat *orig);
40 
41  virtual int compare_to_impl(const GeomMunger *other) const;
42  virtual int geom_compare_to_impl(const GeomMunger *other) const;
43 
44 public:
45  static TypeHandle get_class_type() {
46  return _type_handle;
47  }
48  static void init_type() {
49  StandardMunger::init_type();
50  register_type(_type_handle, "TinyGeomMunger",
51  StandardMunger::get_class_type());
52  }
53  virtual TypeHandle get_type() const {
54  return get_class_type();
55  }
56  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
57 
58 private:
59  static TypeHandle _type_handle;
60 };
61 
62 #include "tinyGeomMunger.I"
63 
64 #endif
This object describes how the vertex animation, if any, represented in a GeomVertexData is encoded...
Objects of this class are used to convert vertex data from a Geom into a format suitable for passing ...
Definition: geomMunger.h:57
Performs some generic munging that is appropriate for all GSG types; for instance, applies ColorAttrib and ColorScaleAttrib to the vertices, and checks for hardware-accelerated animation capabilities.
This specialization on GeomMunger finesses vertices for TinyPanda rendering.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
Definition: renderState.h:53
Encapsulates all the communication with a particular instance of a given rendering backend...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85