12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- #pragma once
- #include "Components/SceneComponent.h"
- #include "PhysicsEngine/BodySetup.h"
- #include "AkInclude.h"
- namespace AkComponentHelpers
- {
-
- AKAUDIO_API bool HasSimpleCollisionGeometry(const UBodySetup* bodySetup);
-
-
- AKAUDIO_API bool EncompassesPoint(UPrimitiveComponent& Primitive, FVector Point, float SphereRadius = 0.f, float* OutDistanceToPoint = nullptr);
-
-
- AKAUDIO_API float UnrealUnitsPerMeter(const UActorComponent* component);
-
- AKAUDIO_API float UnrealUnitsPerSquaredMeter(const UActorComponent* component);
-
- AKAUDIO_API float UnrealUnitsPerCubicMeter(const UActorComponent* component);
-
- template<class COMPONENT_TYPE>
- AKAUDIO_API COMPONENT_TYPE* GetChildComponentOfType(const USceneComponent& ParentComponent)
- {
- const TArray<USceneComponent*> parentChildren = ParentComponent.GetAttachChildren();
- for (auto* const child : parentChildren)
- {
- if (child && child->IsA<COMPONENT_TYPE>())
- {
- return Cast<COMPONENT_TYPE>(child);
- }
- }
- return nullptr;
- }
-
- AKAUDIO_API bool IsInGameWorld(const UActorComponent* InComponent);
-
- AKAUDIO_API void GetPrimitiveTransformAndExtent(const UPrimitiveComponent& Primitive, AkWorldTransform& transform, AkExtent& extent);
- AKAUDIO_API void GetPrimitiveUpAndFront(const UPrimitiveComponent& Primitive, AkVector& Up, AkVector& Front);
-
- AKAUDIO_API bool DoesMovementRecenterChild(USceneComponent* child, USceneComponent* parent, const FVector& Delta);
-
-
- AKAUDIO_API void LogAttachmentError(const UActorComponent* child, const UActorComponent* parent, const FString& requiredClassName);
-
-
- AKAUDIO_API void LogSimpleGeometryWarning(const UPrimitiveComponent* parent, const UActorComponent* child);
- #if WITH_EDITOR
-
- AKAUDIO_API bool IsGameWorldBlueprintComponent(const UActorComponent* InComponent);
-
- AKAUDIO_API bool ShouldDeferBeginPlay(const UActorComponent* InComponent);
- #endif
- }
|