Przeglądaj źródła

*** empty log message ***

David Rose 24 lat temu
rodzic
commit
41a58def4f
36 zmienionych plików z 184 dodań i 34 usunięć
  1. 4 0
      panda/src/chan/vector_PartGroupStar.h
  2. 3 1
      panda/src/collide/collisionNode.cxx
  3. 7 2
      panda/src/collide/collisionPolygon.cxx
  4. 10 0
      panda/src/display/graphicsWindowInputDevice.I
  5. 5 0
      panda/src/display/graphicsWindowInputDevice.h
  6. 4 0
      panda/src/egg/vector_PT_EggMaterial.h
  7. 4 0
      panda/src/egg/vector_PT_EggTexture.h
  8. 4 0
      panda/src/egg/vector_PT_EggVertex.h
  9. 1 0
      panda/src/glgsg/glGraphicsStateGuardian.cxx
  10. 32 0
      panda/src/gobj/LOD.I
  11. 8 0
      panda/src/gobj/LOD.h
  12. 4 1
      panda/src/gobj/geom.cxx
  13. 12 3
      panda/src/graph/arcChain.I
  14. 4 1
      panda/src/graph/nodeRelation.cxx
  15. 4 0
      panda/src/graph/vector_NodeRelation_star.h
  16. 4 0
      panda/src/graph/vector_PT_Node.h
  17. 4 0
      panda/src/graph/vector_PT_NodeRelation.h
  18. 4 0
      panda/src/light/vector_PT_Light.h
  19. 2 2
      panda/src/linmath/Sources.pp
  20. 4 0
      panda/src/linmath/vector_Colorf.h
  21. 4 0
      panda/src/linmath/vector_LPoint2f.h
  22. 4 0
      panda/src/linmath/vector_LVecBase3f.h
  23. 4 0
      panda/src/linmath/vector_Normalf.h
  24. 4 0
      panda/src/linmath/vector_Vertexf.h
  25. 0 14
      panda/src/putil/pointerToArray.I
  26. 0 1
      panda/src/putil/pointerToArray.h
  27. 1 1
      panda/src/putil/string_utils.cxx
  28. 4 0
      panda/src/putil/vector_double.h
  29. 4 0
      panda/src/putil/vector_float.h
  30. 9 5
      panda/src/putil/vector_typedWritable.h
  31. 4 0
      panda/src/putil/vector_uchar.h
  32. 4 0
      panda/src/putil/vector_ulong.h
  33. 4 0
      panda/src/putil/vector_ushort.h
  34. 5 1
      panda/src/putil/vector_writable.h
  35. 3 0
      panda/src/sgmanip/nodePath.I
  36. 6 2
      panda/src/sgraph/geomNode.cxx

+ 4 - 0
panda/src/chan/vector_PartGroupStar.h

@@ -22,6 +22,10 @@
 //               vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_PARTGROUPSTAR std::_Vector_val<PartGroup *, std::allocator<PartGroup *> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PARTGROUPSTAR)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<PartGroup *>)
 typedef vector<PartGroup *> vector_PartGroupStar;
 

+ 3 - 1
panda/src/collide/collisionNode.cxx

@@ -161,8 +161,10 @@ recompute_bound() {
     child_volumes.push_back(&(*gi)->get_bound());
   }
 
+  const BoundingVolume **child_begin = &child_volumes[0];
+  const BoundingVolume **child_end = child_begin + child_volumes.size();
   bool success =
-    _bound->around(child_volumes.begin(), child_volumes.end());
+    _bound->around(child_begin, child_end);
 
 #ifndef NDEBUG
   if (!success) {

+ 7 - 2
panda/src/collide/collisionPolygon.cxx

@@ -151,7 +151,10 @@ xform(const LMatrix4f &mat) {
     if (_reversed) {
       reverse(verts.begin(), verts.end());
     }
-    setup_points(verts.begin(), verts.end());
+
+    const LPoint3f *verts_begin = &verts[0];
+    const LPoint3f *verts_end = verts_begin + verts.size();
+    setup_points(verts_begin, verts_end);
   }
     
   clear_viz_arcs();
@@ -202,7 +205,9 @@ recompute_bound() {
     vertices.push_back(to_3d(*pi));
   }
 
-  gbv->around(vertices.begin(), vertices.end());
+  const LPoint3f *vertices_begin = &vertices[0];
+  const LPoint3f *vertices_end = vertices_begin + vertices.size();
+  gbv->around(vertices_begin, vertices_end);
 }
 
 ////////////////////////////////////////////////////////////////////

+ 10 - 0
panda/src/display/graphicsWindowInputDevice.I

@@ -3,6 +3,16 @@
 // 
 ////////////////////////////////////////////////////////////////////
 
+////////////////////////////////////////////////////////////////////
+//     Function: GraphicsWindowInputDevice::Default Constructor
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+INLINE GraphicsWindowInputDevice::
+GraphicsWindowInputDevice() {
+  _flags = 0;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: GraphicsWindowInputDevice::get_name
 //       Access: Public

+ 5 - 0
panda/src/display/graphicsWindowInputDevice.h

@@ -31,6 +31,7 @@ public:
   static GraphicsWindowInputDevice keyboard_only(const string &name);
   static GraphicsWindowInputDevice pointer_and_keyboard(const string &name);
 
+  INLINE GraphicsWindowInputDevice();
   GraphicsWindowInputDevice(const GraphicsWindowInputDevice &copy);
   void operator = (const GraphicsWindowInputDevice &copy);
   ~GraphicsWindowInputDevice();
@@ -75,6 +76,10 @@ private:
 
 #include "graphicsWindowInputDevice.I"
 
+#ifdef HAVE_DINKUM
+#define VV_GRAPHICSWINDOWINPUTDEVICE std::_Vector_val<GraphicsWindowInputDevice, std::allocator<GraphicsWindowInputDevice> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_GRAPHICSWINDOWINPUTDEVICE)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<GraphicsWindowInputDevice>)
 typedef vector<GraphicsWindowInputDevice> vector_GraphicsWindowInputDevice;
 

+ 4 - 0
panda/src/egg/vector_PT_EggMaterial.h

@@ -22,6 +22,10 @@
 //               file, rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_PT_EGGMATERIAL std::_Vector_val<PT_EggMaterial, std::allocator<PT_EggMaterial> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGMATERIAL)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<PT_EggMaterial>)
 typedef vector<PT_EggMaterial> vector_PT_EggMaterial;
 

+ 4 - 0
panda/src/egg/vector_PT_EggTexture.h

@@ -22,6 +22,10 @@
 //               file, rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_PT_EGGTEXTURE std::_Vector_val<PT_EggTexture, std::allocator<PT_EggTexture> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGTEXTURE)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<PT_EggTexture>)
 typedef vector<PT_EggTexture> vector_PT_EggTexture;
 

+ 4 - 0
panda/src/egg/vector_PT_EggVertex.h

@@ -22,6 +22,10 @@
 //               file, rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_PT_EGGVERTEX std::_Vector_val<PT_EggVertex, std::allocator<PT_EggVertex> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGVERTEX)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<PT_EggVertex>)
 typedef vector<PT_EggVertex> vector_PT_EggVertex;
 

+ 1 - 0
panda/src/glgsg/glGraphicsStateGuardian.cxx

@@ -250,6 +250,7 @@ reset() {
   _point_smooth_enabled = false;
   _scissor_enabled = false;
   _lighting_enabled = false;
+  _lighting_enabled_this_frame = false;
   _normals_enabled = false;
   _texturing_enabled = false;
   _multisample_alpha_one_enabled = false;

+ 32 - 0
panda/src/gobj/LOD.I

@@ -5,6 +5,15 @@
 
 #include <math.h>
 
+////////////////////////////////////////////////////////////////////
+//     Function: LODSwitch::Default Constructor
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+INLINE LODSwitch::
+LODSwitch() {
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: LODSwitch::Constructor
 //       Access: Public
@@ -15,6 +24,29 @@ LODSwitch(float in, float out) {
   set_range(in, out);
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: LODSwitch::Copy Constructor
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+INLINE LODSwitch::
+LODSwitch(const LODSwitch &copy) :
+  _in(copy._in),
+  _out(copy._out)
+{
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: LODSwitch::Copy Assignment Operator
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+INLINE void LODSwitch::
+operator = (const LODSwitch &copy) {
+  _in = copy._in;
+  _out = copy._out;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: LODSwitch::get_range
 //       Access: Public

+ 8 - 0
panda/src/gobj/LOD.h

@@ -31,7 +31,11 @@ class DatagramIterator;
 ////////////////////////////////////////////////////////////////////
 class EXPCL_PANDA LODSwitch {
 public:
+  INLINE LODSwitch();
   INLINE LODSwitch(float in, float out);
+  INLINE LODSwitch(const LODSwitch &copy);
+  INLINE void operator = (const LODSwitch &copy);
+
   INLINE void get_range(float &in, float &out) const;
   INLINE float get_in() const;
   INLINE float get_out() const;
@@ -54,6 +58,10 @@ protected:
   float _out;
 };
 
+#ifdef HAVE_DINKUM
+#define VV_LODSWITCH std::_Vector_val<LODSwitch, std::allocator<LODSwitch> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LODSWITCH)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<LODSwitch>)
 typedef vector<LODSwitch> LODSwitchVector;
 

+ 4 - 1
panda/src/gobj/geom.cxx

@@ -469,7 +469,10 @@ recompute_bound() {
     }
   }
 
-  gbv->around(vertices.begin(), vertices.end());
+  const LPoint3f *vertices_begin = &vertices[0];
+  const LPoint3f *vertices_end = vertices_begin + vertices.size();
+
+  gbv->around(vertices_begin, vertices_end);
 }
 
 ////////////////////////////////////////////////////////////////////

+ 12 - 3
panda/src/graph/arcChain.I

@@ -15,8 +15,8 @@ ArcComponent(Node *node) :
   _next(NULL)
 {
   MemoryUsage::update_type(this, get_class_type());
-  nassertv(node != (Node *)NULL);
   _p._node = node;
+  nassertv(node != (Node *)NULL);
   _p._node->ref();
 }
 
@@ -33,9 +33,9 @@ ArcComponent(NodeRelation *arc, ArcComponent *next) :
   _next(next)
 {
   MemoryUsage::update_type(this, get_class_type());
+  _p._arc = arc;
   nassertv(_next != (ArcComponent *)NULL);
   nassertv(arc != (NodeRelation *)NULL);
-  _p._arc = arc;
   _p._arc->ref();
   _p._arc->ref_parent();
 }
@@ -52,10 +52,12 @@ ArcComponent(const ArcComponent &copy) :
   MemoryUsage::update_type(this, get_class_type());
   if (has_arc()) {
     _p._arc = copy._p._arc;
+    nassertv(_p._arc != (NodeRelation *)NULL);
     _p._arc->ref();
     _p._arc->ref_parent();
   } else {
     _p._node = copy._p._node;
+    nassertv(_p._node != (Node *)NULL);
     _p._node->ref();
   }
 }
@@ -69,9 +71,11 @@ ArcComponent(const ArcComponent &copy) :
 INLINE_GRAPH ArcChain::ArcComponent::
 ~ArcComponent() {
   if (has_arc()) {
+    nassertv(_p._arc != (NodeRelation *)NULL);
     _p._arc->unref_parent();
     unref_delete(_p._arc);
   } else {
+    nassertv(_p._node != (Node *)NULL);
     unref_delete(_p._node);
   }
 }
@@ -251,10 +255,15 @@ ArcChain() {
 //               This chain may now be extended by repeatedly calling
 //               push_back() with each arc below that node in
 //               sequence.
+//
+//               If the Node pointer is NULL, this quietly creates an
+//               empty ArcChain.
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH ArcChain::
 ArcChain(Node *top_node) {
-  _head = new ArcComponent(top_node);
+  if (top_node != (Node *)NULL) {
+    _head = new ArcComponent(top_node);
+  }
 }
 
 ////////////////////////////////////////////////////////////////////

+ 4 - 1
panda/src/graph/nodeRelation.cxx

@@ -825,8 +825,11 @@ recompute_bound() {
     child_volumes.push_back(&(*drpi)->get_bound());
   }
 
+  const BoundingVolume **child_begin = &child_volumes[0];
+  const BoundingVolume **child_end = child_begin + child_volumes.size();
   bool success = 
-    _bound->around(child_volumes.begin(), child_volumes.end());
+    _bound->around(child_begin, child_end);
+
 
 #ifndef NDEBUG
   if (!success) {

+ 4 - 0
panda/src/graph/vector_NodeRelation_star.h

@@ -21,6 +21,10 @@ class NodeRelation;
 //               file, rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_NODERELATION_STAR std::_Vector_val<NodeRelation *, std::allocator<NodeRelation *> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_NODERELATION_STAR)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<NodeRelation *>)
 typedef vector<NodeRelation *> vector_NodeRelation_star;
 

+ 4 - 0
panda/src/graph/vector_PT_Node.h

@@ -22,6 +22,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_PT_NODE std::_Vector_val<PT_Node, std::allocator<PT_Node> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_NODE)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<PT_Node>)
 typedef vector<PT_Node> vector_PT_Node;
 

+ 4 - 0
panda/src/graph/vector_PT_NodeRelation.h

@@ -22,6 +22,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_PT_NODERELATION std::_Vector_val<PT_NodeRelation, std::allocator<PT_NodeRelation> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_NODERELATION)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<PT_NodeRelation>)
 typedef vector<PT_NodeRelation> vector_PT_NodeRelation;
 

+ 4 - 0
panda/src/light/vector_PT_Light.h

@@ -21,6 +21,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_PT_LIGHT std::_Vector_val<PT_Light, std::allocator<PT_Light> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_LIGHT)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<PT_Light>)
 typedef vector<PT_Light> vector_PT_Light;
 

+ 2 - 2
panda/src/linmath/Sources.pp

@@ -33,8 +33,8 @@
     pta_TexCoordf.cxx pta_TexCoordf.h pta_Vertexf.cxx pta_Vertexf.h \
     vector_Colorf.cxx vector_Colorf.h vector_LPoint2f.cxx \
     vector_LPoint2f.h vector_LVecBase3f.cxx vector_LVecBase3f.h \
-    vector_Normalf.cxx vector_Normalf.h vector_Vertexf.cxx \
-    vector_Vertexf.h
+    vector_Normalf.cxx vector_Normalf.h vector_TexCoordf.h \
+    vector_Vertexf.cxx vector_Vertexf.h
 
   #define INSTALL_HEADERS \
     cmath.I cmath.h compose_matrix.h compose_matrix_src.I \

+ 4 - 0
panda/src/linmath/vector_Colorf.h

@@ -21,6 +21,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_COLORF std::_Vector_val<Colorf, std::allocator<Colorf> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_COLORF)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<Colorf>)
 typedef vector<Colorf> vector_Colorf;
 

+ 4 - 0
panda/src/linmath/vector_LPoint2f.h

@@ -21,6 +21,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_LPOINT2F std::_Vector_val<LPoint2f, std::allocator<LPoint2f> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LPOINT2F)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<LPoint2f>)
 typedef vector<LPoint2f> vector_LPoint2f;
 

+ 4 - 0
panda/src/linmath/vector_LVecBase3f.h

@@ -21,6 +21,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_LVECBASE3F std::_Vector_val<LVecBase3f, std::allocator<LVecBase3f> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LVECBASE3F)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<LVecBase3f>)
 typedef vector<LVecBase3f> vector_LVecBase3f;
 

+ 4 - 0
panda/src/linmath/vector_Normalf.h

@@ -21,6 +21,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_NORMALF std::_Vector_val<Normalf, std::allocator<Normalf> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_NORMALF)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<Normalf>)
 typedef vector<Normalf> vector_Normalf;
 

+ 4 - 0
panda/src/linmath/vector_Vertexf.h

@@ -21,6 +21,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_VERTEXF std::_Vector_val<Vertexf, std::allocator<Vertexf> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_VERTEXF)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<Vertexf>)
 typedef vector<Vertexf> vector_Vertexf;
 

+ 0 - 14
panda/src/putil/pointerToArray.I

@@ -211,20 +211,6 @@ back() const {
   return _ptr->back();
 }
 
-////////////////////////////////////////////////////////////////////
-//     Function: PointerToArray::insert
-//       Access: Public
-//  Description: 
-////////////////////////////////////////////////////////////////////
-template<class Element>
-INLINE PointerToArray<Element>::iterator PointerToArray<Element>::
-insert(iterator position) const {
-  nassertr(_ptr != NULL, position);
-  nassertr(position >= _ptr->begin() &&
-	   position <= _ptr->end(), position);
-  return _ptr->insert(position);
-}
-
 ////////////////////////////////////////////////////////////////////
 //     Function: PointerToArray::insert
 //       Access: Public

+ 0 - 1
panda/src/putil/pointerToArray.h

@@ -115,7 +115,6 @@ public:
   INLINE size_type capacity() const;
   INLINE reference front() const;
   INLINE reference back() const;
-  INLINE iterator insert(iterator position) const;
   INLINE iterator insert(iterator position, const Element &x) const;
   INLINE void insert(iterator position, size_type n, const Element &x) const;
 

+ 1 - 1
panda/src/putil/string_utils.cxx

@@ -253,6 +253,6 @@ string_to_double(const string &str, double &result) {
 bool
 string_to_float(const string &str, float &result) {
   string tail;
-  result = string_to_double(str, tail);
+  result = (float)string_to_double(str, tail);
   return tail.empty();
 }

+ 4 - 0
panda/src/putil/vector_double.h

@@ -19,6 +19,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_DOUBLE std::_Vector_val<double, std::allocator<double> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_DOUBLE)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<double>)
 typedef vector<double> vector_double;
 

+ 4 - 0
panda/src/putil/vector_float.h

@@ -19,6 +19,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_FLOAT std::_Vector_val<float, std::allocator<float> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_FLOAT)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<float>)
 typedef vector<float> vector_float;
 

+ 9 - 5
panda/src/putil/vector_typedWritable.h

@@ -14,13 +14,17 @@ class TypedWritable;
 
 ////////////////////////////////////////////////////////////////////
 //       Class : vector_typedWritable
-// Description : A vector of TypedWritable.  This class is defined once here,
-//               and exported to PANDA.DLL; other packages that want
-//               to use a vector of this type (whether they need to
-//               export it or not) should include this header file,
-//               rather than defining the vector again.
+// Description : A vector of TypedWritable *.  This class is defined
+//               once here, and exported to PANDA.DLL; other packages
+//               that want to use a vector of this type (whether they
+//               need to export it or not) should include this header
+//               file, rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_TYPEDWRITABLE std::_Vector_val<TypedWritable *, std::allocator<TypedWritable *> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_TYPEDWRITABLE)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<TypedWritable*>)
 typedef vector<TypedWritable*> vector_typedWritable;
 

+ 4 - 0
panda/src/putil/vector_uchar.h

@@ -19,6 +19,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_UCHAR std::_Vector_val<unsigned char, std::allocator<unsigned char> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_UCHAR)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<unsigned char>)
 typedef vector<unsigned char> vector_uchar;
 

+ 4 - 0
panda/src/putil/vector_ulong.h

@@ -19,6 +19,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_ULONG std::_Vector_val<unsigned long, std::allocator<unsigned long> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_ULONG)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<unsigned long>)
 typedef vector<unsigned long> vector_ulong;
 

+ 4 - 0
panda/src/putil/vector_ushort.h

@@ -19,6 +19,10 @@
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_USHORT std::_Vector_val<unsigned short, std::allocator<unsigned short> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_USHORT)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<unsigned short>)
 typedef vector<unsigned short> vector_ushort;
 

+ 5 - 1
panda/src/putil/vector_writable.h

@@ -14,13 +14,17 @@ class Writable;
 
 ////////////////////////////////////////////////////////////////////
 //       Class : vector_writable
-// Description : A vector of TypedWritable.  This class is defined once here,
+// Description : A vector of Writable *.  This class is defined once here,
 //               and exported to PANDA.DLL; other packages that want
 //               to use a vector of this type (whether they need to
 //               export it or not) should include this header file,
 //               rather than defining the vector again.
 ////////////////////////////////////////////////////////////////////
 
+#ifdef HAVE_DINKUM
+#define VV_WRITABLE std::_Vector_val<Writable *, std::allocator<Writable *> >
+EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_WRITABLE)
+#endif
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<Writable*>)
 typedef vector<Writable*> vector_writable;
 

+ 3 - 0
panda/src/sgmanip/nodePath.I

@@ -23,6 +23,9 @@ NodePath(TypeHandle graph_type) : NodePathBase(graph_type) {
 //               top node.  It's not yet much of a path, but it does
 //               reference at least the one node and can be used as an
 //               ordinary node pointer.
+//
+//               If the Node pointer is NULL, this quietly creates an
+//               empty NodePath.
 ////////////////////////////////////////////////////////////////////
 INLINE NodePath::
 NodePath(Node *top_node, TypeHandle graph_type) : NodePathBase(top_node, graph_type) {

+ 6 - 2
panda/src/sgraph/geomNode.cxx

@@ -210,7 +210,9 @@ add_geom(dDrawable *geom) {
 ////////////////////////////////////////////////////////////////////
 void GeomNode::
 add_geoms_from(const GeomNode *other) {
-  _geoms.insert(_geoms.end(), other->_geoms.begin(), other->_geoms.end());
+  const PT(dDrawable) *geoms_begin = &other->_geoms[0];
+  const PT(dDrawable) *geoms_end = geoms_begin + other->_geoms.size();
+  _geoms.insert(_geoms.end(), geoms_begin, geoms_end);
   mark_bound_stale();
 }
 
@@ -234,7 +236,9 @@ recompute_bound() {
     child_volumes.push_back(&(*gi)->get_bound());
   }
 
-  _bound->around(child_volumes.begin(), child_volumes.end());
+  const BoundingVolume **child_begin = &child_volumes[0];
+  const BoundingVolume **child_end = child_begin + child_volumes.size();
+  _bound->around(child_begin, child_end);
 }
 
 ////////////////////////////////////////////////////////////////////