Add support for Hydro/Aero module#167
Open
Jiafeng-Xu-Aker wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 nativeagxModel::DynamicWaterviaFDynamicWaterBarrier.UAGX_WindAndWaterControllerSubsystemBase— AbstractUGameInstanceSubsystemthat holds theagxModel::WindAndWaterControlleras 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— ExtendsUAGX_ShapeMaterialwithFAGX_Ext_WindAndWaterParametersstructs for both hydrodynamic and aerodynamic coefficients (pressure drag, viscous drag, lift, buoyancy, shape tessellation). Adds abIsWaterGeometryflag 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 wrappingagxModel::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 foragxModel::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_WindAndWaterAwareShapeMaterialAssetFactoryandAGX_WindAndWaterAwareShapeMaterialAssetTypeActions— Editor factory and type actions for creatingUAGX_WindAndWaterAwareShapeMaterialassets from the Content Browser.Other changes
AGX_ShapeComponent: registers shapes with theWindAndWaterControllersubsystem on begin play when aWindAndWaterAwareShapeMaterialis assigned. Ideally ShapeComponent and WaterModule should be decoupled.AGX_ShapeMaterial: minor fix toCopyShapeMaterialPropertiesfor the extension of new material type.SimulationBarrier: exposes the native simulation reference needed to add theWindAndWaterControllerto 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.