#include <SceneVisualizerBase.h>
Box inet::visualizer::SceneVisualizerBase::getPlaygroundBounds |
( |
| ) |
|
|
protectedvirtual |
39 auto physicalEnvironment = getModuleFromPar<IPhysicalEnvironment>(par(
"physicalEnvironmentModule"),
this,
false);
42 if (physicalEnvironment ==
nullptr) {
44 auto width = atof(displayString.getTagArg(
"bgb", 0));
45 auto height = atof(displayString.getTagArg(
"bgb", 1));
46 playgroundMin = Coord(0.0, 0.0, 0.0);
47 playgroundMax = Coord(width, height, 0.0);
50 playgroundMin = physicalEnvironment->getSpaceMin();
51 playgroundMax = physicalEnvironment->getSpaceMax();
53 for (
int id = 0;
id <= getSimulation()->getLastComponentId();
id++) {
54 auto mobility =
dynamic_cast<IMobility *
>(getSimulation()->getModule(
id));
55 if (mobility !=
nullptr) {
56 playgroundMin = playgroundMin.min(mobility->getConstraintAreaMin());
57 playgroundMax = playgroundMax.max(mobility->getConstraintAreaMax());
60 return Box(playgroundMin, playgroundMax);
cModule * visualizerTargetModule
Definition: VisualizerBase.h:31
static const Coord ZERO
Definition: Coord.h:41
void inet::visualizer::SceneVisualizerBase::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
The documentation for this class was generated from the following files: