15 #ifndef EGGGROUPNODE_H
16 #define EGGGROUPNODE_H
18 #include "pandabase.h"
21 #include "eggVertexPool.h"
23 #include "coordinateSystem.h"
24 #include "typedObject.h"
25 #include "pointerTo.h"
27 #include "globPattern.h"
71 virtual void write(ostream &out,
int indent_level)
const;
78 #if defined(WIN32_VC) || defined(WIN64_VC)
79 typedef const PT(
EggNode) *pointer;
80 typedef const PT(
EggNode) *const_pointer;
82 typedef Children::const_pointer pointer;
83 typedef Children::const_pointer const_pointer;
85 typedef Children::const_reference reference;
86 typedef Children::const_reference const_reference;
87 typedef Children::const_iterator iterator;
88 typedef Children::const_iterator const_iterator;
89 typedef Children::const_reverse_iterator reverse_iterator;
90 typedef Children::const_reverse_iterator const_reverse_iterator;
91 typedef Children::size_type size_type;
92 typedef Children::difference_type difference_type;
94 iterator begin()
const;
96 reverse_iterator rbegin()
const;
97 reverse_iterator rend()
const;
99 iterator insert(iterator position, PT(
EggNode) x);
100 iterator erase(iterator position);
101 iterator erase(iterator first, iterator last);
102 void replace(iterator position, PT(
EggNode) x);
106 size_type size()
const;
116 EXTENSION(PyObject *get_children()
const);
122 EggNode *find_child(
const string &name)
const;
124 bool has_absolute_pathnames()
const;
125 void resolve_filenames(
const DSearchPath &searchpath);
126 void force_filenames(
const Filename &directory);
127 void reverse_vertex_ordering();
129 void recompute_vertex_normals(
double threshold, CoordinateSystem cs = CS_default);
130 void recompute_polygon_normals(CoordinateSystem cs = CS_default);
131 void strip_normals();
133 bool recompute_tangent_binormal(
const GlobPattern &uv_name);
134 bool recompute_tangent_binormal(
const vector_string &names);
135 bool recompute_tangent_binormal_auto();
137 enum TriangulateFlags {
142 T_flat_shaded = 0x010,
145 int triangulate_polygons(
int flags);
146 void mesh_triangles(
int flags);
147 void make_point_primitives();
149 int rename_nodes(vector_string strip_prefix,
bool recurse);
151 int remove_unused_vertices(
bool recurse);
152 int remove_invalid_primitives(
bool recurse);
153 void clear_connected_shading();
154 void get_connected_shading();
155 void unify_attributes(
bool use_connected_shading,
bool allow_per_primitive,
157 void apply_last_attribute(
bool recurse);
158 void apply_first_attribute(
bool recurse);
159 void post_apply_flat_attribute(
bool recurse);
160 virtual bool has_primitives()
const;
161 virtual bool joint_has_primitives()
const;
162 virtual bool has_normals()
const;
166 unsigned int max_vertices,
170 virtual void update_under(
int depth_offset);
173 CoordinateSystem to_cs);
174 virtual void r_transform_vertices(
const LMatrix4d &mat);
175 virtual void r_mark_coordsys(CoordinateSystem cs);
176 virtual void r_flatten_transforms();
180 CoordinateSystem find_coordsys_entry();
183 bool r_load_externals(
const DSearchPath &searchpath,
184 CoordinateSystem coordsys,
192 const_iterator _gnc_iterator;
197 void prepare_add_child(
EggNode *node);
198 void prepare_remove_child(
EggNode *node);
201 class NVertexReference {
211 double threshold, CoordinateSystem cs);
212 void do_compute_vertex_normals(
const NVertexGroup &group);
215 class TBNVertexReference {
222 class TBNVertexValue {
224 INLINE
bool operator < (
const TBNVertexValue &other)
const;
234 void r_collect_tangent_binormal(
const GlobPattern &uv_name,
236 void do_compute_tangent_binormal(
const TBNVertexValue &value,
243 static void init_type() {
244 EggNode::init_type();
245 register_type(_type_handle,
"EggGroupNode",
246 EggNode::get_class_type());
249 return get_class_type();
251 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
260 #include "eggGroupNode.I"
This is our own Panda specialization on the default STL map.
This is a 4-by-4 transform matrix.
This is a two-component vector offset.
A base class for nodes in the hierarchy that are not leaf nodes.
This is a collection of materials by MRef name.
This is a two-component point in space.
This is a collection of textures by TRef name.
This is our own Panda specialization on the default STL vector.
The name of a file, such as a texture file or an Egg file.
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal...
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
A base class for things that may be directly added into the egg hierarchy.
This class stores a list of directories that can be searched, in order, to locate a particular file...
TypeHandle is the identifier used to differentiate C++ class types.
A collection of vertices.
This class can be used to test for string matches against standard Unix-shell filename globbing conve...