Skip to content

Add support for Hydro/Aero module#167

Open
Jiafeng-Xu-Aker wants to merge 2 commits into
Algoryx:mainfrom
Jiafeng-Xu-Aker:feature/aero-hydrodynamics
Open

Add support for Hydro/Aero module#167
Jiafeng-Xu-Aker wants to merge 2 commits into
Algoryx:mainfrom
Jiafeng-Xu-Aker:feature/aero-hydrodynamics

Conversation

@Jiafeng-Xu-Aker

Copy link
Copy Markdown

Add support for Hydro/Aero module

This PR integrates Hydrodynamics/Aerodynamics module into AGXUnreal.

New classes

AGXUnreal (gameplay layer)

  • UAGX_DynamicWaterComponent — Scene component representing a dynamic water body. Exposes water surface height, density, and velocity queries, and wraps a native agxModel::DynamicWater via FDynamicWaterBarrier.
  • UAGX_WindAndWaterControllerSubsystemBase — Abstract UGameInstanceSubsystem that holds the agxModel::WindAndWaterController as a singleton. Provides APIs to register water geometries, enable/disable aero- and hydrodynamics on shapes and wires, and update per-shape wind/water parameters at runtime.
  • UAGX_WindAndWaterAwareShapeMaterial — Extends UAGX_ShapeMaterial with FAGX_Ext_WindAndWaterParameters structs for both hydrodynamic and aerodynamic coefficients (pressure drag, viscous drag, lift, buoyancy, shape tessellation). Adds a bIsWaterGeometry flag to mark a shape as water. If this special material is not used, normal material will not interact with water.

AGXUnrealBarrier (AGX Dynamics bridge layer)

  • FWindAndWaterControllerBarrier — Barrier wrapping agxModel::WindAndWaterController. Provides methods to add water geometries, set/get hydro and aero parameters on shapes and wires, and manage native lifecycle.
  • FWindAndWaterParametersBarrier — Barrier for reading and writing individual wind/water parameter coefficients on a shape or wire.
  • FDynamicWaterBarrier — Barrier for agxModel::DynamicWater, exposing surface height, density, and flow velocity queries.
  • EWindAndWaterParametersCoefficient / EWindAndWaterShapeTessellation — Blueprint-exposed enums for coefficient type and tessellation level of non-mesh shapes (sphere, capsule, cylinder).

AGXUnrealEditor

  • UAGX_WindAndWaterAwareShapeMaterialAssetFactory and AGX_WindAndWaterAwareShapeMaterialAssetTypeActions — Editor factory and type actions for creating UAGX_WindAndWaterAwareShapeMaterial assets from the Content Browser.

Other changes

  • AGX_ShapeComponent: registers shapes with the WindAndWaterController subsystem on begin play when a WindAndWaterAwareShapeMaterial is assigned. Ideally ShapeComponent and WaterModule should be decoupled.
  • AGX_ShapeMaterial: minor fix to CopyShapeMaterialProperties for the extension of new material type.
  • SimulationBarrier: exposes the native simulation reference needed to add the WindAndWaterController to the AGX simulation.
  • AGXBarrierFactories: adds factory support for the new barrier types.
  • AGXRefs.h / AGXTypeConversions.h: adds native ref structs and type conversion helpers for the new AGX model types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant