Open 3D Engine PhysX 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.
PhysX::DebugDraw::Collider Class Reference

Inherits AzFramework::EntityDebugDisplayEventBus::Handler, AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler, and AzToolsFramework::EntitySelectionEvents::Bus::Handler.

Classes

struct  ElementDebugInfo
 
struct  GeometryData
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (Collider, AZ::SystemAllocator)
 
 AZ_RTTI (Collider, "{7DE9CA01-DF1E-4D72-BBF4-76C9136BE6A2}")
 
void Connect (AZ::EntityId entityId)
 
void SetDisplayCallback (const DisplayCallback *callback)
 
void Disconnect ()
 
bool HasCachedGeometry () const
 
void ClearCachedGeometry ()
 
void SetDisplayFlag (bool enable)
 
bool IsDisplayFlagEnabled () const
 
void BuildMeshes (const Physics::ShapeConfiguration &shapeConfig, AZ::u32 geomIndex) const
 
AZ::Color CalcDebugColor (const Physics::ColliderConfiguration &colliderConfig, const ElementDebugInfo &elementToDebugInfo=ElementDebugInfo()) const
 
AZ::Color CalcDebugColorWarning (const AZ::Color &baseColor, AZ::u32 triangleCount) const
 
void DrawSphere (AzFramework::DebugDisplayRequests &debugDisplay, const Physics::ColliderConfiguration &colliderConfig, const Physics::SphereShapeConfiguration &sphereShapeConfig, const AZ::Vector3 &colliderScale=AZ::Vector3::CreateOne()) const
 
void DrawBox (AzFramework::DebugDisplayRequests &debugDisplay, const Physics::ColliderConfiguration &colliderConfig, const Physics::BoxShapeConfiguration &boxShapeConfig, const AZ::Vector3 &colliderScale=AZ::Vector3::CreateOne()) const
 
void DrawCapsule (AzFramework::DebugDisplayRequests &debugDisplay, const Physics::ColliderConfiguration &colliderConfig, const Physics::CapsuleShapeConfiguration &capsuleShapeConfig, const AZ::Vector3 &colliderScale=AZ::Vector3::CreateOne()) const
 
void DrawMesh (AzFramework::DebugDisplayRequests &debugDisplay, const Physics::ColliderConfiguration &colliderConfig, const Physics::CookedMeshShapeConfiguration &assetConfig, const AZ::Vector3 &meshScale, AZ::u32 geomIndex) const
 
void DrawHeightfield (AzFramework::DebugDisplayRequests &debugDisplay, const AZ::Vector3 &aabbCenterLocalBody, float drawDistance, const AZStd::shared_ptr< const Physics::Shape > &shape) const
 
void DrawPolygonPrism (AzFramework::DebugDisplayRequests &debugDisplay, const Physics::ColliderConfiguration &colliderConfig, const AZStd::vector< AZ::Vector3 > &points) const
 
AZ::Transform GetColliderLocalTransform (const Physics::ColliderConfiguration &colliderConfig, const AZ::Vector3 &colliderScale=AZ::Vector3::CreateOne()) const
 
AZ::u32 GetNumShapes () const
 
const AZStd::vector< AZ::Vector3 > & GetVerts (AZ::u32 geomIndex) const
 
const AZStd::vector< AZ::Vector3 > & GetPoints (AZ::u32 geomIndex) const
 
const AZStd::vector< AZ::u32 > & GetIndices (AZ::u32 geomIndex) const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Protected Member Functions

void DisplayEntityViewport (const AzFramework::ViewportInfo &viewportInfo, AzFramework::DebugDisplayRequests &debugDisplay) override
 
void OnDrawHelpersChanged (bool enabled) override
 
void OnSelected () override
 
void OnDeselected () override
 
void RefreshTreeHelper ()
 
void DrawTriangleMesh (AzFramework::DebugDisplayRequests &debugDisplay, const Physics::ColliderConfiguration &colliderConfig, AZ::u32 geomIndex, const AZ::Vector3 &meshScale=AZ::Vector3::CreateOne()) const
 
void DrawConvexMesh (AzFramework::DebugDisplayRequests &debugDisplay, const Physics::ColliderConfiguration &colliderConfig, AZ::u32 geomIndex, const AZ::Vector3 &meshScale=AZ::Vector3::CreateOne()) const
 
void BuildTriangleMesh (physx::PxBase *meshData, AZ::u32 geomIndex) const
 
void BuildConvexMesh (physx::PxBase *meshData, AZ::u32 geomIndex) const
 
AZStd::string GetEntityName () const
 

Protected Attributes

bool m_locallyEnabled = true
 Local setting to enable displaying the collider in editor view.
 
AZ::EntityId m_entityId
 
const DisplayCallbackm_displayCallback = nullptr
 
AZStd::vector< GeometryDatam_geometry
 
PhysX::Debug::DebugDisplayDataChangedEvent::Handler m_debugDisplayDataChangedEvent
 

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