public final class OTSNetworkAnimationUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static OTSNetwork |
clone(OTSNetwork network,
String newId,
SimulatorInterface.TimeDoubleUnit oldSimulator,
OTSSimulatorInterface newSimulator)
Clone the OTSNetwork, including animation.
|
static <T extends Locatable> |
cloneAnimation(Locatable oldSource,
T newSource,
SimulatorInterface.TimeDoubleUnit oldSimulator,
SimulatorInterface.TimeDoubleUnit newSimulator)
Clone all animation objects for the given class.
|
static void |
destroy(OTSNetwork network,
SimulatorInterface.TimeDoubleUnit simulator)
Remove all objects and animation in the network.
|
static void |
removeAnimation(Class<?> clazz,
SimulatorInterface.TimeDoubleUnit oldSimulator)
Remove all animation objects of the given class.
|
public static OTSNetwork clone(OTSNetwork network, String newId, SimulatorInterface.TimeDoubleUnit oldSimulator, OTSSimulatorInterface newSimulator) throws NetworkException
network - OTSNetwork; the network to clonenewId - String; the new id of the networkoldSimulator - SimulatorInterface.TimeDoubleUnit; the old simulator for this networknewSimulator - OTSSimulatorInterface; the new simulator for this networkNetworkException - in case the cloning failspublic static <T extends Locatable> void cloneAnimation(Locatable oldSource, T newSource, SimulatorInterface.TimeDoubleUnit oldSimulator, SimulatorInterface.TimeDoubleUnit newSimulator)
T - locatable typeoldSource - Locatable; the old source object that might have one or more animation objects attached to itnewSource - T; the new source object to attach the cloned animation objects tooldSimulator - SimulatorInterface.TimeDoubleUnit; the old simulator when the old objects can be foundnewSimulator - SimulatorInterface.TimeDoubleUnit; the new simulator where the new simulation objects need to be
registeredpublic static void destroy(OTSNetwork network, SimulatorInterface.TimeDoubleUnit simulator)
network - OTSNetwork; the network to destroysimulator - SimulatorInterface.TimeDoubleUnit; the simulator of the old networkpublic static void removeAnimation(Class<?> clazz, SimulatorInterface.TimeDoubleUnit oldSimulator)
clazz - Class<?>; the class to remove the animation objects foroldSimulator - SimulatorInterface.TimeDoubleUnit; the old simulatorCopyright © 2014–2019 Delft University of Technology. All rights reserved.