Skip to content

FBoxSpaceDimension

A struct representing a single dimension of a box (continuous) space.

A box space dimension defines a continuous range with upper and lower bounds for one dimension of a multi-dimensional continuous space. It provides utilities for normalizing and rescaling values within the bounds.

struct FBoxSpaceDimension

Methods

FBoxSpaceDimension

FBoxSpaceDimension()

Constructs a BoxSpaceDimension with default bounds [-1, 1].


FBoxSpaceDimension

FBoxSpaceDimension(float Low, float High)

Constructs a BoxSpaceDimension with specific bounds.

Parameters

  • Low (float)

  • High (float)


RescaleValue

float RescaleValue(float Value) const

Rescales a normalized [0, 1] value to this dimension’s bounds.

Parameters

  • Value (float)

RescaleValue

float RescaleValue(float Value, float OldHigh, float OldLow) const

Rescales a value from another dimension’s bounds to this dimension’s bounds.

Parameters

  • Value (float)

  • OldHigh (float)

  • OldLow (float)


NormalizeValue

float NormalizeValue(float Value) const

Normalizes a value from this dimension’s bounds to [0, 1].

Parameters

  • Value (float)

operator

bool operator==(const FBoxSpaceDimension &Other) const

Checks if two BoxSpaceDimensions are equal.

Parameters

  • Other (const FBoxSpaceDimension)

ZeroOneUnitDimension

static inline FBoxSpaceDimension ZeroOneUnitDimension()

Creates a unit dimension in the range [0, 1].


CenteredUnitDimension

static inline FBoxSpaceDimension CenteredUnitDimension()

Creates a unit dimension centered at 0 in the range [-0.5, 0.5].

Attributes

High

float High = 1.0

The upper bound for this dimension.


Low

float Low = -1.0

The lower bound for this dimension.

Source: Source/Schola/Public/Spaces/BoxSpaceDimension.h