Skip to content

Struct FBoxSpaceDimension

Struct FBoxSpaceDimension

  • Defined in File BoxSpaceDimension.h
struct FBoxSpaceDimension

Source: Source/Schola/Public/Common/Spaces/BoxSpaceDimension.h 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.


Public Functions

SymbolDetails
FBoxSpaceDimensionConstructs a BoxSpaceDimension with default bounds [-1, 1].
FBoxSpaceDimensionConstructs a BoxSpaceDimension with specific bounds.
RescaleValueRescales a normalized [0, 1] value to this dimension’s bounds.
RescaleValueRescales a value from another dimension’s bounds to this dimension’s bounds.
NormalizeValueNormalizes a value from this dimension’s bounds to [0, 1].
operator==Checks if two BoxSpaceDimensions are equal.

FBoxSpaceDimension

FBoxSpaceDimension()

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

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

Implementation: Source/Schola/Private/Common/Spaces/BoxSpaceDimension.cpp

FBoxSpaceDimension

FBoxSpaceDimension(float Low, float High)

Constructs a BoxSpaceDimension with specific bounds.

Parameters

  • Low – [in] The lower bound.

  • High – [in] The upper bound.

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

Implementation: Source/Schola/Private/Common/Spaces/BoxSpaceDimension.cpp

RescaleValue

float RescaleValue(float Value) const

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

Parameters

Value – [in] The normalized value to rescale.

Returns:

The rescaled value within this dimension’s bounds.

#DirectionNameTypeDescription
1ValuefloatThe normalized value to rescale.

Attributes: const

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

Implementation: Source/Schola/Private/Common/Spaces/BoxSpaceDimension.cpp

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 – [in] The value to rescale.

  • OldHigh – [in] The upper bound of the source dimension.

  • OldLow – [in] The lower bound of the source dimension.

Returns:

The rescaled value within this dimension’s bounds.

#DirectionNameTypeDescription
1ValuefloatThe normalized value to rescale.

Attributes: const

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

Implementation: Source/Schola/Private/Common/Spaces/BoxSpaceDimension.cpp

NormalizeValue

float NormalizeValue(float Value) const

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

Parameters

Value – [in] The value to normalize.

Returns:

The normalized value in the range [0, 1].

#DirectionNameTypeDescription
1ValuefloatThe value to normalize.

Attributes: const

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

Implementation: Source/Schola/Private/Common/Spaces/BoxSpaceDimension.cpp


operator==

bool operator==(const FBoxSpaceDimension &Other) const

Checks if two BoxSpaceDimensions are equal.

Parameters

Other – [in] The dimension to compare to.

Returns:

True if both dimensions have the same bounds, false otherwise.

#DirectionNameTypeDescription
1Otherconst FBoxSpaceDimension &The dimension to compare to.

Attributes: const

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

Implementation: Source/Schola/Private/Common/Spaces/BoxSpaceDimension.cpp


Public Members

SymbolDetails
HighThe upper bound for this dimension.
LowThe lower bound for this dimension.

High

float High = 1.0

The upper bound for this dimension.


Low

float Low = -1.0

The lower bound for this dimension.


Public Static Functions

SymbolDetails
ZeroOneUnitDimensionCreates a unit dimension in the range [0, 1].
CenteredUnitDimensionCreates a unit dimension centered at 0 in the range [-0.5, 0.5].

ZeroOneUnitDimension

static inline FBoxSpaceDimension ZeroOneUnitDimension()

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

Returns:

A BoxSpaceDimension with bounds [0, 1].

Attributes: inline, static

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

CenteredUnitDimension

static inline FBoxSpaceDimension CenteredUnitDimension()

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

Returns:

A BoxSpaceDimension with bounds [-0.5, 0.5].

Attributes: inline, static

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