David Rose 18 лет назад
Родитель
Сommit
e34ee0d81b

+ 20 - 0
panda/src/mathutil/boundingPlane.cxx

@@ -203,3 +203,23 @@ contains_box(const BoundingBox *box) const {
 
   return result;
 }
+
+////////////////////////////////////////////////////////////////////
+//     Function: BoundingPlane::contains_line
+//       Access: Public, Virtual
+//  Description: 
+////////////////////////////////////////////////////////////////////
+int BoundingPlane::
+contains_line(const BoundingLine *line) const {
+  return IF_possible;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: BoundingPlane::contains_plane
+//       Access: Public, Virtual
+//  Description: 
+////////////////////////////////////////////////////////////////////
+int BoundingPlane::
+contains_plane(const BoundingPlane *plane) const {
+  return IF_possible;
+}

+ 2 - 0
panda/src/mathutil/boundingPlane.h

@@ -60,6 +60,8 @@ protected:
 
   virtual int contains_sphere(const BoundingSphere *sphere) const;
   virtual int contains_box(const BoundingBox *box) const;
+  virtual int contains_line(const BoundingLine *line) const;
+  virtual int contains_plane(const BoundingPlane *plane) const;
 
 private:
   Planef _plane;

+ 4 - 0
panda/src/mathutil/boundingSphere.cxx

@@ -448,6 +448,10 @@ around_finite(const BoundingVolume **first,
   for (++p; p != last; ++p) {
     nassertr(!(*p)->is_infinite(), false);
     if (!(*p)->is_empty()) {
+      if (!(*p)->is_of_type(FiniteBoundingVolume::get_class_type())) {
+        set_infinite();
+        return true;
+      }
       const FiniteBoundingVolume *vol = DCAST(FiniteBoundingVolume, *p);
       LPoint3f min1 = vol->get_min();
       LPoint3f max1 = vol->get_max();