From 64b20b49630d630e33d69dcda64fc499d11fc131 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 7 Jun 2017 22:03:00 +0200 Subject: [PATCH] [DEBUG] correct missing some virtual --- ephysics/collision/ProxyShape.h | 2 +- ephysics/collision/RaycastInfo.h | 2 +- ephysics/collision/TriangleMesh.h | 2 +- ephysics/collision/TriangleVertexArray.h | 2 +- ephysics/collision/broadphase/BroadPhaseAlgorithm.h | 2 +- ephysics/collision/broadphase/DynamicAABBTree.h | 4 +++- ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h | 1 + ephysics/collision/shapes/ConcaveShape.h | 1 + 8 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ephysics/collision/ProxyShape.h b/ephysics/collision/ProxyShape.h index 9381054..9eff8a8 100644 --- a/ephysics/collision/ProxyShape.h +++ b/ephysics/collision/ProxyShape.h @@ -102,7 +102,7 @@ class ProxyShape { const Transform& transform, decimal mass); /// Destructor - ~ProxyShape(); + virtual ~ProxyShape(); /// Return the collision shape const CollisionShape* getCollisionShape() const; diff --git a/ephysics/collision/RaycastInfo.h b/ephysics/collision/RaycastInfo.h index 9fb3f1a..ae9c16b 100644 --- a/ephysics/collision/RaycastInfo.h +++ b/ephysics/collision/RaycastInfo.h @@ -88,7 +88,7 @@ struct RaycastInfo { } /// Destructor - ~RaycastInfo() { + virtual ~RaycastInfo() { } }; diff --git a/ephysics/collision/TriangleMesh.h b/ephysics/collision/TriangleMesh.h index c5146c9..8c1bbcd 100644 --- a/ephysics/collision/TriangleMesh.h +++ b/ephysics/collision/TriangleMesh.h @@ -54,7 +54,7 @@ class TriangleMesh { TriangleMesh(); /// Destructor - ~TriangleMesh(); + virtual ~TriangleMesh(); /// Add a subpart of the mesh void addSubpart(TriangleVertexArray* triangleVertexArray); diff --git a/ephysics/collision/TriangleVertexArray.h b/ephysics/collision/TriangleVertexArray.h index 4cfadf7..3046cfe 100644 --- a/ephysics/collision/TriangleVertexArray.h +++ b/ephysics/collision/TriangleVertexArray.h @@ -87,7 +87,7 @@ class TriangleVertexArray { VertexDataType vertexDataType, IndexDataType indexDataType); /// Destructor - ~TriangleVertexArray(); + virtual ~TriangleVertexArray(); /// Return the vertex data type VertexDataType getVertexDataType() const; diff --git a/ephysics/collision/broadphase/BroadPhaseAlgorithm.h b/ephysics/collision/broadphase/BroadPhaseAlgorithm.h index e80ae54..78e14b5 100644 --- a/ephysics/collision/broadphase/BroadPhaseAlgorithm.h +++ b/ephysics/collision/broadphase/BroadPhaseAlgorithm.h @@ -176,7 +176,7 @@ class BroadPhaseAlgorithm { BroadPhaseAlgorithm(CollisionDetection& collisionDetection); /// Destructor - ~BroadPhaseAlgorithm(); + virtual ~BroadPhaseAlgorithm(); /// Add a proxy collision shape into the broad-phase collision detection void addProxyCollisionShape(ProxyShape* proxyShape, const AABB& aabb); diff --git a/ephysics/collision/broadphase/DynamicAABBTree.h b/ephysics/collision/broadphase/DynamicAABBTree.h index d76a156..01a9212 100644 --- a/ephysics/collision/broadphase/DynamicAABBTree.h +++ b/ephysics/collision/broadphase/DynamicAABBTree.h @@ -97,6 +97,7 @@ struct TreeNode { class DynamicAABBTreeOverlapCallback { public : + virtual ~DynamicAABBTreeOverlapCallback() = default; // Called when a overlapping node has been found during the call to // DynamicAABBTree:reportAllShapesOverlappingWithAABB() @@ -111,6 +112,7 @@ class DynamicAABBTreeOverlapCallback { class DynamicAABBTreeRaycastCallback { public: + virtual ~DynamicAABBTreeRaycastCallback() = default; // Called when the AABB of a leaf node is hit by a ray virtual decimal raycastBroadPhaseShape(int32 nodeId, const Ray& ray)=0; @@ -194,7 +196,7 @@ class DynamicAABBTree { DynamicAABBTree(decimal extraAABBGap = decimal(0.0)); /// Destructor - ~DynamicAABBTree(); + virtual ~DynamicAABBTree(); /// Add an object into the tree (where node data are two integers) int addObject(const AABB& aabb, int32 data1, int32 data2); diff --git a/ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h b/ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h index deddfb1..8b78584 100644 --- a/ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h +++ b/ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h @@ -46,6 +46,7 @@ class CollisionDetection; class NarrowPhaseCallback { public: + virtual ~NarrowPhaseCallback() = default; /// Called by a narrow-phase collision algorithm when a new contact has been found virtual void notifyContact(OverlappingPair* overlappingPair, diff --git a/ephysics/collision/shapes/ConcaveShape.h b/ephysics/collision/shapes/ConcaveShape.h index 9bc0586..7dd75ed 100644 --- a/ephysics/collision/shapes/ConcaveShape.h +++ b/ephysics/collision/shapes/ConcaveShape.h @@ -41,6 +41,7 @@ namespace reactphysics3d { class TriangleCallback { public: + virtual ~TriangleCallback() = default; /// Report a triangle virtual void testTriangle(const Vector3* trianglePoints)=0;