41 template<
class FunctionObject>
45 vert->test_pref_integrity();
46 vert->test_gref_integrity();
63 Prims::const_iterator pri;
64 for (pri = prims.begin(); pri != prims.end(); ++pri) {
68 int seq = sequence(prim);
74 Sequences::const_iterator si = _sequences.find(seq);
76 if (si != _sequences.end()) {
78 new_vert = (*si).second;
85 _sequences[seq] = new_vert;
88 EggVertex::GroupRef::const_iterator gri;
96 EggPrimitive::iterator pi;
97 for (pi = prim->begin(); pi != prim->end(); ++pi) {
107 vert->test_pref_integrity();
108 vert->test_gref_integrity();
110 Sequences::const_iterator si;
111 for (si = _sequences.begin();
112 si != _sequences.end();
115 new_vert->test_gref_integrity();
116 new_vert->test_pref_integrity();
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
void ref_vertex(EggVertex *vert, double membership=1.0)
Adds the vertex to the set of those referenced by the group, at the indicated membership level.
double get_vertex_membership(const EggVertex *vert) const
Returns the amount of membership of the indicated vertex in this group.
A base class for any of a number of kinds of geometry primitives: polygons, point lights,...
void replace(iterator position, EggVertex *vertex)
Replaces the vertex at the indicated position with the indicated vertex.
A collection of vertices.
EggVertex * add_vertex(EggVertex *vertex, int index=-1)
Adds the indicated vertex to the pool.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
PrimitiveRef::const_iterator pref_begin() const
Returns an iterator that can, in conjunction with pref_end(), be used to traverse the entire set of p...
EggVertexPool * get_pool() const
Returns the vertex pool this vertex belongs in.
PrimitiveRef::const_iterator pref_end() const
Returns an iterator that can, in conjunction with pref_begin(), be used to traverse the entire set of...
GroupRef::const_iterator gref_end() const
Returns an iterator that can, in conjunction with gref_begin(), be used to traverse the entire set of...
PrimitiveRef::size_type pref_size() const
Returns the number of elements between pref_begin() and pref_end().
GroupRef::const_iterator gref_begin() const
Returns an iterator that can, in conjunction with gref_end(), be used to traverse the entire set of g...
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
This is our own Panda specialization on the default STL map.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void split_vertex(EggVertex *vert, const FunctionObject &sequence)
Splits a vertex into two or more vertices, each an exact copy of the original and in the same vertex ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.