Пример #1
0
 // Check axial collision
 public bool CollidesWith(Cube cube) =>
 xCoordinate.Collides(cube.xCoordinate) ||
 yCoordinate.Collides(cube.yCoordinate) ||
 zCoordinate.Collides(cube.zCoordinate);
Пример #2
0
 // Check the intersection points to get volume
 public double IntersectionVolumeWith(Cube cube) =>
 xCoordinate.Overlap(cube.xCoordinate)
 * yCoordinate.Overlap(cube.yCoordinate)
 * zCoordinate.Overlap(cube.zCoordinate);