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::SystemRequests Class Referenceabstract

#include <SystemComponentBus.h>

Inherits AZ::EBusTraits.

Public Types

using MutexType = AZStd::recursive_mutex
 

Public Member Functions

virtual physx::PxConvexMesh * CreateConvexMesh (const void *vertices, AZ::u32 vertexNum, AZ::u32 vertexStride)=0
 
virtual physx::PxConvexMesh * CreateConvexMeshFromCooked (const void *cookedMeshData, AZ::u32 bufferSize)=0
 
virtual physx::PxTriangleMesh * CreateTriangleMeshFromCooked (const void *cookedMeshData, AZ::u32 bufferSize)=0
 
virtual physx::PxHeightField * CreateHeightField (const physx::PxHeightFieldSample *samples, size_t numColumns, size_t numRows)=0
 
virtual physx::PxFilterData CreateFilterData (const AzPhysics::CollisionLayer &layer, const AzPhysics::CollisionGroup &group)=0
 
virtual physx::PxCooking * GetCooking ()=0
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 

Detailed Description

Requests for the PhysX system component. The system component 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).

Member Function Documentation

◆ CreateConvexMesh()

virtual physx::PxConvexMesh* PhysX::SystemRequests::CreateConvexMesh ( const void *  vertices,
AZ::u32  vertexNum,
AZ::u32  vertexStride 
)
pure virtual

Creates a new convex mesh.

Parameters
verticesPointer to beginning of vertex data.
vertexNumNumber of vertices in mesh.
vertexStrideSize of each entry in the vertex data.
Returns
Pointer to the created mesh.

◆ CreateConvexMeshFromCooked()

virtual physx::PxConvexMesh* PhysX::SystemRequests::CreateConvexMeshFromCooked ( const void *  cookedMeshData,
AZ::u32  bufferSize 
)
pure virtual

Creates a new convex mesh from pre-cooked convex mesh data.

Parameters
cookedMeshDataPointer to the cooked convex mesh data.
bufferSizeSize of the cookedMeshData buffer in bytes.
Returns
Pointer to the created convex mesh.

◆ CreateFilterData()

virtual physx::PxFilterData PhysX::SystemRequests::CreateFilterData ( const AzPhysics::CollisionLayer &  layer,
const AzPhysics::CollisionGroup &  group 
)
pure virtual

Creates PhysX collision filter data from generic collision filtering settings.

Parameters
layerThe collision layer the object belongs to.
groupThe set of collision layers the object will interact with.

◆ CreateHeightField()

virtual physx::PxHeightField* PhysX::SystemRequests::CreateHeightField ( const physx::PxHeightFieldSample *  samples,
size_t  numColumns,
size_t  numRows 
)
pure virtual

Creates a new heightfield.

Parameters
samplesPointer to beginning of heightfield sample data.
numColumnsNumber of columns in the heightfield.
numRowsNumber of rows in the heightfield.
Returns
Pointer to the created heightfield.

◆ CreateTriangleMeshFromCooked()

virtual physx::PxTriangleMesh* PhysX::SystemRequests::CreateTriangleMeshFromCooked ( const void *  cookedMeshData,
AZ::u32  bufferSize 
)
pure virtual

Creates a new triangle mesh from pre-cooked mesh data.

Parameters
cookedMeshDataPointer to the cooked mesh data.
bufferSizeSize of the cookedMeshData buffer in bytes.
Returns
Pointer to the created mesh.

◆ GetCooking()

virtual physx::PxCooking* PhysX::SystemRequests::GetCooking ( )
pure virtual

Gets the cooking object. It is possible to update the current cooking params with setParams on PxCooking, this way the default cooking params can be overridden if required. References: https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Geometry.html#triangle-meshes, https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Startup.html#cooking


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