14#ifndef GEOMTRANSFORMER_H
15#define GEOMTRANSFORMER_H
42class EXPCL_PANDA_PGRAPH GeomTransformer {
45 GeomTransformer(
const GeomTransformer ©);
70 const LColor &base_color,
bool keep_vertex_color);
94 int _max_collect_vertices;
96 typedef pvector<PT(
Geom) > GeomList;
101 class VertexDataAssoc {
103 INLINE VertexDataAssoc();
104 bool _might_have_unused;
108 typedef pmap<CPT(
GeomVertexData), VertexDataAssoc> VertexDataAssocMap;
109 VertexDataAssocMap _vdata_assoc;
113 class NewVertexData {
120 class SourceVertices {
122 INLINE
bool operator < (
const SourceVertices &other)
const;
127 typedef pmap<SourceVertices, NewVertexData> NewVertices;
128 NewVertices _vertices;
132 class SourceTexCoords {
134 INLINE
bool operator < (
const SourceTexCoords &other)
const;
141 typedef pmap<SourceTexCoords, NewVertexData> NewTexCoords;
142 NewTexCoords _texcoords;
147 INLINE
bool operator < (
const SourceColors &other)
const;
152 typedef pmap<SourceColors, NewVertexData> NewColors;
158 NewColors _fcolors, _tcolors;
162 class SourceTextureColors {
164 INLINE
bool operator < (
const SourceTextureColors &other)
const;
170 bool _keep_vertex_color;
173 typedef pmap<SourceTextureColors, NewVertexData> NewTextureColors;
174 NewTextureColors _tex_colors;
181 INLINE
bool operator < (
const SourceFormat &other)
const;
186 typedef pmap<SourceFormat, NewVertexData> NewFormat;
191 ReversedNormals _reversed_normals;
193 class NewCollectedKey {
195 INLINE
bool operator < (
const NewCollectedKey &other)
const;
199 Geom::UsageHint _usage_hint;
200 Geom::AnimationType _animation_type;
208 typedef pvector<SourceData> SourceDatas;
214 typedef pvector<SourceGeom> SourceGeoms;
215 class NewCollectedData {
217 ALLOC_DELETED_CHAIN(NewCollectedData);
221 int apply_format_only_changes();
222 int apply_collect_changes();
225 std::string _vdata_name;
226 GeomEnums::UsageHint _usage_hint;
227 SourceDatas _source_datas;
228 SourceGeoms _source_geoms;
233 void append_vdata(
const GeomVertexData *vdata,
int vertex_offset);
236 typedef vector_int IndexMap;
247 static void init_type() {
248 register_type(_type_handle,
"GeomTransformer::NewCollectedData");
254 typedef pvector<NewCollectedData *> NewCollectedList;
255 typedef pmap<NewCollectedKey, NewCollectedData *> NewCollectedMap;
256 NewCollectedList _new_collected_list;
257 NewCollectedMap _new_collected_map;
259 class AlreadyCollectedData {
261 NewCollectedData *_ncd;
264 typedef pmap<CPT(
GeomVertexData), AlreadyCollectedData> AlreadyCollectedMap;
265 AlreadyCollectedMap _already_collected_map;
275 static void init_type() {
276 NewCollectedData::init_type();
Objects of this class are used to convert vertex data from a Geom into a format suitable for passing ...
A node that holds Geom objects, renderable pieces of geometry.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A container for geometry primitives.
Encodes a string name in a hash table, mapping it to a pointer.
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...
This class records a set of integers, where each integer is either present or not present in the set.
Applies a transform matrix to UV's before they are rendered.
Defines the properties of a named stage of the multitexture pipeline.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
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.
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.