Show / Hide Table of Contents

    UUxtMathUtilsFunctionLibrary

    Library of utility functions for UX Tools.

    class UUxtMathUtilsFunctionLibrary;
    

    Header

    #include <Utils/UxtMathUtilsFunctionLibrary.h>

    Inheritance

    Inherits from UBlueprintFunctionLibrary

    Public Types

    Name
    typedef bool(*)(const USceneComponent *Component) HierarchyBoundsFilter

    Public Functions

    Name
    FRotator GetRotationBetweenVectors(const FVector & Vector1, const FVector & Vector2)
    void SwingTwistDecompose(const FRotator & Rotation, const FVector & TwistAxis, FRotator & Swing, FRotator & Twist)
    FTransform RotateAboutPivotPoint(const FTransform & Transform, const FRotator & Rotation, const FVector & Pivot)
    FBoxSphereBounds CalculateHierarchyBounds(USceneComponent * Component, HierarchyBoundsFilter Filter =nullptr)
    FBoxSphereBounds CalculateHierarchyBounds(USceneComponent * Component, const FTransform & LocalToTarget, HierarchyBoundsFilter Filter =nullptr)
    FBox CalculateNestedBoundsInGivenSpace(const USceneComponent *const Root, const FTransform & WorldToCalcSpace, bool bNonColliding, TArrayView< const UPrimitiveComponent *const > Ignore ={})

    Public Types Documentation

    typedef HierarchyBoundsFilter

    typedef bool(* UUxtMathUtilsFunctionLibrary::HierarchyBoundsFilter) (const USceneComponent *Component);
    

    Function pointer which takes a scene component and returns true if the component should be considered for hierarchy bounds calculations.

    Public Functions Documentation

    function GetRotationBetweenVectors

    static FRotator GetRotationBetweenVectors(
        const FVector & Vector1,
        const FVector & Vector2
    )
    

    Compute minimal rotation between vectors.

    function SwingTwistDecompose

    static void SwingTwistDecompose(
        const FRotator & Rotation,
        const FVector & TwistAxis,
        FRotator & Swing,
        FRotator & Twist
    )
    

    Decompose a rotation into swing and twist components. The twist component describes a rotation around the given twist axis, while the swing contains the remaining rotation.

    function RotateAboutPivotPoint

    static FTransform RotateAboutPivotPoint(
        const FTransform & Transform,
        const FRotator & Rotation,
        const FVector & Pivot
    )
    

    Apply rotation about a pivot point to the transform.

    function CalculateHierarchyBounds

    static inline FBoxSphereBounds CalculateHierarchyBounds(
        USceneComponent * Component,
        HierarchyBoundsFilter Filter =nullptr
    )
    

    Calculates the composite bounding box and bounding sphere around a component and its children, the output is in the space of the component. The optional filter component can be used to ignore specific scene components.

    function CalculateHierarchyBounds

    static FBoxSphereBounds CalculateHierarchyBounds(
        USceneComponent * Component,
        const FTransform & LocalToTarget,
        HierarchyBoundsFilter Filter =nullptr
    )
    

    Calculates the composite bounding box and bounding sphere around a component and its children. The optional filter component can be used to ignore specific scene components.

    function CalculateNestedBoundsInGivenSpace

    static FBox CalculateNestedBoundsInGivenSpace(
        const USceneComponent *const Root,
        const FTransform & WorldToCalcSpace,
        bool bNonColliding,
        TArrayView< const UPrimitiveComponent *const > Ignore ={}
    )
    

    Calculates the bounds of all applicable components under Root, except those included in Ignore.


    Updated on 19 August 2021 at 17:42:51 Coordinated Universal Time

    • Improve this Doc
    Back to top Generated by DocFX