Navigation
API > API/Plugins > API/Plugins/GameplayCameras
Effective coordinates for a rectangular screen-space zone. Unlike FCameraFramingZone, whose values can mean anything (margins, offsets, etc) this struct is expected to store actual screen coordinates in 0..1 UI space.
| Name | FFramingZone |
| Type | struct |
| Header File | /Engine/Plugins/Cameras/GameplayCameras/Source/GameplayCameras/Public/Math/CameraFramingZoneMath.h |
| Include Path | #include "Math/CameraFramingZoneMath.h" |
Syntax
struct FFramingZone
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FFramingZone() |
Builds an empty framing zone. | Math/CameraFramingZoneMath.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BottomBound | double | Math/CameraFramingZoneMath.h | ||
| LeftBound | double | Math/CameraFramingZoneMath.h | ||
| RightBound | double | Math/CameraFramingZoneMath.h | ||
| TopBound | double | Math/CameraFramingZoneMath.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Add
(
const FFramingZone& Other |
Expands this framing zone to include the other framing zone. | Math/CameraFramingZoneMath.h | |
FVector2d Center() |
Gets the center of the framing zone. | Math/CameraFramingZoneMath.h | |
void ClampBounds
(
const FVector2d& MustContain |
Makes sure all the bounds have valid values between 0 and 1, and that the enclosed rectangle contains the given target point. | Math/CameraFramingZoneMath.h | |
void ClampBounds () |
Makes sure all the bounds have valid values between 0 and 1. | Math/CameraFramingZoneMath.h | |
void ClampBounds
(
const FFramingZone& MustContain |
Makes sure all the bounds have valid values between 0 and 1, and that the enclosed rectangle contains the given inner rectangle. | Math/CameraFramingZoneMath.h | |
void ClampBounds
(
const FVector2d& MustContain, |
Makes sure all the bounds have valid values between 0 and 1, and that the enclosed rectangle contains the given target point, with a uniform margin. | Math/CameraFramingZoneMath.h | |
FVector2d ComputeClosestIntersection
(
const FVector2d& Origin, |
Computes intersections between a line and the zone's box, and returns the one closest to the line's origin point. | Math/CameraFramingZoneMath.h | |
bool Contains
(
const FVector2d& Point |
Checks whether the given point (in 0..1 UI space) is inside this zone. | Math/CameraFramingZoneMath.h | |
FVector2d GetCanvasPosition
(
const FVector2d& CanvasSize |
Gets the coordinates of the top-left corner of the zone, in 0..Width/Height canvas units. | Math/CameraFramingZoneMath.h | |
FVector2d GetCanvasSize
(
const FVector2d& CanvasSize |
Gets the size of the zone, in 0..Width/Height canvas units. | Math/CameraFramingZoneMath.h | |
FVector4d GetNormalizedBounds() |
Gets the inner margins of this zone compared to the screen's center. | Math/CameraFramingZoneMath.h | |
double Height() |
Gets the height of the framing zone. | Math/CameraFramingZoneMath.h | |
bool IsValid() |
Returns whether this framing zone is well-formed (bounds in 0..1 UI space, with left/top bounds lesser than or equal to right/bottom bounds). | Math/CameraFramingZoneMath.h | |
void Serialize
(
FArchive& Ar |
Math/CameraFramingZoneMath.h | ||
double Width() |
Gets the width of the framing zone. | Math/CameraFramingZoneMath.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FFramingZone FromPoints
(
TConstArrayView< FVector2d > ScreenPoints |
Build a framing zone that encompasses all the given points (in 0..1 UI space). | Math/CameraFramingZoneMath.h | |
static FFramingZone FromRelativeMargins
(
const FVector2d& ScreenLocation, |
Build a framing zone from a set of margins relative to a screen location. | Math/CameraFramingZoneMath.h | |
static FFramingZone FromScreenMargins
(
const FCameraFramingZone& Margins |
Build a framing zone from a set of margins relative to the screen edge. | Math/CameraFramingZoneMath.h | |
static double GetNormalizedBound
(
double Bound |
Math/CameraFramingZoneMath.h |