use of com.builtbroken.mc.imp.transform.region.Cube in project Engine by VoltzEngine-Project.
the class RadioMap method updateSenderCache.
protected void updateSenderCache(IRadioWaveReceiver receiver, Cube range) {
if (range != null) {
//Update sender cache
for (IRadioWaveSender sender : sender_to_receivers_cache.keySet()) {
Cube senderRange = sender.getRadioSenderRange();
if (senderRange.doesOverlap(range)) {
List<IRadioWaveReceiver> receivers = sender_to_receivers_cache.get(sender);
if (receivers == null) {
receivers = new ArrayList();
}
if (!receivers.contains(receiver)) {
receivers.add(receiver);
}
sender_to_receivers_cache.put(sender, receivers);
}
}
}
}
Aggregations