Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 protected void recalcBoundingVolume()
 {
     if (privateShapeType == EnumShapeType.SPHERE)
     {
         cachedKDop = KDopUtilities.makeAabbKDopByCenterAndRadius(privateCenter, dimensions[0]);
     }
     else
     {
         throw new NotImplementedException("Shape not implemented");
     }
 }