14#ifndef MULTITEXREDUCER_H
15#define MULTITEXREDUCER_H
47class EXPCL_PANDA_GRUTIL MultitexReducer {
70 INLINE
bool operator < (
const StageInfo &other)
const;
77 typedef pvector<StageInfo> StageList;
90 typedef pvector<GeomInfo> GeomList;
99 typedef pvector<GeomNodeInfo> GeomNodeList;
101 typedef pmap<StageList, GeomList> Stages;
103 GeomNodeList _geom_node_list;
113 void record_stage_list(
const StageList &stage_list,
114 const GeomInfo &geom_info);
116 size_t choose_model_stage(
const StageList &stage_list)
const;
117 bool determine_uv_range(LTexCoord &min_uv, LTexCoord &max_uv,
118 const StageInfo &model_stage,
119 const GeomList &geom_list)
const;
121 void get_uv_scale(LVecBase2 &uv_scale, LVecBase2 &uv_trans,
122 const LTexCoord &min_uv,
const LTexCoord &max_uv)
const;
124 void choose_texture_size(
int &x_size,
int &y_size,
125 const StageInfo &model_stage,
126 const LVecBase2 &uv_scale,
129 void make_texture_layer(
const NodePath &render,
130 const StageInfo &stage_info,
131 const GeomList &geom_list,
132 const LTexCoord &min_uv,
const LTexCoord &max_uv,
133 bool force_use_geom,
bool transparent_base);
135 const GeomList &geom_list,
bool preserve_color);
137 void scan_color(
const GeomList &geom_list, LColor &geom_color,
138 int &num_colors)
const;
139 bool scan_decal(
const StageList &stage_list)
const;
A node that holds Geom objects, renderable pieces of geometry.
This is a base class for the various different classes that represent the result of a frame of render...
Encodes a string name in a hash table, mapping it to a pointer.
void clear()
Removes the record of nodes that were previously discovered by scan().
void scan(const NodePath &node)
Starts scanning the hierarchy beginning at the indicated node.
void set_use_geom(bool use_geom)
Indicates whether the actual geometry will be used to generate the textures.
void set_target(TextureStage *stage)
Specifies the target TextureStage (and InternalName) that will be left on each multitexture node afte...
void flatten(GraphicsOutput *window)
Actually performs the reducing operations on the nodes that were previously scanned.
void set_allow_tex_mat(bool allow_tex_mat)
Indicates whether the resulting texture should be expected to be animated beyond its current range vi...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A basic node of the scene graph or data graph.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
Applies a transform matrix to UV's before they are rendered.
Indicates the set of TextureStages and their associated Textures that should be applied to (or remove...
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-...
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.