private void shadowTest(VectorInt3 offset, VoxelShadowHandler handler, byte index) { var voxs = this.real_; if (handler._realSpot) { handler.realAdd(index); } VectorInt3 key = offset; if (voxs.ContainsKey(key)) { VoxelShadowHandler o = voxs[key]; if (o._realSpot) { handler.realAdd(index); } } if (handler._ghostSpot) { if (!voxs.ContainsKey(key)) { handler.ghostAdd(index); } else { VoxelShadowHandler o = voxs [key]; if (!o._ghostSpot) { handler.ghostAdd(index); } } } else { handler.ghostAdd(index); } }
private void shadowTest(VectorInt3 offset, VoxelShadowHandler handler, byte index){ var voxs = this.real_; if (handler._realSpot) { handler.realAdd (index); } VectorInt3 key = offset; if (voxs.ContainsKey (key)) { VoxelShadowHandler o = voxs[key]; if(o._realSpot){ handler.realAdd (index); } } if (handler._ghostSpot) { if (!voxs.ContainsKey (key)) { handler.ghostAdd (index); } else { VoxelShadowHandler o = voxs [key]; if (!o._ghostSpot) { handler.ghostAdd (index); } } } else { handler.ghostAdd (index); } }