Class DimensionsModifier
java.lang.Object
org.eclipse.mosaic.fed.application.ambassador.simulation.perception.errormodels.DimensionsModifier
- All Implemented Interfaces:
PerceptionModifier
Adjusts the dimensions of perceived
VehicleObject
s. Since the position
of vehicles is assumed to refer to their front bumper instead of bounding box center,
their position is adjusted accordingly when the length of the vehicle was changed.-
Constructor Summary
ConstructorsConstructorDescriptionConstructor forDimensionsModifier
using default values of 0.2 for the sigma value of the dimensionsDimensionsModifier
(RandomNumberGenerator rng, double lengthDeviation, double widthDeviation, double heightDeviation) Constructor forDimensionsModifier
given the sigma values for the gaussian distribution applied to different dimensions. -
Method Summary
Modifier and TypeMethodDescription<T extends SpatialObject<?>>
List<T>apply
(PerceptionModuleOwner owner, List<T> spatialObjects) Applies the implemented filter/modifier.
-
Constructor Details
-
DimensionsModifier
public DimensionsModifier(RandomNumberGenerator rng, double lengthDeviation, double widthDeviation, double heightDeviation) Constructor forDimensionsModifier
given the sigma values for the gaussian distribution applied to different dimensions.- Parameters:
rng
-RandomNumberGenerator
used to generate pseudo-random gaussian numberslengthDeviation
- sigma value for the lengthwidthDeviation
- sigma value for the widthheightDeviation
- sigma value for the height
-
DimensionsModifier
Constructor forDimensionsModifier
using default values of 0.2 for the sigma value of the dimensions- Parameters:
rng
-
-
-
Method Details
-
apply
public <T extends SpatialObject<?>> List<T> apply(PerceptionModuleOwner owner, List<T> spatialObjects) Description copied from interface:PerceptionModifier
Applies the implemented filter/modifier.- Specified by:
apply
in interfacePerceptionModifier
- Returns:
- the filtered/modified list
-