Forráskód Böngészése

*** empty log message ***

David Rose 25 éve
szülő
commit
1faecc8269

+ 48 - 0
dtool/pptempl/Template.models.pp

@@ -98,6 +98,7 @@ install-bam : $[install_bam_targets]
 install-other : $[install_other_targets]
 install-other : $[install_other_targets]
 
 
 install : install-other install-bam
 install : install-other install-bam
+uninstall : uninstall-other uninstall-bam uninstall-egg
 
 
 clean-bam :
 clean-bam :
 #if $[bam_targets]
 #if $[bam_targets]
@@ -284,6 +285,15 @@ $[dest]/$[local] : $[source_prefix]$[local]
   #end egg
   #end egg
 #end install_egg
 #end install_egg
 
 
+// Egg file uninstallation.
+uninstall-egg :
+#forscopes install_egg
+  #define files $[patsubst %,$[install_model_dir]/%,$[SOURCES] $[UNPAL_SOURCES]]
+  #if $[files]
+	rm -f $[files]
+  #endif
+#end install_egg
+
 
 
 // Bam file installation.
 // Bam file installation.
 #forscopes install_egg
 #forscopes install_egg
@@ -299,6 +309,16 @@ $[dest]/$[local] : $[sourcedir]/$[local]
   #end egg
   #end egg
 #end install_egg
 #end install_egg
 
 
+// Bam file uninstallation.
+uninstall-bam :
+#forscopes install_egg
+  #define files $[patsubst %.egg,$[install_model_dir]/%.bam,$[SOURCES] $[UNPAL_SOURCES]]
+  #if $[files]
+	rm -f $[files]
+  #endif
+#end install_egg
+
+
 
 
 // Miscellaneous file installation.
 // Miscellaneous file installation.
 #forscopes install_audio install_dna install_icons install_misc
 #forscopes install_audio install_dna install_icons install_misc
@@ -313,6 +333,16 @@ $[dest]/$[local] : $[local]
   #end file
   #end file
 #end install_audio install_dna install_icons install_misc
 #end install_audio install_dna install_icons install_misc
 
 
+// Miscellaneous file uninstallation.
+uninstall-other:
+#forscopes install_audio install_dna install_icons install_misc
+  #define files $[patsubst %,$[install_model_dir]/%,$[SOURCES]]
+  #if $[files]
+	rm -f $[files]
+  #endif
+#end install_audio install_dna install_icons install_misc
+
+
 #end Makefile
 #end Makefile
 
 
 
 
@@ -363,6 +393,9 @@ install-egg : egg pal repal $[subdirs:%=install-egg-%]
 install-bam : egg pal repal $[subdirs:%=install-bam-%]
 install-bam : egg pal repal $[subdirs:%=install-bam-%]
 install-other : $[subdirs:%=install-other-%]
 install-other : $[subdirs:%=install-other-%]
 install : egg pal repal $[subdirs:%=install-%]
 install : egg pal repal $[subdirs:%=install-%]
+uninstall-egg : $[subdirs:%=uninstall-egg-%]
+uninstall-bam : $[subdirs:%=uninstall-bam-%]
+uninstall-other : $[subdirs:%=uninstall-other-%]
 uninstall : $[subdirs:%=uninstall-%]
 uninstall : $[subdirs:%=uninstall-%]
 
 
 #
 #
@@ -472,6 +505,21 @@ install-$[dirname] :
 	cd ./$[PATH] && $(MAKE) install
 	cd ./$[PATH] && $(MAKE) install
 #end dirname
 #end dirname
 
 
+#formap dirname subdirs
+uninstall-egg-$[dirname] :
+	cd ./$[PATH] && $(MAKE) uninstall-egg
+#end dirname
+
+#formap dirname subdirs
+uninstall-bam-$[dirname] :
+	cd ./$[PATH] && $(MAKE) uninstall-bam
+#end dirname
+
+#formap dirname subdirs
+uninstall-other-$[dirname] :
+	cd ./$[PATH] && $(MAKE) uninstall-other
+#end dirname
+
 #formap dirname subdirs
 #formap dirname subdirs
 uninstall-$[dirname] :
 uninstall-$[dirname] :
 	cd ./$[PATH] && $(MAKE) uninstall
 	cd ./$[PATH] && $(MAKE) uninstall

+ 4 - 0
panda/src/cull/cullTraverser.cxx

@@ -510,6 +510,10 @@ forward_arc(NodeRelation *arc, NullTransitionWrapper &,
   }
   }
   node->draw_traverse();
   node->draw_traverse();
 
 
+  // We have to get a new _now timestamp, just in case either of the
+  // above traversals changed it.
+  _now = last_graph_update(_graph_type);
+
   AllTransitionsWrapper trans;
   AllTransitionsWrapper trans;
 
 
   UpdateSeq last_update = arc->get_last_update();
   UpdateSeq last_update = arc->get_last_update();

+ 1 - 1
panda/src/egg/eggNode.I

@@ -168,7 +168,7 @@ get_vertex_frame_inv() const {
 //     Function: EggNode::get_node_frame_inv
 //     Function: EggNode::get_node_frame_inv
 //       Access: Public
 //       Access: Public
 //  Description: Returns the inverse of the matrix returned by
 //  Description: Returns the inverse of the matrix returned by
-//               get_vertex_frame().  See get_vertex_frame().
+//               get_node_frame().  See get_node_frame().
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE const LMatrix4d &EggNode::
 INLINE const LMatrix4d &EggNode::
 get_node_frame_inv() const {
 get_node_frame_inv() const {

+ 30 - 11
panda/src/egg2sg/characterMaker.cxx

@@ -264,7 +264,7 @@ make_static_primitive(EggPrimitive *egg_primitive, EggGroupNode *prim_home) {
   LMatrix4d transform = 
   LMatrix4d transform = 
     egg_primitive->get_vertex_frame() *
     egg_primitive->get_vertex_frame() *
     prim_home->get_node_frame_inv();
     prim_home->get_node_frame_inv();
-  
+
   _loader.make_nonindexed_primitive(egg_primitive, node, &transform);
   _loader.make_nonindexed_primitive(egg_primitive, node, &transform);
 }
 }
 
 
@@ -280,7 +280,7 @@ make_dynamic_primitive(EggPrimitive *egg_primitive, EggGroupNode *prim_home) {
   LMatrix4d transform = 
   LMatrix4d transform = 
     egg_primitive->get_vertex_frame() *
     egg_primitive->get_vertex_frame() *
     prim_home->get_node_frame_inv();
     prim_home->get_node_frame_inv();
-  
+
   _loader.make_indexed_primitive(egg_primitive, node, &transform,
   _loader.make_indexed_primitive(egg_primitive, node, &transform,
 				 _comp_verts_maker);
 				 _comp_verts_maker);
 }
 }
@@ -342,18 +342,37 @@ determine_primitive_home(EggPrimitive *egg_primitive) {
   nassertr(home != NULL, NULL);
   nassertr(home != NULL, NULL);
 
 
   // So, all the vertices are assigned to the same group.  This means
   // So, all the vertices are assigned to the same group.  This means
-  // the polygon belongs entirely to one joint.  If that joint happens
-  // to have a <DCS> flag, and will therefore be an explicit animated
-  // node, we might as well put the polygon under that joint.
-  // Otherwise, we'll leave the polygon under the character node and
-  // animate it there explicitly.
+  // the polygon belongs entirely to one joint.
 
 
+  // If the group is not, in fact, a joint then we return the first
+  // joint above the group.
+  EggGroup *egg_group = (EggGroup *)NULL;
   if (home->is_of_type(EggGroup::get_class_type())) {
   if (home->is_of_type(EggGroup::get_class_type())) {
-    EggGroup *egg_group = DCAST(EggGroup, home);
-    if (egg_group->get_dcs_flag()) {
-      return home;
+    egg_group = DCAST(EggGroup, home);
+  }
+  while (egg_group != (EggGroup *)NULL && 
+	 egg_group->get_group_type() != EggGroup::GT_joint &&
+	 egg_group->get_dart_type() == EggGroup::DT_none) {
+    nassertr(egg_group->get_parent() != (EggGroupNode *)NULL, NULL);
+    home = egg_group->get_parent();
+    egg_group = (EggGroup *)NULL;
+    if (home->is_of_type(EggGroup::get_class_type())) {
+      egg_group = DCAST(EggGroup, home);
     }
     }
   }
   }
 
 
-  return NULL;
+  if (egg_group != (EggGroup *)NULL &&
+      egg_group->get_group_type() == EggGroup::GT_joint &&
+      !egg_group->get_dcs_flag()) {
+    // If the home is a joint without a <DCS> flag--this is the normal
+    // case--we'll move the polygon under the character node and
+    // animate it from there explicitly.
+    return NULL;
+  }
+
+  // Otherwise, if the joint *does* have a <DCS> flag, we'll create
+  // static geometry that we parent directly to the joint node.
+  // We'll also create static geometry for polygons that have no
+  // explicit joint assignment.
+  return home;
 }
 }

+ 49 - 0
panda/src/egg2sg/computedVerticesMaker.cxx

@@ -10,6 +10,8 @@
 #include <character.h>
 #include <character.h>
 #include <computedVertices.h>
 #include <computedVertices.h>
 #include <eggNode.h>
 #include <eggNode.h>
+#include <eggGroup.h>
+#include <eggVertex.h>
 
 
 #include <algorithm>
 #include <algorithm>
 
 
@@ -67,6 +69,53 @@ add_joint(EggNode *joint, double membership) {
   }
   }
 }
 }
 
 
+////////////////////////////////////////////////////////////////////
+//     Function: ComputedVerticesMaker::add_vertex_joints
+//       Access: Public
+//  Description: Adds the joints the vertex belongs to, along with
+//               their respective memberships, to the current
+//               transform space definition.
+////////////////////////////////////////////////////////////////////
+void ComputedVerticesMaker::
+add_vertex_joints(EggVertex *vertex, EggNode *object) {
+  if (vertex->gref_size() == 0) {
+    // This vertex belongs in the same group as the primitive that
+    // contains it.
+    EggGroupNode *egg_joint = object->get_parent();
+
+    // We actually walk up to find the first group above that that's a
+    // joint, or the character root itself, so we won't (a) be fooled
+    // by meaningless transforms on non-joints within a character
+    // hierarchy, or (b) consider meaninglessly different groups to be
+    // significant.
+    EggGroup *egg_group = (EggGroup *)NULL;
+    if (egg_joint->is_of_type(EggGroup::get_class_type())) {
+      egg_group = DCAST(EggGroup, egg_joint);
+    }
+    while (egg_group != (EggGroup *)NULL && 
+	   egg_group->get_group_type() != EggGroup::GT_joint &&
+	   egg_group->get_dart_type() == EggGroup::DT_none) {
+      nassertv(egg_group->get_parent() != (EggGroupNode *)NULL);
+      egg_joint = egg_group->get_parent();
+      egg_group = (EggGroup *)NULL;
+      if (egg_joint->is_of_type(EggGroup::get_class_type())) {
+	egg_group = DCAST(EggGroup, egg_joint);
+      }
+    }
+
+    add_joint(egg_joint, 1.0);
+    
+  } else {
+    // This vertex belongs in the joint or joints that reference it.
+    EggVertex::GroupRef::const_iterator gri;
+    for (gri = vertex->gref_begin(); gri != vertex->gref_end(); ++gri) {
+      EggGroup *egg_joint = (*gri);
+      double membership = egg_joint->get_vertex_membership(vertex);
+      add_joint(egg_joint, membership);
+    }
+  }
+}
+
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: ComputedVerticesMaker::mark_space
 //     Function: ComputedVerticesMaker::mark_space

+ 18 - 1
panda/src/egg2sg/computedVerticesMaker.h

@@ -26,10 +26,26 @@
 class ComputedVertices;
 class ComputedVertices;
 class CharacterMaker;
 class CharacterMaker;
 class EggNode;
 class EggNode;
+class EggVertex;
 
 
 ///////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////
 // 	 Class : ComputedVerticesMaker
 // 	 Class : ComputedVerticesMaker
-// Description :
+// Description : An object to collect together all the vertices of a
+//               character, indicate what the transform space of each
+//               vertex is (which may be a soft-skinned combination of
+//               one or more joints), and identify which vertices may
+//               be shared together.
+//
+//               Generally, you use a ComputedVerticesMaker by first
+//               defining a transform space via begin_new_space(),
+//               repeated calls to add_joint() (or
+//               add_vertex_joints()), and then mark_space().  Having
+//               done that, you can then add any number of vertices to
+//               the space via add_vertex(), add_normal(), etc., and
+//               it will return an index number for each vertex,
+//               collapsing duplicate vertices together properly.
+//               When you are ready to define a new space, simply
+//               repeat the process from begin_new_space().
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAEGG ComputedVerticesMaker {
 class EXPCL_PANDAEGG ComputedVerticesMaker {
 public:
 public:
@@ -37,6 +53,7 @@ public:
  
  
   void begin_new_space();
   void begin_new_space();
   void add_joint(EggNode *joint, double membership);
   void add_joint(EggNode *joint, double membership);
+  void add_vertex_joints(EggVertex *vertex, EggNode *object);
   void mark_space();
   void mark_space();
 
 
   int add_vertex(const Vertexd &vertex, const EggMorphVertexList &morphs,
   int add_vertex(const Vertexd &vertex, const EggMorphVertexList &morphs,

+ 12 - 26
panda/src/egg2sg/eggLoader.cxx

@@ -266,11 +266,13 @@ make_nonindexed_primitive(EggPrimitive *egg_prim, NamedNode *parent,
   BuilderBucket bucket;
   BuilderBucket bucket;
   setup_bucket(bucket, parent, egg_prim);
   setup_bucket(bucket, parent, egg_prim);
 
 
-  LMatrix4d mat = egg_prim->get_vertex_to_node();
+  LMatrix4d mat;
 
 
   if (transform != NULL) {
   if (transform != NULL) {
-    mat = (*transform) * mat;
-  } 
+    mat = (*transform);
+  } else {
+    mat = egg_prim->get_vertex_to_node();
+  }
 
 
   BuilderPrim bprim;
   BuilderPrim bprim;
   bprim.set_type(BPT_poly);
   bprim.set_type(BPT_poly);
@@ -340,11 +342,13 @@ make_indexed_primitive(EggPrimitive *egg_prim, NamedNode *parent,
   bucket.set_texcoords(_comp_verts_maker._texcoords);
   bucket.set_texcoords(_comp_verts_maker._texcoords);
   bucket.set_colors(_comp_verts_maker._colors);
   bucket.set_colors(_comp_verts_maker._colors);
 
 
-  LMatrix4d mat = egg_prim->get_vertex_to_node();
+  LMatrix4d mat;
 
 
   if (transform != NULL) {
   if (transform != NULL) {
-    mat = (*transform) * mat;
-  } 
+    mat = (*transform);
+  } else {
+    mat = egg_prim->get_vertex_to_node();
+  }
 
 
   BuilderPrimI bprim;
   BuilderPrimI bprim;
   bprim.set_type(BPT_poly);
   bprim.set_type(BPT_poly);
@@ -359,12 +363,7 @@ make_indexed_primitive(EggPrimitive *egg_prim, NamedNode *parent,
     EggPrimitive::const_iterator vi;
     EggPrimitive::const_iterator vi;
     for (vi = egg_prim->begin(); vi != egg_prim->end(); ++vi) {
     for (vi = egg_prim->begin(); vi != egg_prim->end(); ++vi) {
       EggVertex *egg_vert = *vi;
       EggVertex *egg_vert = *vi;
-      EggVertex::GroupRef::const_iterator gri;
-      for (gri = egg_vert->gref_begin(); gri != egg_vert->gref_end(); ++gri) {
-	EggGroup *egg_joint = (*gri);
-	double membership = egg_joint->get_vertex_membership(egg_vert);
-	_comp_verts_maker.add_joint(egg_joint, membership);
-      }
+      _comp_verts_maker.add_vertex_joints(egg_vert, egg_prim);
     }
     }
     _comp_verts_maker.mark_space();
     _comp_verts_maker.mark_space();
 
 
@@ -390,20 +389,7 @@ make_indexed_primitive(EggPrimitive *egg_prim, NamedNode *parent,
     // Set up the ComputedVerticesMaker for the coordinate space of
     // Set up the ComputedVerticesMaker for the coordinate space of
     // the vertex.
     // the vertex.
     _comp_verts_maker.begin_new_space();
     _comp_verts_maker.begin_new_space();
-    if (egg_vert->gref_size() == 0) {
-      // This vertex belongs where the primitive is.
-      EggGroupNode *egg_joint = egg_prim->get_parent();
-      _comp_verts_maker.add_joint(egg_joint, 1.0);
-
-    } else {
-      // This vertex belongs in the joint or joints that reference it.
-      EggVertex::GroupRef::const_iterator gri;
-      for (gri = egg_vert->gref_begin(); gri != egg_vert->gref_end(); ++gri) {
-	EggGroup *egg_joint = (*gri);
-	double membership = egg_joint->get_vertex_membership(egg_vert);
-	_comp_verts_maker.add_joint(egg_joint, membership);
-      }
-    }
+    _comp_verts_maker.add_vertex_joints(egg_vert, egg_prim);
     _comp_verts_maker.mark_space();
     _comp_verts_maker.mark_space();
 
 
     int vindex =
     int vindex =

+ 167 - 2
panda/src/gobj/geom.I

@@ -3,6 +3,172 @@
 // 
 // 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_binding
+//       Access: Published
+//  Description: Returns the GeomBindType which indicates the
+//               assignment of colors (or normals, etc.) to the
+//               primitives.
+////////////////////////////////////////////////////////////////////
+INLINE GeomBindType Geom::
+get_binding(int attr) const {
+  return _bind[attr];
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_coords_array
+//       Access: Published
+//  Description: Returns the array of vertex coordinates associated
+//               with the Geom.  This must have binding type
+//               G_PER_VERTEX.  It may either be indexed or
+//               nonindexed, depending on whether get_coords_index()
+//               returns a NULL array.
+////////////////////////////////////////////////////////////////////
+INLINE const PTA_Vertexf &Geom::
+get_coords_array() const {
+  return _coords;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_normals_array
+//       Access: Published
+//  Description: Returns the array of normals associated with the
+//               Geom.  This may have any binding type.  It may either
+//               be indexed or nonindexed, depending on whether
+//               get_normals_index() returns a NULL array.
+////////////////////////////////////////////////////////////////////
+INLINE const PTA_Normalf &Geom::
+get_normals_array() const {
+  return _norms;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_colors_array
+//       Access: Published
+//  Description: Returns the array of colors associated with the
+//               Geom.  This may have any binding type.  It may either
+//               be indexed or nonindexed, depending on whether
+//               get_colors_index() returns a NULL array.
+////////////////////////////////////////////////////////////////////
+INLINE const PTA_Colorf &Geom::
+get_colors_array() const {
+  return _colors;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_texcoords_array
+//       Access: Published
+//  Description: Returns the array of texcoords associated with the
+//               Geom.  This may have a binding type of G_PER_VERTEX
+//               or G_OFF.  It may either be indexed or nonindexed,
+//               depending on whether get_texcoords_index() returns a
+//               NULL array.
+////////////////////////////////////////////////////////////////////
+INLINE const PTA_TexCoordf &Geom::
+get_texcoords_array() const {
+  return _texcoords;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_coords_index
+//       Access: Published
+//  Description: Returns the array of indices that, if nonempty, will
+//               be used to traverse the vertices in coords_array.
+////////////////////////////////////////////////////////////////////
+INLINE const PTA_ushort &Geom::
+get_coords_index() const {
+  return _vindex;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_normals_index
+//       Access: Published
+//  Description: Returns the array of indices that, if nonempty, will
+//               be used to traverse the vertices in normals_array.
+////////////////////////////////////////////////////////////////////
+INLINE const PTA_ushort &Geom::
+get_normals_index() const {
+  return _nindex;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_colors_index
+//       Access: Published
+//  Description: Returns the array of indices that, if nonempty, will
+//               be used to traverse the vertices in colors_array.
+////////////////////////////////////////////////////////////////////
+INLINE const PTA_ushort &Geom::
+get_colors_index() const {
+  return _cindex;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_texcoords_index
+//       Access: Published
+//  Description: Returns the array of indices that, if nonempty, will
+//               be used to traverse the vertices in texcoords_array.
+////////////////////////////////////////////////////////////////////
+INLINE const PTA_ushort &Geom::
+get_texcoords_index() const {
+  return _tindex;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::set_num_prims
+//       Access: Public
+//  Description: Sets the number of primitives in the Geom.  The
+//               meaning of this depends on the precise type of Geom;
+//               generally, each prim is one triangle in a GeomTri, or
+//               one tristrip in a GeomTristrip.
+////////////////////////////////////////////////////////////////////
+INLINE void Geom::
+set_num_prims(int num) { 
+  _numprims = num; 
+  make_dirty(); 
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_num_prims
+//       Access: Public
+//  Description: Returns the number of primitives in the Geom.
+////////////////////////////////////////////////////////////////////
+INLINE int Geom::
+get_num_prims(void) const { 
+  return _numprims; 
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::set_lengths
+//       Access: Public
+//  Description: Sets the array that indicates the length (number of
+//               vertices) of each primitive.  This array should have
+//               get_num_prims() entries.  This only has meaning for
+//               composite type Geoms, like a GeomTristrip; it is
+//               ignored for simple Geoms, like a GeomTri.
+////////////////////////////////////////////////////////////////////
+INLINE void Geom::
+set_lengths(const PTA_int &lengths) {
+  _primlengths = lengths;
+  make_dirty();
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: Geom::get_lengths
+//       Access: Public
+//  Description: Returns the array the indicates the length (number of
+//               vertices) of each primitive.  This array will
+//               generally only be defined for composite type Geoms,
+//               like a GeomTristrip; it is meaningless for simple
+//               Geoms.
+////////////////////////////////////////////////////////////////////
+INLINE PTA_int Geom::
+get_lengths() const {
+  return _primlengths;
+}
+
+
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //
 //
 // make_vertex_iterator(), get_next_vertex()
 // make_vertex_iterator(), get_next_vertex()
@@ -33,8 +199,7 @@
 //       Access: Public
 //       Access: Public
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE Geom::
-VertexIterator Geom::
+INLINE Geom::VertexIterator Geom::
 make_vertex_iterator() const {
 make_vertex_iterator() const {
   check_config();
   check_config();
   VertexIterator i;
   VertexIterator i;

+ 9 - 38
panda/src/gobj/geom.cxx

@@ -306,27 +306,6 @@ get_texcoords(PTA_TexCoordf &texcoords, GeomBindType &bind,
   tindex = _tindex;
   tindex = _tindex;
 }
 }
 
 
-////////////////////////////////////////////////////////////////////
-//     Function: Geom::set_lengths
-//       Access: Public
-//  Description:
-////////////////////////////////////////////////////////////////////
-void Geom::
-set_lengths(const PTA_int &lengths) {
-  _primlengths = lengths;
-  make_dirty();
-}
-
-////////////////////////////////////////////////////////////////////
-//     Function: Geom::get_lengths
-//       Access: Public
-//  Description:
-////////////////////////////////////////////////////////////////////
-PTA_int Geom::
-get_lengths() const {
-  return _primlengths;
-}
-
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: Geom::explode
 //     Function: Geom::explode
 //       Access: Public, Virtual
 //       Access: Public, Virtual
@@ -424,23 +403,15 @@ write(ostream &out, int indent_level) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void Geom::
 void Geom::
 output(ostream &out) const {
 output(ostream &out) const {
-  out << get_type() << " (" << _numprims << ") ";
-  out << "v:";
-  if ( _coords != (Vertexf*)0L ) out << "1 "; else out << "0 ";
-  out << "n:";
-  if ( _norms != (Normalf*)0L ) out << "1 "; else out << "0 ";
-  out << "c:";
-  if ( _colors != (Colorf*)0L ) out << "1 "; else out << "0 ";
-  out << "t:";
-  if ( _texcoords != (TexCoordf*)0L ) out << "1 "; else out << "0 ";
-  out << "vi:";
-  if ( _vindex != (ushort*)0L ) out << "1 "; else out << "0 ";
-  out << "ni:";
-  if ( _nindex != (ushort*)0L ) out << "1 "; else out << "0 ";
-  out << "ci:";
-  if ( _cindex != (ushort*)0L ) out << "1 "; else out << "0 ";
-  out << "ti:";
-  if ( _tindex != (ushort*)0L ) out << "1 "; else out << "0 ";
+  out << get_type() << " (" << _numprims << ")"
+      << " v:" << _coords.size()
+      << " n:" << _norms.size()
+      << " c:" << _colors.size()
+      << " t:" << _texcoords.size()
+      << " vi:" << _vindex.size()
+      << " ni:" << _nindex.size()
+      << " ci:" << _cindex.size()
+      << " ti:" << _tindex.size();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 20 - 9
panda/src/gobj/geom.h

@@ -33,6 +33,7 @@ class BamWriter;
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 // Defines
 // Defines
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+BEGIN_PUBLISH
 enum GeomBindType
 enum GeomBindType
 {
 {
     G_OFF,
     G_OFF,
@@ -41,6 +42,7 @@ enum GeomBindType
     G_PER_COMPONENT,
     G_PER_COMPONENT,
     G_PER_VERTEX
     G_PER_VERTEX
 };
 };
+END_PUBLISH
 static const int num_GeomBindTypes = 5;
 static const int num_GeomBindTypes = 5;
 
 
 enum GeomAttrType
 enum GeomAttrType
@@ -126,10 +128,7 @@ public:
 public:
 public:
  
  
   void get_min_max( Vertexf& min, Vertexf& max ) const;
   void get_min_max( Vertexf& min, Vertexf& max ) const;
- 
-  GeomBindType get_binding( int attr ) const {
-    return _bind[attr];
-  }
+  
  
  
   void set_coords( const PTA_Vertexf &coords,
   void set_coords( const PTA_Vertexf &coords,
 		   GeomBindType bind,
 		   GeomBindType bind,
@@ -160,12 +159,24 @@ public:
   void get_texcoords( PTA_TexCoordf &texcoords,
   void get_texcoords( PTA_TexCoordf &texcoords,
 		      GeomBindType &bind,
 		      GeomBindType &bind,
 		      PTA_ushort &tindex) const;
 		      PTA_ushort &tindex) const;
+
+PUBLISHED: 
+  INLINE GeomBindType get_binding(int attr) const;
+  INLINE const PTA_Vertexf &get_coords_array() const;
+  INLINE const PTA_Normalf &get_normals_array() const;
+  INLINE const PTA_Colorf &get_colors_array() const;
+  INLINE const PTA_TexCoordf &get_texcoords_array() const;
+  INLINE const PTA_ushort &get_coords_index() const;
+  INLINE const PTA_ushort &get_normals_index() const;
+  INLINE const PTA_ushort &get_colors_index() const;
+  INLINE const PTA_ushort &get_texcoords_index() const;
+
+public: 
+  INLINE void set_num_prims(int num);
+  INLINE int get_num_prims(void) const;
  
  
-  INLINE void set_num_prims(int num) { _numprims = num; make_dirty(); }
-  INLINE int get_num_prims(void) const { return _numprims; }
- 
-  void set_lengths( const PTA_int &lengths );
-  PTA_int get_lengths() const;
+  INLINE void set_lengths(const PTA_int &lengths);
+  INLINE PTA_int get_lengths() const;
  
  
   virtual int get_num_vertices_per_prim() const=0;
   virtual int get_num_vertices_per_prim() const=0;
   virtual int get_num_more_vertices_than_components() const=0;
   virtual int get_num_more_vertices_than_components() const=0;

+ 2 - 1
panda/src/gobj/geomLine.h

@@ -53,10 +53,11 @@ public:
 protected:
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);
   void fillin(DatagramIterator& scan, BamReader* manager);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomLine",
     register_type(_type_handle, "GeomLine",

+ 2 - 1
panda/src/gobj/geomLinestrip.h

@@ -52,10 +52,11 @@ public:
 protected:
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);
   void fillin(DatagramIterator& scan, BamReader* manager);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomLinestrip",
     register_type(_type_handle, "GeomLinestrip",

+ 2 - 1
panda/src/gobj/geomPoint.h

@@ -53,10 +53,11 @@ public:
 protected:
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);
   void fillin(DatagramIterator& scan, BamReader* manager);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomPoint",
     register_type(_type_handle, "GeomPoint",

+ 2 - 1
panda/src/gobj/geomPolygon.h

@@ -41,10 +41,11 @@ public:
   static void register_with_read_factory(void);
   static void register_with_read_factory(void);
   static TypedWriteable *make_GeomPolygon(const FactoryParams &params);
   static TypedWriteable *make_GeomPolygon(const FactoryParams &params);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomPolygon",
     register_type(_type_handle, "GeomPolygon",

+ 2 - 1
panda/src/gobj/geomQuad.h

@@ -39,10 +39,11 @@ public:
   static void register_with_read_factory(void);
   static void register_with_read_factory(void);
   static TypedWriteable *make_GeomQuad(const FactoryParams &params);
   static TypedWriteable *make_GeomQuad(const FactoryParams &params);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomQuad",
     register_type(_type_handle, "GeomQuad",

+ 2 - 1
panda/src/gobj/geomSphere.h

@@ -54,10 +54,11 @@ public:
 
 
   static TypedWriteable *make_GeomSphere(const FactoryParams &params);
   static TypedWriteable *make_GeomSphere(const FactoryParams &params);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomSphere",
     register_type(_type_handle, "GeomSphere",

+ 2 - 1
panda/src/gobj/geomSprite.h

@@ -73,10 +73,11 @@ public:
 protected:
 protected:
   void fillin(DatagramIterator &scan, BamReader *manager);
   void fillin(DatagramIterator &scan, BamReader *manager);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomSprite",
     register_type(_type_handle, "GeomSprite",

+ 2 - 1
panda/src/gobj/geomTri.h

@@ -39,10 +39,11 @@ public:
   static void register_with_read_factory(void);
   static void register_with_read_factory(void);
   static TypedWriteable *make_GeomTri(const FactoryParams &params);
   static TypedWriteable *make_GeomTri(const FactoryParams &params);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomTri",
     register_type(_type_handle, "GeomTri",

+ 2 - 1
panda/src/gobj/geomTrifan.h

@@ -42,10 +42,11 @@ public:
   static void register_with_read_factory(void);
   static void register_with_read_factory(void);
   static TypedWriteable *make_GeomTrifan(const FactoryParams &params);
   static TypedWriteable *make_GeomTrifan(const FactoryParams &params);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomTrifan",
     register_type(_type_handle, "GeomTrifan",

+ 2 - 1
panda/src/gobj/geomTristrip.h

@@ -41,10 +41,11 @@ public:
   static void register_with_read_factory(void);
   static void register_with_read_factory(void);
   static TypedWriteable *make_GeomTristrip(const FactoryParams &params);
   static TypedWriteable *make_GeomTristrip(const FactoryParams &params);
 
 
-public:
+PUBLISHED:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
     return _type_handle;
     return _type_handle;
   }
   }
+public:
   static void init_type() {
   static void init_type() {
     Geom::init_type();
     Geom::init_type();
     register_type(_type_handle, "GeomTristrip",
     register_type(_type_handle, "GeomTristrip",

+ 10 - 0
panda/src/linmath/luse.N

@@ -73,3 +73,13 @@ forcetype LOrientationf
 forcetype LQuaterniond
 forcetype LQuaterniond
 forcetype LRotationd
 forcetype LRotationd
 forcetype LOrientationd
 forcetype LOrientationd
+
+forcetype PTA_Vertexf
+forcetype PTA_Normalf
+forcetype PTA_TexCoordf
+forcetype PTA_Colorf
+
+renametype PTA_Vertexf PTA_Vertexf
+renametype PTA_Normalf PTA_Normalf
+renametype PTA_TexCoordf PTA_TexCoordf
+renametype PTA_Colorf PTA_Colorf

+ 70 - 53
panda/src/putil/pointerToArray.I

@@ -11,7 +11,7 @@ vector<Element> ConstPointerToArray<Element>::_empty_array;
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: PointerToArray::Constructor
 //     Function: PointerToArray::Constructor
-//       Access: Public
+//       Access: Published
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class Element>
 template<class Element>
@@ -23,7 +23,7 @@ PointerToArray() :
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: PointerToArray::Constructor
 //     Function: PointerToArray::Constructor
-//       Access: Public
+//       Access: Published
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class Element>
 template<class Element>
@@ -36,7 +36,7 @@ PointerToArray(size_type n) :
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: PointerToArray::Constructor
 //     Function: PointerToArray::Constructor
-//       Access: Public
+//       Access: Published
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class Element>
 template<class Element>
@@ -49,7 +49,7 @@ PointerToArray(size_type n, const Element &value) :
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: PointerToArray::Copy Constructor
 //     Function: PointerToArray::Copy Constructor
-//       Access: Public
+//       Access: Published
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class Element>
 template<class Element>
@@ -117,7 +117,7 @@ rend() const {
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: PointerToArray::size
 //     Function: PointerToArray::size
-//       Access: Public
+//       Access: Published
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class Element>
 template<class Element>
@@ -177,26 +177,6 @@ capacity() const {
   return _ptr->capacity();
   return _ptr->capacity();
 }
 }
 
 
-#ifndef WIN32_VC
-////////////////////////////////////////////////////////////////////
-//     Function: PointerToArray::Indexing operator
-//       Access: Public
-//  Description: 
-////////////////////////////////////////////////////////////////////
-template<class Element>
-INLINE PointerToArray<Element>::reference PointerToArray<Element>::
-operator[](size_type n) const {
-  nassertd(_ptr != NULL) {
-    ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
-  }
-  nassertd(!_ptr->empty()) {
-    _ptr->push_back(Element());
-  }
-  nassertr(n < _ptr->size(), _ptr->operator[](0));
-  return _ptr->operator[](n);
-}
-#endif
-
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: PointerToArray::front
 //     Function: PointerToArray::front
 //       Access: Public
 //       Access: Public
@@ -231,20 +211,6 @@ back() const {
   return _ptr->back();
   return _ptr->back();
 }
 }
 
 
-////////////////////////////////////////////////////////////////////
-//     Function: PointerToArray::push_back
-//       Access: Public
-//  Description: 
-////////////////////////////////////////////////////////////////////
-template<class Element>
-INLINE void PointerToArray<Element>::
-push_back(const Element &x) {
-  if (_ptr == NULL) {
-    reassign(new RefCountObj<vector<Element> >);
-  }
-  _ptr->push_back(x);
-}
-
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: PointerToArray::insert
 //     Function: PointerToArray::insert
 //       Access: Public
 //       Access: Public
@@ -319,18 +285,19 @@ insert(iterator position, const Element *first, const Element *last) const {
 #endif
 #endif
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: PointerToArray::pop_back
+//     Function: PointerToArray::erase
 //       Access: Public
 //       Access: Public
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class Element>
 template<class Element>
 INLINE void PointerToArray<Element>::
 INLINE void PointerToArray<Element>::
-pop_back() const {
+erase(iterator position) const {
   nassertd(_ptr != NULL) {
   nassertd(_ptr != NULL) {
     ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
     ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
   }
   }
-  nassertv(!_ptr->empty());
-  _ptr->pop_back();
+  nassertv(position >= _ptr->begin() &&
+	   position <= _ptr->end());
+  _ptr->erase(position);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -340,29 +307,79 @@ pop_back() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class Element>
 template<class Element>
 INLINE void PointerToArray<Element>::
 INLINE void PointerToArray<Element>::
-erase(iterator position) const {
+erase(iterator first, iterator last) const {
   nassertd(_ptr != NULL) {
   nassertd(_ptr != NULL) {
     ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
     ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
   }
   }
-  nassertv(position >= _ptr->begin() &&
-	   position <= _ptr->end());
-  _ptr->erase(position);
+  nassertv(first >= _ptr->begin() && first <= _ptr->end());
+  nassertv(last >= _ptr->begin() && last <= _ptr->end());
+  _ptr->erase(first, last);
 }
 }
 
 
+#if !defined(WIN32_VC) || defined(CPPPARSER)
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: PointerToArray::erase
-//       Access: Public
+//     Function: PointerToArray::Indexing operator
+//       Access: Published
+//  Description: 
+////////////////////////////////////////////////////////////////////
+template<class Element>
+INLINE PointerToArray<Element>::reference PointerToArray<Element>::
+operator [](size_type n) const {
+  nassertd(_ptr != NULL) {
+    ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
+  }
+  nassertd(!_ptr->empty()) {
+    _ptr->push_back(Element());
+  }
+  nassertr(n < _ptr->size(), _ptr->operator[](0));
+  return _ptr->operator[](n);
+}
+#endif
+
+////////////////////////////////////////////////////////////////////
+//     Function: PointerToArray::push_back
+//       Access: Published
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class Element>
 template<class Element>
 INLINE void PointerToArray<Element>::
 INLINE void PointerToArray<Element>::
-erase(iterator first, iterator last) const {
+push_back(const Element &x) {
+  if (_ptr == NULL) {
+    reassign(new RefCountObj<vector<Element> >);
+  }
+  _ptr->push_back(x);
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: PointerToArray::pop_back
+//       Access: Published
+//  Description: 
+////////////////////////////////////////////////////////////////////
+template<class Element>
+INLINE void PointerToArray<Element>::
+pop_back() {
   nassertd(_ptr != NULL) {
   nassertd(_ptr != NULL) {
     ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
     ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
   }
   }
-  nassertv(first >= _ptr->begin() && first <= _ptr->end());
-  nassertv(last >= _ptr->begin() && last <= _ptr->end());
-  _ptr->erase(first, last);
+  nassertv(!_ptr->empty());
+  _ptr->pop_back();
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: PointerToArray::make_empty
+//       Access: Published
+//  Description: Empties the array pointed to.  This is different from
+//               clear(), which reassigns the pointer to a NULL
+//               pointer.
+////////////////////////////////////////////////////////////////////
+template<class Element>
+INLINE void PointerToArray<Element>::
+make_empty() {
+  nassertd(_ptr != NULL) {
+    ((PointerToArray<Element> *)this)->reassign(new RefCountObj<vector<Element> >);
+  }
+  nassertv(!_ptr->empty());
+  _ptr->clear();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 15 - 5
panda/src/putil/pointerToArray.h

@@ -83,11 +83,13 @@ public:
   typedef vector<Element>::difference_type difference_type;
   typedef vector<Element>::difference_type difference_type;
   typedef vector<Element>::size_type size_type;
   typedef vector<Element>::size_type size_type;
 
 
+PUBLISHED:
   INLINE PointerToArray();
   INLINE PointerToArray();
   INLINE PointerToArray(size_type n);
   INLINE PointerToArray(size_type n);
   INLINE PointerToArray(size_type n, const Element &value);
   INLINE PointerToArray(size_type n, const Element &value);
   INLINE PointerToArray(const PointerToArray<Element> &copy);
   INLINE PointerToArray(const PointerToArray<Element> &copy);
 
 
+public:
   // Duplicating the interface of vector.  The following member
   // Duplicating the interface of vector.  The following member
   // functions are all const, because they do not reassign the
   // functions are all const, because they do not reassign the
   // pointer--they operate only within the vector itself, which is
   // pointer--they operate only within the vector itself, which is
@@ -101,19 +103,18 @@ public:
   // Equality and comparison operators are pointerwise for
   // Equality and comparison operators are pointerwise for
   // PointerToArrays, not elementwise as in vector.
   // PointerToArrays, not elementwise as in vector.
 
 
+PUBLISHED:
   INLINE size_type size() const;
   INLINE size_type size() const;
+
+public:
   INLINE size_type max_size() const;
   INLINE size_type max_size() const;
   INLINE bool empty() const;
   INLINE bool empty() const;
 
 
   // Functions specific to vectors.
   // Functions specific to vectors.
   INLINE void reserve(size_type n);
   INLINE void reserve(size_type n);
   INLINE size_type capacity() const;
   INLINE size_type capacity() const;
-#ifndef WIN32_VC
-  INLINE reference operator[](size_type n) const;
-#endif
   INLINE reference front() const;
   INLINE reference front() const;
   INLINE reference back() const;
   INLINE reference back() const;
-  INLINE void push_back(const Element &x);
   INLINE iterator insert(iterator position) const;
   INLINE iterator insert(iterator position) const;
   INLINE iterator insert(iterator position, const Element &x) const;
   INLINE iterator insert(iterator position, const Element &x) const;
   INLINE void insert(iterator position, size_type n, const Element &x) const;
   INLINE void insert(iterator position, size_type n, const Element &x) const;
@@ -125,10 +126,19 @@ public:
   INLINE void insert(iterator position, const Element *first, const Element *last) const;
   INLINE void insert(iterator position, const Element *first, const Element *last) const;
 #endif
 #endif
 
 
-  INLINE void pop_back() const;
   INLINE void erase(iterator position) const;
   INLINE void erase(iterator position) const;
   INLINE void erase(iterator first, iterator last) const;
   INLINE void erase(iterator first, iterator last) const;
 
 
+PUBLISHED:
+#if !defined(WIN32_VC) || defined(CPPPARSER)
+  INLINE reference operator [](size_type n) const;
+#endif
+  INLINE void push_back(const Element &x);
+  INLINE void pop_back();
+  INLINE void make_empty();
+
+public:
+
   INLINE operator Element *() const;
   INLINE operator Element *() const;
   INLINE Element *p() const;
   INLINE Element *p() const;
   INLINE vector<Element> &v() const;
   INLINE vector<Element> &v() const;