فهرست منبع

fix NurbsCurve with new loader

David Rose 19 سال پیش
والد
کامیت
e9480165e1
2فایلهای تغییر یافته به همراه15 افزوده شده و 0 حذف شده
  1. 13 0
      panda/src/parametrics/nurbsCurve.cxx
  2. 2 0
      panda/src/parametrics/nurbsCurve.h

+ 13 - 0
panda/src/parametrics/nurbsCurve.cxx

@@ -88,6 +88,19 @@ NurbsCurve::
 ~NurbsCurve() {
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: NurbsCurve::make_copy
+//       Access: Public, Virtual
+//  Description: Returns a newly-allocated PandaNode that is a shallow
+//               copy of this one.  It will be a different pointer,
+//               but its internal data may or may not be shared with
+//               that of the original PandaNode.  No children will be
+//               copied.
+////////////////////////////////////////////////////////////////////
+PandaNode *NurbsCurve::
+make_copy() const {
+  return new NurbsCurve(*this);
+}
 
 ////////////////////////////////////////////////////////////////////
 //     Function: NurbsCurve::set_order

+ 2 - 0
panda/src/parametrics/nurbsCurve.h

@@ -59,6 +59,8 @@ PUBLISHED:
   virtual ~NurbsCurve();
 
 public:
+  virtual PandaNode *make_copy() const;
+
   // We don't need to re-publish these, since they're all published
   // from NurbsCurveInterface.
   virtual void set_order(int order);