50class EXPCL_PANDA_GOBJ GeomMunger :
public TypedReferenceCount,
public GeomEnums {
53 GeomMunger(
const GeomMunger ©);
54 void operator = (
const GeomMunger ©);
55 virtual ~GeomMunger();
60 INLINE
static PT(GeomMunger) register_munger(GeomMunger *munger,
Thread *current_thread);
70 bool force,
Thread *current_thread);
74 INLINE
void premunge_geom(CPT(Geom) &geom, CPT(
GeomVertexData) &data)
const;
77 INLINE
int compare_to(
const GeomMunger &other)
const;
78 INLINE
int geom_compare_to(
const GeomMunger &other)
const;
81 INLINE
void unregister_myself();
89 virtual void munge_geom_impl(CPT(Geom) &geom, CPT(
GeomVertexData) &data,
96 virtual void premunge_geom_impl(CPT(Geom) &geom, CPT(
GeomVertexData) &data);
98 virtual int compare_to_impl(
const GeomMunger *other)
const;
99 virtual int geom_compare_to_impl(
const GeomMunger *other)
const;
103 INLINE
static Registry *get_registry();
104 static void make_registry();
106 void do_register(
Thread *current_thread);
107 void do_unregister();
112 virtual void output(std::ostream &out)
const;
114 PT(GeomMunger) _munger;
118 typedef pmap<GeomVertexAnimationSpec, Formats> FormatsByAnimation;
119 FormatsByAnimation _formats_by_animation;
120 Formats _premunge_formats;
128 typedef pset<GeomMunger *, IndirectCompareTo<GeomMunger> > Mungers;
129 class EXPCL_PANDA_GOBJ Registry {
132 PT(GeomMunger) register_munger(GeomMunger *munger,
Thread *current_thread);
133 void unregister_munger(GeomMunger *munger);
146 Mungers::iterator _registered_key;
148 static Registry *_registry;
152 friend class GeomCacheManager;
158 static void init_type() {
159 TypedReferenceCount::init_type();
161 TypedReferenceCount::get_class_type());
164 return get_class_type();
166 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This object contains a single cache entry in the GeomCacheManager.
void remove_data(const GeomVertexData *data)
Removes a prepared GeomVertexData from the cache.
GraphicsStateGuardianBase * get_gsg() const
Returns a pointer to the GSG that created this munger.
bool munge_geom(ConstPointerTo< Geom > &geom, ConstPointerTo< GeomVertexData > &data, bool force, Thread *current_thread)
Applies the indicated munger to the geom and its data, and returns a (possibly different) geom and da...
static void unregister_mungers_for_gsg(GraphicsStateGuardianBase *gsg)
Removes all the mungers from the registry that are associated with the indicated GSG.
bool is_registered() const
Returns true if this munger has been registered, false if it has not.
This object describes how the vertex animation, if any, represented in a GeomVertexData is encoded.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A container for geometry primitives.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
This is a standard, non-reentrant mutex, similar to the Mutex class.
A lightweight reentrant mutex.
A lightweight class that represents a single element that may be timed and/or counted via stats.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
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.
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.
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(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.