public static ProximityDetector makeSphere(SpatialVectorDouble center, double radius, bool handleParticles = false) { ProximityDetector detector = new ProximityDetector(EnumShapeType.SPHERE, center, new SpatialVectorDouble(new double[] { radius })); detector.cachedKDop = KDopUtilities.makeAabbKDopByCenterAndRadius(center, radius); detector.handleParticles = handleParticles; return(detector); }
protected void recalcBoundingVolume() { if (privateShapeType == EnumShapeType.SPHERE) { cachedKDop = KDopUtilities.makeAabbKDopByCenterAndRadius(privateCenter, dimensions[0]); } else { throw new NotImplementedException("Shape not implemented"); } }