29. Plugin anatomy
The plugin consists of the following modules:
- AGXUnreal
The main part of the plugin. This is where all the new classes that an Unreal project can create and interact with are provided.
- AGXUnrealEditor
Provides editor-specific functionality such as detail specializations, new tool modes, and viewport interaction for point or line creation. This module is not included when exporting an application from the Unreal Editor.
- AGXUnrealBarrier
A compilation projection layer that insulates the Unreal subclasses in the AGXUnreal module from the AGX Dynamics headers. This is required because AGX Dynamics require RTTI=true and the Unreal classes require RTTI=false. This is a module that builds with RTTI=true, so it can use AGX Dynamics, but none of this is exposed in the public header files. Instead it provides wrapper classes, such as RigidBodyBarrier, that mirrors the agx::RigidBody API and uses the pointer-to-implementation idiom to achieve the insulation.
- AGXDynamicsLibrary
Not an actual module as it doesn’t contain any compiled source code. Instead this module describe the AGX Dynamics library so that AGXUnrealBarrier can depend on it and thus be informed about include paths and library linking requirements.