AkGeometryData.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. /*=============================================================================
  16. AkGeometryData.h:
  17. =============================================================================*/
  18. #pragma once
  19. #include "AkInclude.h"
  20. #include "AkAcousticTexture.h"
  21. #include "AkGeometryData.generated.h"
  22. class UPhysicalMaterial;
  23. USTRUCT()
  24. struct FAkAcousticSurface
  25. {
  26. GENERATED_BODY()
  27. UPROPERTY()
  28. uint32 Texture = AK_INVALID_UNIQUE_ID;
  29. UPROPERTY(DisplayName = "Transmission Loss")
  30. float Occlusion = .0f;
  31. UPROPERTY()
  32. FString Name;
  33. };
  34. USTRUCT()
  35. struct FAkTriangle
  36. {
  37. GENERATED_BODY()
  38. UPROPERTY()
  39. uint16 Point0 = 0;
  40. UPROPERTY()
  41. uint16 Point1 = 0;
  42. UPROPERTY()
  43. uint16 Point2 = 0;
  44. UPROPERTY()
  45. uint16 Surface = 0;
  46. };
  47. USTRUCT()
  48. struct FAkGeometryData
  49. {
  50. GENERATED_BODY()
  51. void Clear()
  52. {
  53. Vertices.Empty();
  54. Surfaces.Empty();
  55. Triangles.Empty();
  56. ToOverrideAcousticTexture.Empty();
  57. ToOverrideOcclusion.Empty();
  58. }
  59. UPROPERTY()
  60. TArray<FVector> Vertices;
  61. UPROPERTY()
  62. TArray<FAkAcousticSurface> Surfaces;
  63. UPROPERTY()
  64. TArray<FAkTriangle> Triangles;
  65. UPROPERTY()
  66. TArray<UPhysicalMaterial*> ToOverrideAcousticTexture;
  67. UPROPERTY(DisplayName = "To Override Transmission Loss")
  68. TArray<UPhysicalMaterial*> ToOverrideOcclusion;
  69. void AddBox(AkSurfIdx surfIdx, FVector center, FVector extent, FRotator rotation);
  70. void AddSphere(AkSurfIdx surfIdx, const FVector& Center, const float Radius, int32 NumSides, int32 NumRings);
  71. void AddCapsule(AkSurfIdx surfIdx, const FVector& Origin, const FVector& XAxis, const FVector& YAxis, const FVector& ZAxis, float Radius, float HalfHeight, int32 NumSides);
  72. };