UUxtBoundsControlComponent
Manages a set of affordances that can be manipulated for changing the actor transform.
class UUxtBoundsControlComponent;
Header
#include <Controls/UxtBoundsControlComponent.h>
Inheritance
Inherits from UUxtManipulatorComponent, UActorComponent
Public Functions
Name | |
---|---|
UUxtBoundsControlComponent() | |
UUxtBoundsControlComponent(FVTableHelper & Helper) | |
~UUxtBoundsControlComponent() | |
AActor * | GetBoundsControlActor() const |
const TMap< UPrimitiveComponent *, FUxtAffordanceInstance > & | GetPrimitiveAffordanceMap() const |
bool | GetInitBoundsFromActor() const |
const FBox & | GetBounds() const |
UStaticMesh * | GetAffordanceKindMesh(EUxtAffordanceKind Kind) const |
void | ComputeBoundsFromComponents() |
UPrimitiveComponent * | GetAffordancePrimitive(const EUxtAffordancePlacement Placement) const |
Protected Functions
Public Attributes
Name | |
---|---|
UUxtBoundsControlConfig * | Config |
UStaticMesh * | CenterAffordanceMesh |
UStaticMesh * | FaceAffordanceMesh |
UStaticMesh * | EdgeAffordanceMesh |
UStaticMesh * | CornerAffordanceMesh |
UBoxComponent * | CollisionBox |
FName | CollisionProfile |
float | AffordanceVisibilityDistance |
float | AffordanceTransitionDuration |
FUxtBoundsControlManipulationStartedDelegate | OnManipulationStarted |
FUxtBoundsControlManipulationEndedDelegate | OnManipulationEnded |
Additional inherited members
Public Functions inherited from UUxtManipulatorComponent
Name | |
---|---|
bool | GetAutoDetectConstraints() const |
void | SetAutoDetectConstraints(bool bNewAutoDetectConstraints) |
const TArray< FComponentReference > & | GetSelectedConstraints() const |
void | AddConstraint(const FComponentReference & NewConstraint) |
void | RemoveConstraint(const FComponentReference & NewConstraint) |
bool | GetRelativeToInitialScale() const |
void | SetRelativeToInitialScale(const bool Value) |
float | GetMinScale() const |
void | SetMinScale(const float Value) |
float | GetMaxScale() const |
void | SetMaxScale(const float Value) |
Protected Functions inherited from UUxtManipulatorComponent
Name | |
---|---|
void | InitializeConstraints(USceneComponent * NewTargetComponent) |
void | ApplyConstraints(FTransform & Transform, EUxtTransformMode TransformMode, bool bIsOneHanded, bool bIsNear) const |
Public Functions Documentation
function UUxtBoundsControlComponent
UUxtBoundsControlComponent()
function UUxtBoundsControlComponent
UUxtBoundsControlComponent(
FVTableHelper & Helper
)
function ~UUxtBoundsControlComponent
~UUxtBoundsControlComponent()
function GetBoundsControlActor
AActor * GetBoundsControlActor() const
function GetPrimitiveAffordanceMap
const TMap< UPrimitiveComponent *, FUxtAffordanceInstance > & GetPrimitiveAffordanceMap() const
Get the map between the affordance actors and their information.
function GetInitBoundsFromActor
bool GetInitBoundsFromActor() const
function GetBounds
const FBox & GetBounds() const
function GetAffordanceKindMesh
UStaticMesh * GetAffordanceKindMesh(
EUxtAffordanceKind Kind
) const
Mesh for the given kind of affordance.
function ComputeBoundsFromComponents
void ComputeBoundsFromComponents()
Compute the bounding box based on the components of the bounding box actor.
function GetAffordancePrimitive
UPrimitiveComponent * GetAffordancePrimitive(
const EUxtAffordancePlacement Placement
) const
Protected Functions Documentation
function BeginPlay
virtual void BeginPlay() override
Reimplements: UUxtManipulatorComponent::BeginPlay
function EndPlay
virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason
) override
function TickComponent
virtual void TickComponent(
float DeltaTime,
ELevelTick TickType,
FActorComponentTickFunction * ThisTickFunction
) override
Reimplements: UUxtManipulatorComponent::TickComponent
function OnAffordanceEnterFarFocus
void OnAffordanceEnterFarFocus(
UUxtGrabTargetComponent * Grabbable,
UUxtFarPointerComponent * Pointer
)
Callback when an affordance is entering focus.
function OnAffordanceEnterGrabFocus
void OnAffordanceEnterGrabFocus(
UUxtGrabTargetComponent * Grabbable,
UUxtNearPointerComponent * Pointer
)
Callback when an affordance is entering focus.
function OnAffordanceExitFarFocus
void OnAffordanceExitFarFocus(
UUxtGrabTargetComponent * Grabbable,
UUxtFarPointerComponent * Pointer
)
Callback when an affordance is exiting focus.
function OnAffordanceExitGrabFocus
void OnAffordanceExitGrabFocus(
UUxtGrabTargetComponent * Grabbable,
UUxtNearPointerComponent * Pointer
)
Callback when an affordance is exiting focus.
function OnAffordanceBeginGrab
void OnAffordanceBeginGrab(
UUxtGrabTargetComponent * Grabbable,
FUxtGrabPointerData GrabPointer
)
Callback when an affordance is being grabbed.
function OnAffordanceUpdateGrab
void OnAffordanceUpdateGrab(
UUxtGrabTargetComponent * Grabbable,
FUxtGrabPointerData GrabPointer
)
Callback when an affordance is being grabbed.
function OnAffordanceEndGrab
void OnAffordanceEndGrab(
UUxtGrabTargetComponent * Grabbable,
FUxtGrabPointerData GrabPointer
)
Callback when an affordance is being released.
function OnExternalManipulationStarted
virtual void OnExternalManipulationStarted() override
function FindGrabPointer
const FUxtGrabPointerData * FindGrabPointer(
const FUxtAffordanceInstance * AffordanceInstance
)
Look up the grab pointer data for an affordance. Returns null if the affordance is not currently grabbed.
function TransformTarget
void TransformTarget(
const FUxtAffordanceConfig & Affordance,
const FUxtGrabPointerData & GrabPointer
) const
Modify the target based on the current affordance interaction
function CreateAffordances
void CreateAffordances()
Create the BoundsControlActor and all affordances described in the config.
function DestroyAffordances
void DestroyAffordances()
Destroy the BoundsControlActor and affordance instances.
function UpdateAffordanceTransforms
void UpdateAffordanceTransforms()
Update the world transforms of affordance actors to match the current bounding box.
function UpdateAffordanceAnimation
void UpdateAffordanceAnimation(
float DeltaTime
)
Update animated properties such as affordance highlights.
function IsAffordanceGrabbed
bool IsAffordanceGrabbed(
const FUxtAffordanceInstance * Affordance
) const
Returns true if the affordance instance is currently bing grabbed.
function GetRelativeBoxTransform
static bool GetRelativeBoxTransform(
const FBox & Box,
const FBox & RelativeTo,
FTransform & OutTransform
)
Compute the relative translation and scale between two boxes. Returns false if relative scale can not be computed.
Public Attributes Documentation
variable Config
UUxtBoundsControlConfig * Config;
Configuration of the bounds control affordances.
variable CenterAffordanceMesh
UStaticMesh * CenterAffordanceMesh;
Mesh used for a center affordance.
variable FaceAffordanceMesh
UStaticMesh * FaceAffordanceMesh;
Mesh used for a face affordances.
variable EdgeAffordanceMesh
UStaticMesh * EdgeAffordanceMesh;
Mesh used for a edge affordances.
variable CornerAffordanceMesh
UStaticMesh * CornerAffordanceMesh;
Mesh used for a corner affordances.
variable CollisionBox
UBoxComponent * CollisionBox;
Collision box that prevents pointer rays from passing through bounds control's box.
variable CollisionProfile
FName CollisionProfile = TEXT("UI");
The collision profile used by CollisionBox.
variable AffordanceVisibilityDistance
float AffordanceVisibilityDistance = 10.f;
Hand distance at which affordances become visible.
variable AffordanceTransitionDuration
float AffordanceTransitionDuration = 0.25f;
Duration of animated affordance transitions.
variable OnManipulationStarted
FUxtBoundsControlManipulationStartedDelegate OnManipulationStarted;
Event raised when a manipulation is started.
variable OnManipulationEnded
FUxtBoundsControlManipulationEndedDelegate OnManipulationEnded;
Event raised when a manipulation is ended.
Updated on 19 August 2021 at 17:42:51 Coordinated Universal Time