Open 3D Engine PhysX Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
PhysX::SystemComponent Class Reference

#include <SystemComponent.h>

Inherits AZ::Component, Physics::SystemRequestBus::Handler, PhysX::SystemRequestsBus::Handler, Physics::CollisionRequestBus::Handler, and AZ::TickBus::Handler.

Public Member Functions

 AZ_COMPONENT (SystemComponent, "{85F90819-4D9A-4A77-AB89-68035201F34B}")
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 
static void GetDependentServices (AZ::ComponentDescriptor::DependencyArrayType &dependent)
 

Protected Member Functions

 SystemComponent (const SystemComponent &)=delete
 
physx::PxConvexMesh * CreateConvexMesh (const void *vertices, AZ::u32 vertexNum, AZ::u32 vertexStride) override
 
physx::PxConvexMesh * CreateConvexMeshFromCooked (const void *cookedMeshData, AZ::u32 bufferSize) override
 
physx::PxTriangleMesh * CreateTriangleMeshFromCooked (const void *cookedMeshData, AZ::u32 bufferSize) override
 
physx::PxHeightField * CreateHeightField (const physx::PxHeightFieldSample *samples, size_t numColumns, size_t numRows) override
 
physx::PxFilterData CreateFilterData (const AzPhysics::CollisionLayer &layer, const AzPhysics::CollisionGroup &group) override
 
physx::PxCooking * GetCooking () override
 
AZStd::shared_ptr< Physics::Shape > CreateShape (const Physics::ColliderConfiguration &colliderConfiguration, const Physics::ShapeConfiguration &configuration) override
 
void ReleaseNativeMeshObject (void *nativeMeshObject) override
 
void ReleaseNativeHeightfieldObject (void *nativeHeightfieldObject) override
 
bool CookConvexMeshToFile (const AZStd::string &filePath, const AZ::Vector3 *vertices, AZ::u32 vertexCount) override
 
bool CookConvexMeshToMemory (const AZ::Vector3 *vertices, AZ::u32 vertexCount, AZStd::vector< AZ::u8 > &result) override
 
bool CookTriangleMeshToFile (const AZStd::string &filePath, const AZ::Vector3 *vertices, AZ::u32 vertexCount, const AZ::u32 *indices, AZ::u32 indexCount) override
 
bool CookTriangleMeshToMemory (const AZ::Vector3 *vertices, AZ::u32 vertexCount, const AZ::u32 *indices, AZ::u32 indexCount, AZStd::vector< AZ::u8 > &result) override
 
AzPhysics::CollisionLayer GetCollisionLayerByName (const AZStd::string &layerName) override
 
AZStd::string GetCollisionLayerName (const AzPhysics::CollisionLayer &layer) override
 
bool TryGetCollisionLayerByName (const AZStd::string &layerName, AzPhysics::CollisionLayer &layer) override
 
AzPhysics::CollisionGroup GetCollisionGroupByName (const AZStd::string &groupName) override
 
bool TryGetCollisionGroupByName (const AZStd::string &layerName, AzPhysics::CollisionGroup &group) override
 
AZStd::string GetCollisionGroupName (const AzPhysics::CollisionGroup &collisionGroup) override
 
AzPhysics::CollisionGroup GetCollisionGroupById (const AzPhysics::CollisionGroups::Id &groupId) override
 
void SetCollisionLayerName (int index, const AZStd::string &layerName) override
 
void CreateCollisionGroup (const AZStd::string &groupName, const AzPhysics::CollisionGroup &group) override
 
bool ShouldCollide (const Physics::ColliderConfiguration &colliderConfigurationA, const Physics::ColliderConfiguration &colliderConfigurationB) override
 
void Init () override
 
void Activate () override
 
void Deactivate () override
 

Static Protected Member Functions

static bool VersionConverter (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement)
 

Protected Attributes

AZStd::vector< AZStd::unique_ptr< AZ::Data::AssetHandler > > m_assetHandlers
 

Detailed Description

System component for PhysX. The system component handles underlying tasks such as initialization and shutdown of PhysX, managing a Open 3D Engine memory allocator for PhysX allocations, scheduling for PhysX jobs, and connections to the PhysX Visual Debugger. It also owns fundamental PhysX objects which manage worlds, rigid bodies, shapes, materials, constraints etc., and perform cooking (processing assets such as meshes and heightfields ready for use in PhysX).


The documentation for this class was generated from the following file: