diff --git a/Source/Engine/Physics/Colliders/BoxCollider.cpp b/Source/Engine/Physics/Colliders/BoxCollider.cpp index da78e6a2f..487059148 100644 --- a/Source/Engine/Physics/Colliders/BoxCollider.cpp +++ b/Source/Engine/Physics/Colliders/BoxCollider.cpp @@ -4,9 +4,6 @@ #include "Engine/Serialization/Serialization.h" #include "Engine/Physics/Utilities.h" #include -#if USE_EDITOR -#include "Engine/Level/Scene/SceneRendering.h" -#endif BoxCollider::BoxCollider(const SpawnParams& params) : Collider(params) @@ -123,26 +120,6 @@ void BoxCollider::Deserialize(DeserializeStream& stream, ISerializeModifier* mod DESERIALIZE_MEMBER(Size, _size); } -#if USE_EDITOR - -void BoxCollider::OnEnable() -{ - GetSceneRendering()->AddPhysicsDebug(this); - - // Base - Collider::OnEnable(); -} - -void BoxCollider::OnDisable() -{ - GetSceneRendering()->RemovePhysicsDebug(this); - - // Base - Collider::OnDisable(); -} - -#endif - void BoxCollider::UpdateBounds() { // Cache bounds @@ -152,32 +129,11 @@ void BoxCollider::UpdateBounds() BoundingSphere::FromBox(_box, _sphere); } -void BoxCollider::CreateShape() +void BoxCollider::GetGeometry(PxGeometryHolder& geometry) { - // Setup shape geometry - _cachedScale = GetScale(); Vector3 size = _size * _cachedScale; size.Absolute(); const float minSize = 0.001f; - const PxBoxGeometry geometry(Math::Max(size.X * 0.5f, minSize), Math::Max(size.Y * 0.5f, minSize), Math::Max(size.Z * 0.5f, minSize)); - - // Setup shape - CreateShapeBase(geometry); -} - -void BoxCollider::UpdateGeometry() -{ - // Check if has no shape created - if (_shape == nullptr) - return; - - // Setup shape geometry - _cachedScale = GetScale(); - Vector3 size = _size * _cachedScale; - size.Absolute(); - const float minSize = 0.001f; - const PxBoxGeometry geometry(Math::Max(size.X * 0.5f, minSize), Math::Max(size.Y * 0.5f, minSize), Math::Max(size.Z * 0.5f, minSize)); - - // Setup shape - _shape->setGeometry(geometry); + const PxBoxGeometry box(Math::Max(size.X * 0.5f, minSize), Math::Max(size.Y * 0.5f, minSize), Math::Max(size.Z * 0.5f, minSize)); + geometry.storeAny(box); } diff --git a/Source/Engine/Physics/Colliders/BoxCollider.h b/Source/Engine/Physics/Colliders/BoxCollider.h index ac381e878..89850b101 100644 --- a/Source/Engine/Physics/Colliders/BoxCollider.h +++ b/Source/Engine/Physics/Colliders/BoxCollider.h @@ -47,12 +47,6 @@ public: return _bounds; } -private: - -#if USE_EDITOR - void DrawPhysicsDebug(RenderView& view); -#endif - public: // [Collider] @@ -67,11 +61,9 @@ public: protected: // [Collider] -#if USE_EDITOR - void OnEnable() override; - void OnDisable() override; -#endif void UpdateBounds() override; - void CreateShape() override; - void UpdateGeometry() override; + void GetGeometry(PxGeometryHolder& geometry) override; +#if USE_EDITOR + void DrawPhysicsDebug(RenderView& view) override; +#endif }; diff --git a/Source/Engine/Physics/Colliders/CapsuleCollider.cpp b/Source/Engine/Physics/Colliders/CapsuleCollider.cpp index e3e717839..d3bc4dc30 100644 --- a/Source/Engine/Physics/Colliders/CapsuleCollider.cpp +++ b/Source/Engine/Physics/Colliders/CapsuleCollider.cpp @@ -4,9 +4,6 @@ #include "Engine/Serialization/Serialization.h" #include "Engine/Physics/Utilities.h" #include -#if USE_EDITOR -#include "Engine/Level/Scene/SceneRendering.h" -#endif CapsuleCollider::CapsuleCollider(const SpawnParams& params) : Collider(params) @@ -93,26 +90,6 @@ void CapsuleCollider::Deserialize(DeserializeStream& stream, ISerializeModifier* DESERIALIZE_MEMBER(Height, _height); } -#if USE_EDITOR - -void CapsuleCollider::OnEnable() -{ - GetSceneRendering()->AddPhysicsDebug(this); - - // Base - Collider::OnEnable(); -} - -void CapsuleCollider::OnDisable() -{ - GetSceneRendering()->RemovePhysicsDebug(this); - - // Base - Collider::OnDisable(); -} - -#endif - void CapsuleCollider::UpdateBounds() { // Cache bounds @@ -123,34 +100,12 @@ void CapsuleCollider::UpdateBounds() BoundingSphere::FromBox(_box, _sphere); } -void CapsuleCollider::CreateShape() +void CapsuleCollider::GetGeometry(PxGeometryHolder& geometry) { - // Setup shape geometry - _cachedScale = GetScale(); const float scaling = _cachedScale.GetAbsolute().MaxValue(); const float minSize = 0.001f; const float radius = Math::Max(Math::Abs(_radius) * scaling, minSize); const float height = Math::Max(Math::Abs(_height) * scaling, minSize); - const PxCapsuleGeometry geometry(radius, height * 0.5f); - - // Setup shape - CreateShapeBase(geometry); -} - -void CapsuleCollider::UpdateGeometry() -{ - // Check if has no shape created - if (_shape == nullptr) - return; - - // Setup shape geometry - _cachedScale = GetScale(); - const float scaling = _cachedScale.GetAbsolute().MaxValue(); - const float minSize = 0.001f; - const float radius = Math::Max(Math::Abs(_radius) * scaling, minSize); - const float height = Math::Max(Math::Abs(_height) * scaling, minSize); - const PxCapsuleGeometry geometry(radius, height * 0.5f); - - // Setup shape - _shape->setGeometry(geometry); + const PxCapsuleGeometry capsule(radius, height * 0.5f); + geometry.storeAny(capsule); } diff --git a/Source/Engine/Physics/Colliders/CapsuleCollider.h b/Source/Engine/Physics/Colliders/CapsuleCollider.h index 5efe18c13..4a66ca877 100644 --- a/Source/Engine/Physics/Colliders/CapsuleCollider.h +++ b/Source/Engine/Physics/Colliders/CapsuleCollider.h @@ -63,12 +63,6 @@ public: /// API_PROPERTY() void SetHeight(float value); -private: - -#if USE_EDITOR - void DrawPhysicsDebug(RenderView& view); -#endif - public: // [Collider] @@ -82,11 +76,9 @@ public: protected: // [Collider] -#if USE_EDITOR - void OnEnable() override; - void OnDisable() override; -#endif void UpdateBounds() override; - void CreateShape() override; - void UpdateGeometry() override; + void GetGeometry(PxGeometryHolder& geometry) override; +#if USE_EDITOR + void DrawPhysicsDebug(RenderView& view) override; +#endif }; diff --git a/Source/Engine/Physics/Colliders/CharacterController.cpp b/Source/Engine/Physics/Colliders/CharacterController.cpp index e0630573e..c7809dd78 100644 --- a/Source/Engine/Physics/Colliders/CharacterController.cpp +++ b/Source/Engine/Physics/Colliders/CharacterController.cpp @@ -7,9 +7,6 @@ #include "Engine/Serialization/Serialization.h" #include "Engine/Engine/Time.h" #include "Engine/Physics/PhysicalMaterial.h" -#if USE_EDITOR -#include "Engine/Level/Scene/SceneRendering.h" -#endif #include #include #include @@ -276,6 +273,11 @@ void CharacterController::UpdateGeometry() UpdateSize(); } +void CharacterController::GetGeometry(PxGeometryHolder& geometry) +{ + // Unused +} + void CharacterController::UpdateLayerBits() { // Base @@ -309,26 +311,6 @@ void CharacterController::EndPlay() _shape = nullptr; } -#if USE_EDITOR - -void CharacterController::OnEnable() -{ - GetSceneRendering()->AddPhysicsDebug(this); - - // Base - Collider::OnEnable(); -} - -void CharacterController::OnDisable() -{ - GetSceneRendering()->RemovePhysicsDebug(this); - - // Base - Collider::OnDisable(); -} - -#endif - void CharacterController::OnActiveInTreeChanged() { // Skip collider base diff --git a/Source/Engine/Physics/Colliders/CharacterController.h b/Source/Engine/Physics/Colliders/CharacterController.h index 15ca75a7e..f850b9124 100644 --- a/Source/Engine/Physics/Colliders/CharacterController.h +++ b/Source/Engine/Physics/Colliders/CharacterController.h @@ -212,12 +212,6 @@ protected: /// void UpdateSize() const; -private: - -#if USE_EDITOR - void DrawPhysicsDebug(RenderView& view); -#endif - public: // [Collider] @@ -240,12 +234,12 @@ protected: // [PhysicsActor] void UpdateGeometry() override; + void GetGeometry(PxGeometryHolder& geometry) override; void UpdateLayerBits() override; void BeginPlay(SceneBeginData* data) override; void EndPlay() override; #if USE_EDITOR - void OnEnable() override; - void OnDisable() override; + void DrawPhysicsDebug(RenderView& view) override; #endif void OnActiveInTreeChanged() override; void OnParentChanged() override; diff --git a/Source/Engine/Physics/Colliders/Collider.cpp b/Source/Engine/Physics/Colliders/Collider.cpp index 2eeb266aa..a1a84a523 100644 --- a/Source/Engine/Physics/Colliders/Collider.cpp +++ b/Source/Engine/Physics/Colliders/Collider.cpp @@ -2,6 +2,9 @@ #include "Collider.h" #include "Engine/Core/Log.h" +#if USE_EDITOR +#include "Engine/Level/Scene/SceneRendering.h" +#endif #include "Engine/Serialization/Serialization.h" #include "Engine/Physics/Utilities.h" #include "Engine/Physics/PhysicsSettings.h" @@ -182,6 +185,16 @@ bool Collider::IsAttached() const return _shape && _shape->getActor() != nullptr; } +bool Collider::CanAttach(RigidBody* rigidBody) const +{ + return true; +} + +bool Collider::CanBeTrigger() const +{ + return true; +} + RigidBody* Collider::GetAttachedRigidBody() const { if (_shape && _staticActor == nullptr) @@ -193,6 +206,26 @@ RigidBody* Collider::GetAttachedRigidBody() const return nullptr; } +#if USE_EDITOR + +void Collider::OnEnable() +{ + GetSceneRendering()->AddPhysicsDebug(this); + + // Base + Actor::OnEnable(); +} + +void Collider::OnDisable() +{ + // Base + Actor::OnDisable(); + + GetSceneRendering()->RemovePhysicsDebug(this); +} + +#endif + void Collider::Attach(RigidBody* rigidBody) { ASSERT(CanAttach(rigidBody)); @@ -238,11 +271,14 @@ void Collider::UpdateLayerBits() _shape->setQueryFilterData(filterData); } -void Collider::CreateShapeBase(const PxGeometry& geometry) +void Collider::CreateShape() { - ASSERT(_shape == nullptr); + // Setup shape geometry + _cachedScale = GetScale(); + PxGeometryHolder geometry; + GetGeometry(geometry); - // Prepare + // Create shape const bool isTrigger = _isTrigger && CanBeTrigger(); const PxShapeFlags shapeFlags = GetShapeFlags(isTrigger, IsActiveInHierarchy()); PxMaterial* material = Physics::GetDefaultMaterial(); @@ -250,17 +286,62 @@ void Collider::CreateShapeBase(const PxGeometry& geometry) { material = ((PhysicalMaterial*)Material->Instance)->GetPhysXMaterial(); } - - // Create shape - _shape = CPhysX->createShape(geometry, *material, true, shapeFlags); + ASSERT(_shape == nullptr); + _shape = CPhysX->createShape(geometry.any(), *material, true, shapeFlags); ASSERT(_shape); _shape->userData = this; - - // Setup properties _shape->setContactOffset(Math::Max(_shape->getRestOffset() + ZeroTolerance, _contactOffset)); UpdateLayerBits(); } +void Collider::UpdateGeometry() +{ + if (_shape == nullptr) + return; + + // Setup shape geometry + _cachedScale = GetScale(); + PxGeometryHolder geometry; + GetGeometry(geometry); + + // Recreate shape if geometry has different type + if (_shape->getGeometryType() != geometry.getType()) + { + // Detach from the actor + auto actor = _shape->getActor(); + if (actor) + actor->detachShape(*_shape); + + // Release shape + Physics::RemoveCollider(this); + _shape->release(); + _shape = nullptr; + + // Recreate shape + CreateShape(); + + // Reattach again (only if can, see CanAttach function) + if (actor) + { + const auto rigidBody = dynamic_cast(GetParent()); + if (_staticActor != nullptr || (rigidBody && CanAttach(rigidBody))) + { + actor->attachShape(*_shape); + } + else + { + // Be static triangle mesh + CreateStaticActor(); + } + } + + return; + } + + // Update shape + _shape->setGeometry(geometry.any()); +} + void Collider::CreateStaticActor() { ASSERT(_staticActor == nullptr); @@ -285,6 +366,14 @@ void Collider::RemoveStaticActor() _staticActor = nullptr; } +#if USE_EDITOR + +void Collider::DrawPhysicsDebug(RenderView& view) +{ +} + +#endif + void Collider::OnMaterialChanged() { // Update the shape material diff --git a/Source/Engine/Physics/Colliders/Collider.h b/Source/Engine/Physics/Colliders/Collider.h index c836a7886..3e7b5ecfd 100644 --- a/Source/Engine/Physics/Colliders/Collider.h +++ b/Source/Engine/Physics/Colliders/Collider.h @@ -160,19 +160,13 @@ public: /// /// The rigid body. /// true if this collider can be attached the specified rigid body; otherwise, false. - virtual bool CanAttach(RigidBody* rigidBody) const - { - return true; - } + virtual bool CanAttach(RigidBody* rigidBody) const; /// /// Determines whether this collider can be a trigger shape. /// /// true if this collider can be trigger; otherwise, false. - virtual bool CanBeTrigger() const - { - return true; - } + virtual bool CanBeTrigger() const; /// /// Attaches collider to the specified rigid body. @@ -198,20 +192,20 @@ protected: virtual void UpdateBounds() = 0; /// - /// Creates the collider shape. + /// Gets the collider shape geometry. /// - virtual void CreateShape() = 0; + /// The output geometry. + virtual void GetGeometry(PxGeometryHolder& geometry) = 0; /// - /// Creates the collider shape from the given geometry. + /// Creates the collider shape. /// - /// The geometry. - void CreateShapeBase(const PxGeometry& geometry); + virtual void CreateShape(); /// /// Updates the shape geometry. /// - virtual void UpdateGeometry() = 0; + virtual void UpdateGeometry(); /// /// Creates the static actor. @@ -223,6 +217,10 @@ protected: /// void RemoveStaticActor(); +#if USE_EDITOR + virtual void DrawPhysicsDebug(RenderView& view); +#endif + private: void OnMaterialChanged(); @@ -237,6 +235,10 @@ public: protected: // [PhysicsColliderActor] +#if USE_EDITOR + void OnEnable() override; + void OnDisable() override; +#endif void BeginPlay(SceneBeginData* data) override; void EndPlay() override; void OnActiveInTreeChanged() override; diff --git a/Source/Engine/Physics/Colliders/MeshCollider.cpp b/Source/Engine/Physics/Colliders/MeshCollider.cpp index 1b72d83eb..7ba76f963 100644 --- a/Source/Engine/Physics/Colliders/MeshCollider.cpp +++ b/Source/Engine/Physics/Colliders/MeshCollider.cpp @@ -5,11 +5,6 @@ #include "Engine/Serialization/Serialization.h" #include "Engine/Physics/Utilities.h" #include "Engine/Physics/Physics.h" -#include -#include -#if USE_EDITOR -#include "Engine/Level/Scene/SceneRendering.h" -#endif MeshCollider::MeshCollider(const SpawnParams& params) : Collider(params) @@ -117,26 +112,6 @@ void MeshCollider::Deserialize(DeserializeStream& stream, ISerializeModifier* mo DESERIALIZE(CollisionData); } -#if USE_EDITOR - -void MeshCollider::OnEnable() -{ - GetSceneRendering()->AddPhysicsDebug(this); - - // Base - Collider::OnEnable(); -} - -void MeshCollider::OnDisable() -{ - GetSceneRendering()->RemovePhysicsDebug(this); - - // Base - Collider::OnDisable(); -} - -#endif - void MeshCollider::UpdateBounds() { // Cache bounds @@ -149,11 +124,10 @@ void MeshCollider::UpdateBounds() BoundingSphere::FromBox(_box, _sphere); } -void MeshCollider::CreateShape() +void MeshCollider::GetGeometry(PxGeometryHolder& geometry) { // Prepare scale - Vector3 scale = GetScale(); - _cachedScale = scale; + Vector3 scale = _cachedScale; scale.Absolute(); const float minSize = 0.001f; scale = Vector3::Max(scale, minSize); @@ -165,100 +139,23 @@ void MeshCollider::CreateShape() if (type == CollisionDataType::ConvexMesh) { // Convex mesh - PxConvexMeshGeometry geometry; - geometry.scale.scale = C2P(scale); - geometry.convexMesh = CollisionData->GetConvex(); - CreateShapeBase(geometry); + PxConvexMeshGeometry convexMesh; + convexMesh.scale.scale = C2P(scale); + convexMesh.convexMesh = CollisionData->GetConvex(); + geometry.storeAny(convexMesh); } else if (type == CollisionDataType::TriangleMesh) { // Triangle mesh - PxTriangleMeshGeometry geometry; - geometry.scale.scale = C2P(scale); - geometry.triangleMesh = CollisionData->GetTriangle(); - CreateShapeBase(geometry); + PxTriangleMeshGeometry triangleMesh; + triangleMesh.scale.scale = C2P(scale); + triangleMesh.triangleMesh = CollisionData->GetTriangle(); + geometry.storeAny(triangleMesh); } else { // Dummy geometry - const PxSphereGeometry geometry(0.01f); - CreateShapeBase(geometry); - } -} - -void MeshCollider::UpdateGeometry() -{ - // Check if has no shape created - if (_shape == nullptr) - return; - - // Recreate shape if geometry has different type - CollisionDataType type = CollisionDataType::None; - if (CollisionData && CollisionData->IsLoaded()) - type = CollisionData->GetOptions().Type; - if ((type == CollisionDataType::ConvexMesh && _shape->getGeometryType() != PxGeometryType::eCONVEXMESH) - || (type == CollisionDataType::TriangleMesh && _shape->getGeometryType() != PxGeometryType::eTRIANGLEMESH) - || (type == CollisionDataType::None && _shape->getGeometryType() != PxGeometryType::eSPHERE) - ) - { - // Detach from the actor - auto actor = _shape->getActor(); - if (actor) - actor->detachShape(*_shape); - - // Release shape - Physics::RemoveCollider(this); - _shape->release(); - _shape = nullptr; - - // Recreate shape - CreateShape(); - - // Reattach again (only if can, see CanAttach function) - if (actor) - { - if (_staticActor != nullptr || type != CollisionDataType::TriangleMesh) - { - actor->attachShape(*_shape); - } - else - { - // Be static triangle mesh - CreateStaticActor(); - } - } - - return; - } - - // Prepare scale - Vector3 scale = GetScale(); - _cachedScale = scale; - scale.Absolute(); - const float minSize = 0.001f; - scale = Vector3::Max(scale, minSize); - - // Setup shape (based on type) - if (type == CollisionDataType::ConvexMesh) - { - // Convex mesh - PxConvexMeshGeometry geometry; - geometry.scale.scale = C2P(scale); - geometry.convexMesh = CollisionData->GetConvex(); - _shape->setGeometry(geometry); - } - else if (type == CollisionDataType::TriangleMesh) - { - // Triangle mesh - PxTriangleMeshGeometry geometry; - geometry.scale.scale = C2P(scale); - geometry.triangleMesh = CollisionData->GetTriangle(); - _shape->setGeometry(geometry); - } - else - { - // Dummy geometry - const PxSphereGeometry geometry(0.01f); - _shape->setGeometry(geometry); + const PxSphereGeometry sphere(minSize); + geometry.storeAny(sphere); } } diff --git a/Source/Engine/Physics/Colliders/MeshCollider.h b/Source/Engine/Physics/Colliders/MeshCollider.h index 22dbd755f..efcf60cee 100644 --- a/Source/Engine/Physics/Colliders/MeshCollider.h +++ b/Source/Engine/Physics/Colliders/MeshCollider.h @@ -25,9 +25,6 @@ private: void OnCollisionDataChanged(); void OnCollisionDataLoaded(); -#if USE_EDITOR - void DrawPhysicsDebug(RenderView& view); -#endif public: @@ -45,10 +42,8 @@ protected: // [Collider] #if USE_EDITOR - void OnEnable() override; - void OnDisable() override; + void DrawPhysicsDebug(RenderView& view) override; #endif void UpdateBounds() override; - void CreateShape() override; - void UpdateGeometry() override; + void GetGeometry(PxGeometryHolder& geometry) override; }; diff --git a/Source/Engine/Physics/Colliders/SphereCollider.cpp b/Source/Engine/Physics/Colliders/SphereCollider.cpp index ef308cf8a..b602b8f84 100644 --- a/Source/Engine/Physics/Colliders/SphereCollider.cpp +++ b/Source/Engine/Physics/Colliders/SphereCollider.cpp @@ -4,9 +4,6 @@ #include "Engine/Serialization/Serialization.h" #include "Engine/Physics/Utilities.h" #include -#if USE_EDITOR -#include "Engine/Level/Scene/SceneRendering.h" -#endif SphereCollider::SphereCollider(const SpawnParams& params) : Collider(params) @@ -67,26 +64,6 @@ void SphereCollider::Deserialize(DeserializeStream& stream, ISerializeModifier* DESERIALIZE_MEMBER(Radius, _radius); } -#if USE_EDITOR - -void SphereCollider::OnEnable() -{ - GetSceneRendering()->AddPhysicsDebug(this); - - // Base - Collider::OnEnable(); -} - -void SphereCollider::OnDisable() -{ - GetSceneRendering()->RemovePhysicsDebug(this); - - // Base - Collider::OnDisable(); -} - -#endif - void SphereCollider::UpdateBounds() { // Cache bounds @@ -95,32 +72,11 @@ void SphereCollider::UpdateBounds() _sphere.GetBoundingBox(_box); } -void SphereCollider::CreateShape() +void SphereCollider::GetGeometry(PxGeometryHolder& geometry) { - // Setup shape geometry - _cachedScale = GetScale(); const float scaling = _cachedScale.GetAbsolute().MaxValue(); const float radius = Math::Abs(_radius) * scaling; const float minSize = 0.001f; - const PxSphereGeometry geometry(Math::Max(radius, minSize)); - - // Setup shape - CreateShapeBase(geometry); -} - -void SphereCollider::UpdateGeometry() -{ - // Check if has no shape created - if (_shape == nullptr) - return; - - // Setup shape geometry - _cachedScale = GetScale(); - const float scaling = _cachedScale.GetAbsolute().MaxValue(); - const float radius = Math::Abs(_radius) * scaling; - const float minSize = 0.001f; - const PxSphereGeometry geometry(Math::Max(radius, minSize)); - - // Setup shape - _shape->setGeometry(geometry); + const PxSphereGeometry sphere(Math::Max(radius, minSize)); + geometry.storeAny(sphere); } diff --git a/Source/Engine/Physics/Colliders/SphereCollider.h b/Source/Engine/Physics/Colliders/SphereCollider.h index 0835152f0..ed2d4cd09 100644 --- a/Source/Engine/Physics/Colliders/SphereCollider.h +++ b/Source/Engine/Physics/Colliders/SphereCollider.h @@ -37,12 +37,6 @@ public: /// API_PROPERTY() void SetRadius(float value); -private: - -#if USE_EDITOR - void DrawPhysicsDebug(RenderView& view); -#endif - public: // [Collider] @@ -57,10 +51,8 @@ protected: // [Collider] #if USE_EDITOR - void OnEnable() override; - void OnDisable() override; + void DrawPhysicsDebug(RenderView& view) override; #endif void UpdateBounds() override; - void CreateShape() override; - void UpdateGeometry() override; + void GetGeometry(PxGeometryHolder& geometry) override; }; diff --git a/Source/Engine/Physics/Types.h b/Source/Engine/Physics/Types.h index 80a4e30b9..6465dd900 100644 --- a/Source/Engine/Physics/Types.h +++ b/Source/Engine/Physics/Types.h @@ -28,6 +28,7 @@ namespace physx class PxFoundation; class PxShape; class PxGeometry; + class PxGeometryHolder; class PxProfileZoneManager; class PxMaterial; class PxPvd;