14 #ifndef GEOMVERTEXFORMAT_H 15 #define GEOMVERTEXFORMAT_H 63 virtual bool unref()
const;
65 INLINE
bool is_registered()
const;
68 MAKE_PROPERTY(registered, is_registered);
72 MAKE_PROPERTY(animation, get_animation, set_animation);
77 INLINE
size_t get_num_arrays()
const;
79 MAKE_SEQ(get_arrays, get_num_arrays, get_array);
82 void remove_array(
size_t array);
86 void remove_empty_arrays();
88 size_t get_num_columns()
const;
89 int get_array_with(
size_t i)
const;
97 MAKE_SEQ(get_columns, get_num_columns, get_column);
99 void remove_column(
const InternalName *name,
bool keep_empty_array =
false);
101 void align_columns_for_animation();
102 void maybe_align_columns_for_animation();
104 INLINE
size_t get_num_points()
const;
106 MAKE_SEQ(get_points, get_num_points, get_point);
108 INLINE
size_t get_num_vectors()
const;
110 MAKE_SEQ(get_vectors, get_num_vectors, get_vector);
112 INLINE
size_t get_num_texcoords()
const;
113 INLINE
const InternalName *get_texcoord(
size_t n)
const;
114 MAKE_SEQ(get_texcoords, get_num_texcoords, get_texcoord);
116 INLINE
size_t get_num_morphs()
const;
117 INLINE
const InternalName *get_morph_slider(
size_t n)
const;
118 INLINE
const InternalName *get_morph_base(
size_t n)
const;
119 INLINE
const InternalName *get_morph_delta(
size_t n)
const;
120 MAKE_SEQ(get_morph_sliders, get_num_morphs, get_morph_slider);
121 MAKE_SEQ(get_morph_bases, get_num_morphs, get_morph_base);
122 MAKE_SEQ(get_morph_deltas, get_num_morphs, get_morph_delta);
124 MAKE_SEQ_PROPERTY(arrays, get_num_arrays, get_array, set_array, remove_array, insert_array);
125 MAKE_SEQ_PROPERTY(points, get_num_points, get_point);
126 MAKE_SEQ_PROPERTY(vectors, get_num_vectors, get_vector);
129 MAKE_MAP_PROPERTY(columns, has_column, get_column);
130 MAKE_MAP_KEYS_SEQ(columns, get_num_columns, get_column_name);
132 void output(std::ostream &out)
const;
133 void write(std::ostream &out,
int indent_level = 0)
const;
134 void write_with_data(std::ostream &out,
int indent_level,
171 INLINE
int get_vertex_array_index()
const;
173 INLINE
int get_normal_array_index()
const;
175 INLINE
int get_color_array_index()
const;
182 INLINE
static Registry *get_registry();
183 static void make_registry();
186 void do_unregister();
195 class DataTypeRecord {
202 DataTypesByName _columns_by_name;
204 int _vertex_array_index;
206 int _normal_array_index;
208 int _color_array_index;
229 class EXPCL_PANDA_GOBJ Registry {
232 void make_standard_formats();
259 static Registry *_registry;
263 static void register_with_read_factory();
275 static void init_type() {
276 TypedWritableReferenceCount::init_type();
278 TypedWritableReferenceCount::get_class_type());
281 return get_class_type();
283 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
288 friend class GeomVertexFormat::Registry;
292 INLINE std::ostream &operator << (std::ostream &out,
const GeomVertexFormat &obj);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...
Base class for objects that can be written to and read from Bam files.
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.
A lightweight reentrant mutex.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This defines how a single column is interleaved within a vertex array stored within a Geom.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Encodes a string name in a hash table, mapping it to a pointer.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL set.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool unref() const
Explicitly decrements the reference count.