Skip to main content

Rectangle

Base:
UBlueprintFunctionLibrary
Type:
UNRectanglePickerLibrary / FNRectanglePicker
Header File:
NexusActorPools/Public/NRectanglePickerLibrary.h

Provides various functions for generating points the plane of a rectangle using different random generation strategies (deterministic, non-deterministic, seeded).

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

Methods​

tip

There are Simple variants of all of these methods which removes the inner exclusion when not needed as a minor optimization.

Next Point (IO)​

Rectangle: Next Point

Generates a deterministic point [i]nside or [o]n the boundary of a rectangle.

info

Uses FNRandom::Deterministic to ensure reproducible results.

Next Point Projected (IO)​

Rectangle: Next Point Projected

Generates a deterministic point [i]nside or [o]n the boundary of a rectangle, then projects it onto a surface in the world.

info

Uses FNRandom::Deterministic to ensure reproducible results.

Random Point (IO)​

Rectangle: Random Point

Generates a random point [i]nside or [o]n the boundary of a rectangle.

Random Point Projected (IO)​

Rectangle: Random Point Projected

Generates a random point [i]nside or [o]n the boundary of a rectangle, then projects it onto a surface in the world.

Random One-Shot Point (IO)​

Rectangle: Random One-Shot Point

Generates a random point [i]nside or [o]n the boundary of a rectangle using a provided seed.

Random One-Shot Point Projected (IO)​

Rectangle: Random One-Shot Point Projected

Generates a random point [i]nside or [o]n the boundary of a rectangle using a provided seed, then projects it onto a surface in the world.

Random Tracked Point (IO)​

Rectangle: Random Tracked Point

Generates a random point [i]nside or [o]n the boundary of a rectangle using a tracked seed.

Random Tracked Point Projected (IO)​

Rectangle: Random Tracked Point Projected

Generates a random point [i]nside or [o]n the boundary of a rectangle using simple dimensions and a tracked seed, then projects it onto a surface in the world.

Parameters​

VariantParameterTypeDescriptionDefault
BaseOriginFVector&The center world point of the rectangle.
BaseMinimumDimensionsFVector2DThe minimum dimensions of the rectangle (X = width, Y = height).
BaseMaximumDimensionsFVector2DThe maximum dimensions of the rectangle (X = width, Y = height).
SimpleDimensionsFVector2DThe dimensions of the rectangle.
ProjectedWorldContextObjectUObject*Object that provides access to the world, usally auto-filled in Blueprint.WorldContext
ProjectedProjectionFVectorDirection and distance for the line trace.FVector(0,0,-500.f)
ProjectedCollisionChannelECollisionChannelThe collision channel to use for tracing.ECC_WorldStatic
TrackedSeedint32&The seed to be used when generating, and altered for determinism.
One-ShotSeedint32The throw-away seed used when generating.