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

Inherits AZ::Component, Physics::HeightfieldProviderRequestsBus::Handler, LmbrCentral::ShapeComponentNotificationsBus::Handler, and AzFramework::Terrain::TerrainDataNotificationBus::Handler.

Public Member Functions

 AZ_COMPONENT (TerrainPhysicsColliderComponent, "{33C20287-1D37-44D0-96A0-2C3766E23624}")
 
 TerrainPhysicsColliderComponent (const TerrainPhysicsColliderConfig &configuration)
 
AZ::Vector2 GetHeightfieldGridSpacing () const override
 
void GetHeightfieldGridSize (size_t &numColumns, size_t &numRows) const override
 
AZ::u64 GetHeightfieldGridColumns () const override
 
AZ::u64 GetHeightfieldGridRows () const override
 
void GetHeightfieldHeightBounds (float &minHeightBounds, float &maxHeightBounds) const override
 
float GetHeightfieldMinHeight () const override
 
float GetHeightfieldMaxHeight () const override
 
AZ::Aabb GetHeightfieldAabb () const override
 
AZ::Transform GetHeightfieldTransform () const override
 
AZStd::vector< AZ::Data::Asset< Physics::MaterialAsset > > GetMaterialList () const override
 
AZStd::vector< float > GetHeights () const override
 
AZStd::vector< Physics::HeightMaterialPoint > GetHeightsAndMaterials () const override
 
void GetHeightfieldIndicesFromRegion (const AZ::Aabb &region, size_t &startColumn, size_t &startRow, size_t &numColumns, size_t &numRows) const override
 
void UpdateHeightsAndMaterials (const Physics::UpdateHeightfieldSampleFunction &updateHeightsMaterialsCallback, size_t startColumn, size_t startRow, size_t numColumns, size_t numRows) const override
 Updates the list of heights and materials within the region.
 
void UpdateHeightsAndMaterialsAsync (const Physics::UpdateHeightfieldSampleFunction &updateHeightsMaterialsCallback, const Physics::UpdateHeightfieldCompleteFunction &updateHeightsCompleteCallback, size_t startColumn, size_t startRow, size_t numColumns, size_t numRows) const override
 
void UpdateConfiguration (const TerrainPhysicsColliderConfig &newConfiguration)
 

Static Public Member Functions

static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &services)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &services)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &services)
 
static void GetDependentServices (AZ::ComponentDescriptor::DependencyArrayType &services)
 
static void Reflect (AZ::ReflectContext *context)
 

Protected Member Functions

void Activate () override
 
void Deactivate () override
 
uint8_t GetMaterialIndex (const AZ::Data::Asset< Physics::MaterialAsset > &materialAsset, const AZStd::vector< AZ::Data::Asset< Physics::MaterialAsset > > &materialList) const
 
AZ::Data::Asset< Physics::MaterialAsset > FindMaterialAssetForSurfaceTag (const SurfaceData::SurfaceTag tag) const
 
void GenerateHeightsInBounds (AZStd::vector< float > &heights) const
 
void NotifyListenersOfHeightfieldDataChange (Physics::HeightfieldProviderNotifications::HeightfieldChangeMask heightfieldChangeMask, const AZ::Aabb &dirtyRegion)
 
void OnShapeChanged (ShapeChangeReasons changeReason) override
 
void OnTerrainDataCreateEnd () override
 
void OnTerrainDataDestroyBegin () override
 
void OnTerrainDataChanged (const AZ::Aabb &dirtyRegion, TerrainDataChangedMask dataChangedMask) override
 
void CalculateHeightfieldRegion ()
 
void BuildSurfaceTagToMaterialIndexLookup ()
 

Friends

class EditorTerrainPhysicsColliderComponent
 

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