Skip to main content

OrientedBox

Base:
UBlueprintFunctionLibrary
Type:
UNOrientedBoxPickerLibrary / FNOrientedBoxPicker
Header File:
NexusActorPools/Public/NOrientedBoxPickerLibrary.h

OrientedBox: Next Density

Provides various functions for generating points inside or on the surface of the FOrientedBox using different random generation strategies (deterministic, non-deterministic, seeded).

The UNOrientedBoxPickerLibrary wraps the native FNOrientedBoxPicker functionality in a Blueprint friendly manner. Should you be wanting to utilize a picker in native code it is best to directly reference FNOrientedBoxPicker directly to avoid the abstraction layer as it has a similar API.

Methods​

Next Point​

OrientedBox: Next OrientedBox: Next Projected

Gets the next deterministic point inside or on an FOrientedBox.

info

Uses FNRandom::Deterministic to ensure reproducible results.

Random Point​

OrientedBox: Random OrientedBox: Random Projected

Gets a random point inside or on an FOrientedBox.

info

Uses FNRandom::NonDeterministic to produce pseudo-random results.

One-Shot Point​

OrientedBox: One-Shot OrientedBox: One-Shot Projected

Gets a random point inside or on an FOrientedBox using a one-shot seed.

Tracked Point​

OrientedBox: Tracked OrientedBox: Tracked Projected

Gets a random point inside or on an FOrientedBox using a tracked seed. The seed altered for each Count.

FNOrientedBoxPickerParams​

warning

It is important to be aware of the performance penalty when using MinimumDimensions. It is only included for special use cases where absolutely necessary. It can also create biased results when selecting points as it has to create a series of FBox first which can be used; their shapes and sizes are directly related to the inner dimensions.

Base​

ParameterTypeDescriptionDefault
CountintThe number of points to generate in a single pass.1
CachedWorldTObjectPtr<UWorld>The world for line tracing and drawing.
ProjectionModeENPickerProjectionModeShould the point be projected somewhere?ENPickerProjectionMode::None
ProjectionFVectorDirection and distance for the line trace.FVector(0,0,-500.f)
CollisionChannelTEnumAsByte<ECollisionChannel>The collision channel to use for tracing.ECC_WorldStatic

OrientedBox​

ParameterTypeDescriptionDefault
OriginFVectorThe center point when attempting to generate new points.FVector::ZeroVector
MinimumDimensionsFVectorThe minimum dimensions to use when generating a point.FVector::ZeroVector
MaximumDimensionsFVectorThe maximum dimensions to use when generating a point.FVector::OneVector
RotationFRotatorhe rotation of the OrientedBox.FRotator::ZeroRotator