#include <GridObjectCache.h>
◆ GridObjectCache()
| inet::physicalenvironment::GridObjectCache::GridObjectCache |
( |
| ) |
|
◆ ~GridObjectCache()
| inet::physicalenvironment::GridObjectCache::~GridObjectCache |
( |
| ) |
|
|
virtual |
◆ initialize()
| void inet::physicalenvironment::GridObjectCache::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
33 double cellSizeX = par(
"cellSizeX");
34 double cellSizeY = par(
"cellSizeY");
35 double cellSizeZ = par(
"cellSizeZ");
38 const Coord spaceSize = spaceMax - spaceMin;
39 if (std::isnan(cellSizeX))
40 cellSizeX = spaceSize.x / par(
"cellCountX").intValue();
41 if (std::isnan(cellSizeY))
42 cellSizeY = spaceSize.y / par(
"cellCountY").intValue();
43 if (std::isnan(cellSizeZ))
44 cellSizeZ = spaceSize.z / par(
"cellCountZ").intValue();
45 Coord voxelSizes(cellSizeX, cellSizeY, cellSizeZ);
46 grid =
new SpatialGrid(voxelSizes, spaceMin, spaceMax);
◆ insertObject()
| bool inet::physicalenvironment::GridObjectCache::insertObject |
( |
const IPhysicalObject * |
object | ) |
|
|
protectedvirtual |
54 Coord pos =
object->getPosition();
55 Coord boundingBoxSize =
object->getShape()->computeBoundingBoxSize();
57 grid->
insertObject(
dynamic_cast<const cObject *
>(
object), pos, boundingBoxSize);
Referenced by initialize().
◆ numInitStages()
| virtual int inet::physicalenvironment::GridObjectCache::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ visitObjects()
| void inet::physicalenvironment::GridObjectCache::visitObjects |
( |
const IVisitor * |
visitor, |
|
|
const LineSegment & |
lineSegment |
|
) |
| const |
|
overridevirtual |
◆ grid
| SpatialGrid* inet::physicalenvironment::GridObjectCache::grid |
|
protected |
◆ physicalEnvironment
The documentation for this class was generated from the following files: