Class BoundRotation2D
Creates a randomly-generated orientation in 2D by uniformally sampling a scalar rotation angle
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA (maybe longer) description identifying the bean and perhaps its key parameters.randomOrientation
(RandomNumberGenerator randomNumberGenerator, Optional<Resolution> resolution) Generates a random orientation within the defined bounds.void
setRotationAngle
(Bound rotationAngle) Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
BoundRotation2D
public BoundRotation2D()
-
-
Method Details
-
randomOrientation
public Orientation randomOrientation(RandomNumberGenerator randomNumberGenerator, Optional<Resolution> resolution) Description copied from class:BoundRotation
Generates a random orientation within the defined bounds.- Specified by:
randomOrientation
in classBoundRotation
- Parameters:
randomNumberGenerator
- the random number generator to useresolution
- an optional resolution to consider when generating the orientation- Returns:
- a randomly generated
Orientation
within the defined bounds
-
describeBean
Description copied from class:AnchorBean
A (maybe longer) description identifying the bean and perhaps its key parameters.By default, it returns the same as
AnchorBean.getBeanName()
but beans can optionally override it- Overrides:
describeBean
in classAnchorBean<BoundRotation>
- Returns:
- either the short-name of the bean, or a longer description
-
getRotationAngle
-
setRotationAngle
-