18 #include "pandabase.h" 20 #include "deferredNodeProperty.h" 22 #include "eggTexture.h" 23 #include "pt_EggTexture.h" 25 #include "eggMaterial.h" 26 #include "pt_EggMaterial.h" 27 #include "eggVertexPool.h" 29 #include "pandaNode.h" 30 #include "pointerTo.h" 32 #include "indirectCompareTo.h" 33 #include "textureAttrib.h" 34 #include "textureStage.h" 35 #include "texGenAttrib.h" 36 #include "colorBlendAttrib.h" 37 #include "eggTransform.h" 38 #include "geomVertexData.h" 39 #include "geomPrimitive.h" 40 #include "bamCacheRecord.h" 80 const LMatrix4d *transform,
bool is_dynamic,
83 CPT(TransformState) make_transform(
const EggTransform *egg_transform);
102 class PrimitiveUnifier {
105 INLINE
bool operator < (
const PrimitiveUnifier &other)
const;
108 GeomPrimitive::ShadeModel _shade_model;
122 void load_textures();
123 bool load_texture(TextureDef &def,
EggTexture *egg_tex);
125 Texture::CompressionMode convert_compression_mode(EggTexture::CompressionMode compression_mode)
const;
126 SamplerState::WrapMode convert_wrap_mode(EggTexture::WrapMode wrap_mode)
const;
129 void separate_switches(
EggNode *egg_node);
130 void emulate_bface(
EggNode *egg_node);
142 void check_for_polysets(
EggGroup *egg_group,
bool &all_polysets,
147 bool is_dynamic,
CharacterMaker *character_maker,
bool ignore_color);
152 (GeomVertexArrayFormat *array_format,
154 InternalName *column_name,
int num_components);
158 UniquePrimitives &unique_primitives,
159 Primitives &primitives,
160 bool has_overall_color,
const LColor &overall_color);
166 bool make_sphere(
EggGroup *start_group, EggGroup::CollideFlags flags,
169 bool make_box(
EggGroup *start_group, EggGroup::CollideFlags flags,
175 EggGroup::CollideFlags flags);
177 EggGroup::CollideFlags flags);
179 EggGroup::CollideFlags flags);
181 EggGroup::CollideFlags flags);
183 EggGroup::CollideFlags flags);
185 EggGroup::CollideFlags flags);
187 EggGroup::CollideFlags flags);
189 EggGroup::CollideFlags flags);
191 EggGroup::CollideFlags flags);
193 EggGroup::CollideFlags flags);
198 EggGroup::CollideFlags flags);
202 EggGroup::CollideFlags flags);
205 bool expand_all_object_types(
EggNode *egg_node);
210 const string &object_type);
212 static TextureStage::CombineMode
214 EggTexture::CombineChannel channel);
216 static TextureStage::CombineSource
218 EggTexture::CombineChannel channel,
int n);
220 static TextureStage::CombineOperand
221 get_combine_operand(
const EggTexture *egg_tex,
222 EggTexture::CombineChannel channel,
int n);
224 static ColorBlendAttrib::Mode
225 get_color_blend_mode(EggGroup::BlendMode mode);
227 static ColorBlendAttrib::Operand
228 get_color_blend_operand(EggGroup::BlendOperand operand);
234 Materials _materials;
235 Materials _materials_bface;
242 ExtraNodes _sequences;
244 class VertexPoolTransform {
246 bool operator < (
const VertexPoolTransform &other)
const;
248 BakeInUVs _bake_in_uvs;
252 VertexPoolData _vertex_pool_data;
255 TransformStates _transform_states;
266 bool _dynamic_override;
273 #include "eggLoader.I" A base class for any of a number of kinds of geometry primitives: polygons, point lights...
A basic node of the scene graph or data graph.
This is our own Panda specialization on the default STL map.
This is a 4-by-4 transform matrix.
This is the base class for a number of render attributes (other than transform) that may be set on sc...
This class keeps track of all the state we must make note of during the graph traversal, but cannot apply immediately.
A base class for nodes in the hierarchy that are not leaf nodes.
The abstract base class for all things that can collide with other things in the world, and all the things they can collide with (except geometry).
Defines a texture map that may be applied to geometry.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
This is the primary interface into all the egg data, and the root of the egg file structure...
A node in the scene graph that can hold an occluder polygon, which must be a rectangle.
This is our own Panda specialization on the default STL vector.
This class is used within this package only to record the render state that should be assigned to eac...
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
A node in the scene graph that can hold a Portal Polygon, which is a rectangle.
void start_sequences()
Starts all of the SequenceNodes we created looping.
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A parametric NURBS curve.
This is the base class for all three-component vectors and points.
A base class for things that may be directly added into the egg hierarchy.
A node in the scene graph that can hold any number of CollisionSolids.
A parametric NURBS surface.
void reparent_decals()
For each node representing a decal base geometry (i.e.
Converts an EggGroup hierarchy, beginning with a group with <Dart> set, to a character node with join...
TypeHandle is the identifier used to differentiate C++ class types.
Defines the properties of a named stage of the multitexture pipeline.
A collection of vertices.
A node that holds Geom objects, renderable pieces of geometry.
void make_polyset(EggBin *egg_bin, PandaNode *parent, const LMatrix4d *transform, bool is_dynamic, CharacterMaker *character_maker)
Creates a polyset–that is, a Geom–from the primitives that have already been grouped into a bin...
Converts an egg data structure, possibly read from an egg file but not necessarily, into a scene graph suitable for rendering.
A type of group node that holds related subnodes.