15 #ifndef GEOMTRANSFORMER_H 16 #define GEOMTRANSFORMER_H 18 #include "pandabase.h" 22 #include "geomVertexData.h" 23 #include "texMatrixAttrib.h" 53 INLINE
int get_max_collect_vertices()
const;
54 INLINE
void set_max_collect_vertices(
int max_collect_vertices);
56 void register_vertices(
Geom *geom,
bool might_have_unused);
57 void register_vertices(
GeomNode *node,
bool might_have_unused);
59 bool transform_vertices(
Geom *geom,
const LMatrix4 &mat);
62 bool transform_texcoords(
Geom *geom,
const InternalName *from_name,
63 InternalName *to_name,
const LMatrix4 &mat);
64 bool transform_texcoords(
GeomNode *node,
const InternalName *from_name,
65 InternalName *to_name,
const LMatrix4 &mat);
75 const LColor &base_color,
bool keep_vertex_color);
80 bool set_format(
Geom *geom,
const GeomVertexFormat *new_format);
81 bool remove_column(
Geom *geom,
const InternalName *column);
82 bool remove_column(
GeomNode *node,
const InternalName *column);
84 bool make_compatible_state(
GeomNode *node);
86 bool reverse_normals(
Geom *geom);
92 int collect_vertex_data(
Geom *geom,
int collect_bits,
bool format_only);
93 int collect_vertex_data(
GeomNode *node,
int collect_bits,
bool format_only);
94 int finish_collect(
bool format_only);
99 int _max_collect_vertices;
106 class VertexDataAssoc {
108 INLINE VertexDataAssoc();
109 bool _might_have_unused;
114 VertexDataAssocMap _vdata_assoc;
118 class NewVertexData {
125 class SourceVertices {
127 INLINE
bool operator < (
const SourceVertices &other)
const;
133 NewVertices _vertices;
137 class SourceTexCoords {
139 INLINE
bool operator < (
const SourceTexCoords &other)
const;
142 CPT(InternalName) _from;
143 CPT(InternalName) _to;
147 NewTexCoords _texcoords;
153 INLINE
bool operator < (
const SourceColors &other)
const;
164 NewColors _fcolors, _tcolors;
168 class SourceTextureColors {
170 INLINE
bool operator < (
const SourceTextureColors &other)
const;
176 bool _keep_vertex_color;
180 NewTextureColors _tex_colors;
187 INLINE
bool operator < (
const SourceFormat &other)
const;
189 CPT(GeomVertexFormat) _format;
198 ReversedNormals _reversed_normals;
200 class NewCollectedKey {
202 INLINE
bool operator < (
const NewCollectedKey &other)
const;
205 CPT(GeomVertexFormat) _format;
206 Geom::UsageHint _usage_hint;
207 Geom::AnimationType _animation_type;
222 class NewCollectedData {
224 ALLOC_DELETED_CHAIN(NewCollectedData);
228 int apply_format_only_changes();
229 int apply_collect_changes();
231 CPT(GeomVertexFormat) _new_format;
233 GeomEnums::UsageHint _usage_hint;
234 SourceDatas _source_datas;
235 SourceGeoms _source_geoms;
240 void append_vdata(
const GeomVertexData *vdata,
int vertex_offset);
243 typedef vector_int IndexMap;
254 static void init_type() {
255 register_type(_type_handle,
"GeomTransformer::NewCollectedData");
263 NewCollectedList _new_collected_list;
264 NewCollectedMap _new_collected_map;
266 class AlreadyCollectedData {
268 NewCollectedData *_ncd;
272 AlreadyCollectedMap _already_collected_map;
282 static void init_type() {
283 NewCollectedData::init_type();
287 #include "geomTransformer.I" This class records a set of integers, where each integer is either present or not present in the set...
Objects of this class are used to convert vertex data from a Geom into a format suitable for passing ...
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
A lightweight class that represents a single element that may be timed and/or counted via stats...
This is a 4-by-4 transform matrix.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A container for geometry primitives.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
This is the base class for all three-component vectors and points.
Applies a transform matrix to UV's before they are rendered.
TypeHandle is the identifier used to differentiate C++ class types.
Defines the properties of a named stage of the multitexture pipeline.
A node that holds Geom objects, renderable pieces of geometry.