14#ifndef GEOMVERTEXARRAYFORMAT_H
15#define GEOMVERTEXARRAYFORMAT_H
47class EXPCL_PANDA_GOBJ GeomVertexArrayFormat final :
public TypedWritableReferenceCount,
public GeomEnums {
49 GeomVertexArrayFormat();
50 GeomVertexArrayFormat(
const GeomVertexArrayFormat ©);
52 NumericType numeric_type0, Contents contents0);
54 NumericType numeric_type0, Contents contents0,
56 NumericType numeric_type1, Contents contents1);
58 NumericType numeric_type0, Contents contents0,
60 NumericType numeric_type1, Contents contents1,
62 NumericType numeric_type2, Contents contents2);
64 NumericType numeric_type0, Contents contents0,
66 NumericType numeric_type1, Contents contents1,
68 NumericType numeric_type2, Contents contents2,
70 NumericType numeric_type3, Contents contents3);
71 void operator = (
const GeomVertexArrayFormat ©);
72 ~GeomVertexArrayFormat();
74 virtual bool unref()
const;
77 INLINE
static CPT(GeomVertexArrayFormat) register_format(
const GeomVertexArrayFormat *format);
96 NumericType numeric_type, Contents contents,
97 int start = -1,
int column_alignment = 0);
116 void output(std::ostream &out)
const;
117 void write(std::ostream &out,
int indent_level = 0)
const;
118 void write_with_data(std::ostream &out,
int indent_level,
124 int compare_to(
const GeomVertexArrayFormat &other)
const;
128 INLINE
static Registry *get_registry();
129 static void make_registry();
132 void do_unregister();
134 INLINE
void consider_sort_columns()
const;
143 typedef pvector<GeomVertexColumn *> Columns;
145 bool _columns_unsorted;
147 typedef pmap<const InternalName *, GeomVertexColumn *> ColumnsByName;
148 ColumnsByName _columns_by_name;
151 typedef pset<GeomVertexArrayFormat *, IndirectCompareTo<GeomVertexArrayFormat> > ArrayFormats;
152 class EXPCL_PANDA_GOBJ Registry {
155 CPT(GeomVertexArrayFormat) register_format(GeomVertexArrayFormat *format);
156 void unregister_format(GeomVertexArrayFormat *format);
158 ArrayFormats _formats;
162 static Registry *_registry;
165 static void register_with_read_factory();
179 static void init_type() {
180 TypedWritableReferenceCount::init_type();
182 TypedWritableReferenceCount::get_class_type());
184 virtual TypeHandle get_type()
const {
185 return get_class_type();
187 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
190 static TypeHandle _type_handle;
192 friend class GeomVertexFormat;
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
This is the data for one array of a GeomVertexData structure.
This defines how a single column is interleaved within a vertex array stored within a Geom.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
Encodes a string name in a hash table, mapping it to a pointer.
This is a standard, non-reentrant mutex, similar to the Mutex class.
virtual bool unref() const
Explicitly decrements the reference count.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is our own Panda specialization on the default STL list.
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.