Use override keyword to mark virtual overriden methods
This commit is contained in:
parent
f5ade0f52d
commit
16478722de
|
@ -114,7 +114,7 @@ class CollisionBody : public Body {
|
|||
CollisionBody(const Transform& transform, CollisionWorld& world, bodyindex id);
|
||||
|
||||
/// Destructor
|
||||
virtual ~CollisionBody();
|
||||
virtual ~CollisionBody() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
CollisionBody(const CollisionBody& body) = delete;
|
||||
|
@ -129,7 +129,7 @@ class CollisionBody : public Body {
|
|||
void setType(BodyType type);
|
||||
|
||||
/// Set whether or not the body is active
|
||||
virtual void setIsActive(bool isActive);
|
||||
virtual void setIsActive(bool isActive) override;
|
||||
|
||||
/// Return the current position and orientation
|
||||
const Transform& getTransform() const;
|
||||
|
|
|
@ -110,7 +110,7 @@ class RigidBody : public CollisionBody {
|
|||
void updateTransformWithCenterOfMass();
|
||||
|
||||
/// Update the broad-phase state for this body (because it has moved for instance)
|
||||
virtual void updateBroadPhaseState() const;
|
||||
virtual void updateBroadPhaseState() const override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -120,7 +120,7 @@ class RigidBody : public CollisionBody {
|
|||
RigidBody(const Transform& transform, CollisionWorld& world, bodyindex id);
|
||||
|
||||
/// Destructor
|
||||
virtual ~RigidBody();
|
||||
virtual ~RigidBody() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
RigidBody(const RigidBody& body) = delete;
|
||||
|
@ -132,7 +132,7 @@ class RigidBody : public CollisionBody {
|
|||
void setType(BodyType type);
|
||||
|
||||
/// Set the current position and orientation
|
||||
virtual void setTransform(const Transform& transform);
|
||||
virtual void setTransform(const Transform& transform) override;
|
||||
|
||||
/// Return the mass of the body
|
||||
decimal getMass() const;
|
||||
|
@ -150,7 +150,7 @@ class RigidBody : public CollisionBody {
|
|||
void setAngularVelocity(const Vector3& angularVelocity);
|
||||
|
||||
/// Set the variable to know whether or not the body is sleeping
|
||||
virtual void setIsSleeping(bool isSleeping);
|
||||
virtual void setIsSleeping(bool isSleeping) override;
|
||||
|
||||
/// Return the local inertia tensor of the body (in body coordinates)
|
||||
const Matrix3x3& getInertiaTensorLocal() const;
|
||||
|
@ -215,7 +215,7 @@ class RigidBody : public CollisionBody {
|
|||
decimal mass);
|
||||
|
||||
/// Remove a collision shape from the body
|
||||
virtual void removeCollisionShape(const ProxyShape* proxyShape);
|
||||
virtual void removeCollisionShape(const ProxyShape* proxyShape) override;
|
||||
|
||||
/// Recompute the center of mass, total mass and inertia tensor of the body using all
|
||||
/// the collision shapes attached to the body.
|
||||
|
|
|
@ -64,7 +64,7 @@ class TestCollisionBetweenShapesCallback : public NarrowPhaseCallback {
|
|||
|
||||
// Called by a narrow-phase collision algorithm when a new contact has been found
|
||||
virtual void notifyContact(OverlappingPair* overlappingPair,
|
||||
const ContactPointInfo& contactInfo);
|
||||
const ContactPointInfo& contactInfo) override;
|
||||
};
|
||||
|
||||
// Class CollisionDetection
|
||||
|
@ -220,7 +220,7 @@ class CollisionDetection : public NarrowPhaseCallback {
|
|||
MemoryAllocator& getWorldMemoryAllocator();
|
||||
|
||||
/// Called by a narrow-phase collision algorithm when a new contact has been found
|
||||
virtual void notifyContact(OverlappingPair* overlappingPair, const ContactPointInfo& contactInfo);
|
||||
virtual void notifyContact(OverlappingPair* overlappingPair, const ContactPointInfo& contactInfo) override;
|
||||
|
||||
/// Create a new contact
|
||||
void createContact(OverlappingPair* overlappingPair, const ContactPointInfo& contactInfo);
|
||||
|
|
|
@ -80,7 +80,7 @@ class AABBOverlapCallback : public DynamicAABBTreeOverlapCallback {
|
|||
|
||||
// Called when a overlapping node has been found during the call to
|
||||
// DynamicAABBTree:reportAllShapesOverlappingWithAABB()
|
||||
virtual void notifyOverlappingNode(int nodeId);
|
||||
virtual void notifyOverlappingNode(int nodeId) override;
|
||||
|
||||
};
|
||||
|
||||
|
@ -110,10 +110,10 @@ class BroadPhaseRaycastCallback : public DynamicAABBTreeRaycastCallback {
|
|||
}
|
||||
|
||||
// Destructor
|
||||
virtual ~BroadPhaseRaycastCallback() {}
|
||||
virtual ~BroadPhaseRaycastCallback() override {}
|
||||
|
||||
// Called for a broad-phase shape that has to be tested for raycast
|
||||
virtual decimal raycastBroadPhaseShape(int32 nodeId, const Ray& ray);
|
||||
virtual decimal raycastBroadPhaseShape(int32 nodeId, const Ray& ray) override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ class ConvexVsTriangleCallback : public TriangleCallback {
|
|||
public:
|
||||
|
||||
/// Destructor
|
||||
virtual ~ConvexVsTriangleCallback() {}
|
||||
virtual ~ConvexVsTriangleCallback() override {}
|
||||
|
||||
/// Set the collision detection pointer
|
||||
void setCollisionDetection(CollisionDetection* collisionDetection) {
|
||||
|
@ -107,7 +107,7 @@ class ConvexVsTriangleCallback : public TriangleCallback {
|
|||
}
|
||||
|
||||
/// Test collision between a triangle and the convex mesh shape
|
||||
virtual void testTriangle(const Vector3* trianglePoints);
|
||||
virtual void testTriangle(const Vector3* trianglePoints) override;
|
||||
};
|
||||
|
||||
// Class SmoothMeshContactInfo
|
||||
|
@ -172,7 +172,7 @@ class SmoothCollisionNarrowPhaseCallback : public NarrowPhaseCallback {
|
|||
|
||||
/// Called by a narrow-phase collision algorithm when a new contact has been found
|
||||
virtual void notifyContact(OverlappingPair* overlappingPair,
|
||||
const ContactPointInfo& contactInfo);
|
||||
const ContactPointInfo& contactInfo) override;
|
||||
|
||||
};
|
||||
|
||||
|
@ -218,12 +218,12 @@ class ConcaveVsConvexAlgorithm : public NarrowPhaseAlgorithm {
|
|||
ConcaveVsConvexAlgorithm();
|
||||
|
||||
/// Destructor
|
||||
virtual ~ConcaveVsConvexAlgorithm();
|
||||
virtual ~ConcaveVsConvexAlgorithm() override;
|
||||
|
||||
/// Compute a contact info if the two bounding volume collide
|
||||
virtual void testCollision(const CollisionShapeInfo& shape1Info,
|
||||
const CollisionShapeInfo& shape2Info,
|
||||
NarrowPhaseCallback* narrowPhaseCallback);
|
||||
NarrowPhaseCallback* narrowPhaseCallback) override;
|
||||
};
|
||||
|
||||
// Add a triangle vertex into the set of processed triangles
|
||||
|
|
|
@ -59,15 +59,15 @@ class DefaultCollisionDispatch : public CollisionDispatch {
|
|||
DefaultCollisionDispatch();
|
||||
|
||||
/// Destructor
|
||||
virtual ~DefaultCollisionDispatch();
|
||||
virtual ~DefaultCollisionDispatch() override;
|
||||
|
||||
/// Initialize the collision dispatch configuration
|
||||
virtual void init(CollisionDetection* collisionDetection,
|
||||
MemoryAllocator* memoryAllocator);
|
||||
MemoryAllocator* memoryAllocator) override;
|
||||
|
||||
/// Select and return the narrow-phase collision detection algorithm to
|
||||
/// use between two types of collision shapes.
|
||||
virtual NarrowPhaseAlgorithm* selectAlgorithm(int type1, int type2);
|
||||
virtual NarrowPhaseAlgorithm* selectAlgorithm(int type1, int type2) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -94,12 +94,12 @@ class GJKAlgorithm : public NarrowPhaseAlgorithm {
|
|||
|
||||
/// Initalize the algorithm
|
||||
virtual void init(CollisionDetection* collisionDetection,
|
||||
MemoryAllocator* memoryAllocator);
|
||||
MemoryAllocator* memoryAllocator) override;
|
||||
|
||||
/// Compute a contact info if the two bounding volumes collide.
|
||||
virtual void testCollision(const CollisionShapeInfo& shape1Info,
|
||||
const CollisionShapeInfo& shape2Info,
|
||||
NarrowPhaseCallback* narrowPhaseCallback);
|
||||
NarrowPhaseCallback* narrowPhaseCallback) override;
|
||||
|
||||
/// Use the GJK Algorithm to find if a point is inside a convex collision shape
|
||||
bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape);
|
||||
|
|
|
@ -52,7 +52,7 @@ class SphereVsSphereAlgorithm : public NarrowPhaseAlgorithm {
|
|||
SphereVsSphereAlgorithm();
|
||||
|
||||
/// Destructor
|
||||
virtual ~SphereVsSphereAlgorithm();
|
||||
virtual ~SphereVsSphereAlgorithm() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
SphereVsSphereAlgorithm(const SphereVsSphereAlgorithm& algorithm) = delete;
|
||||
|
@ -63,7 +63,7 @@ class SphereVsSphereAlgorithm : public NarrowPhaseAlgorithm {
|
|||
/// Compute a contact info if the two bounding volume collide
|
||||
virtual void testCollision(const CollisionShapeInfo& shape1Info,
|
||||
const CollisionShapeInfo& shape2Info,
|
||||
NarrowPhaseCallback* narrowPhaseCallback);
|
||||
NarrowPhaseCallback* narrowPhaseCallback) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -63,16 +63,16 @@ class BoxShape : public ConvexShape {
|
|||
|
||||
/// Return a local support point in a given direction without the object margin
|
||||
virtual Vector3 getLocalSupportPointWithoutMargin(const Vector3& direction,
|
||||
void** cachedCollisionData) const;
|
||||
void** cachedCollisionData) const override;
|
||||
|
||||
/// Return true if a point is inside the collision shape
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const;
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -82,7 +82,7 @@ class BoxShape : public ConvexShape {
|
|||
BoxShape(const Vector3& extent, decimal margin = OBJECT_MARGIN);
|
||||
|
||||
/// Destructor
|
||||
virtual ~BoxShape();
|
||||
virtual ~BoxShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
BoxShape(const BoxShape& shape) = delete;
|
||||
|
@ -94,13 +94,13 @@ class BoxShape : public ConvexShape {
|
|||
Vector3 getExtent() const;
|
||||
|
||||
/// Set the scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
};
|
||||
|
||||
// Return the extents of the box
|
||||
|
|
|
@ -57,13 +57,13 @@ class CapsuleShape : public ConvexShape {
|
|||
|
||||
/// Return a local support point in a given direction without the object margin
|
||||
virtual Vector3 getLocalSupportPointWithoutMargin(const Vector3& direction,
|
||||
void** cachedCollisionData) const;
|
||||
void** cachedCollisionData) const override;
|
||||
|
||||
/// Return true if a point is inside the collision shape
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const;
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Raycasting method between a ray one of the two spheres end cap of the capsule
|
||||
bool raycastWithSphereEndCap(const Vector3& point1, const Vector3& point2,
|
||||
|
@ -71,7 +71,7 @@ class CapsuleShape : public ConvexShape {
|
|||
Vector3& hitLocalPoint, decimal& hitFraction) const;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -81,7 +81,7 @@ class CapsuleShape : public ConvexShape {
|
|||
CapsuleShape(decimal radius, decimal height);
|
||||
|
||||
/// Destructor
|
||||
virtual ~CapsuleShape();
|
||||
virtual ~CapsuleShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
CapsuleShape(const CapsuleShape& shape) = delete;
|
||||
|
@ -96,13 +96,13 @@ class CapsuleShape : public ConvexShape {
|
|||
decimal getHeight() const;
|
||||
|
||||
/// Set the scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
};
|
||||
|
||||
// Get the radius of the capsule
|
||||
|
|
|
@ -61,7 +61,7 @@ class ConvexTriangleAABBOverlapCallback : public DynamicAABBTreeOverlapCallback
|
|||
|
||||
// Called when a overlapping node has been found during the call to
|
||||
// DynamicAABBTree:reportAllShapesOverlappingWithAABB()
|
||||
virtual void notifyOverlappingNode(int nodeId);
|
||||
virtual void notifyOverlappingNode(int nodeId) override;
|
||||
|
||||
};
|
||||
|
||||
|
@ -89,7 +89,7 @@ class ConcaveMeshRaycastCallback : public DynamicAABBTreeRaycastCallback {
|
|||
}
|
||||
|
||||
/// Collect all the AABB nodes that are hit by the ray in the Dynamic AABB Tree
|
||||
virtual decimal raycastBroadPhaseShape(int32 nodeId, const Ray& ray);
|
||||
virtual decimal raycastBroadPhaseShape(int32 nodeId, const Ray& ray) override;
|
||||
|
||||
/// Raycast all collision shapes that have been collected
|
||||
void raycastTriangles();
|
||||
|
@ -121,10 +121,10 @@ class ConcaveMeshShape : public ConcaveShape {
|
|||
// -------------------- Methods -------------------- //
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
/// Insert all the triangles into the dynamic AABB tree
|
||||
void initBVHTree();
|
||||
|
@ -149,16 +149,16 @@ class ConcaveMeshShape : public ConcaveShape {
|
|||
ConcaveMeshShape& operator=(const ConcaveMeshShape& shape) = delete;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions.
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Set the local scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
|
||||
/// Use a callback method on all triangles of the concave shape inside a given AABB
|
||||
virtual void testAllTriangles(TriangleCallback& callback, const AABB& localAABB) const;
|
||||
virtual void testAllTriangles(TriangleCallback& callback, const AABB& localAABB) const override;
|
||||
|
||||
// ---------- Friendship ----------- //
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ class ConcaveShape : public CollisionShape {
|
|||
// -------------------- Methods -------------------- //
|
||||
|
||||
/// Return true if a point is inside the collision shape
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const;
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -84,7 +84,7 @@ class ConcaveShape : public CollisionShape {
|
|||
ConcaveShape(CollisionShapeType type);
|
||||
|
||||
/// Destructor
|
||||
virtual ~ConcaveShape();
|
||||
virtual ~ConcaveShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
ConcaveShape(const ConcaveShape& shape) = delete;
|
||||
|
@ -102,7 +102,7 @@ class ConcaveShape : public CollisionShape {
|
|||
void setRaycastTestType(TriangleRaycastSide testType);
|
||||
|
||||
/// Return true if the collision shape is convex, false if it is concave
|
||||
virtual bool isConvex() const;
|
||||
virtual bool isConvex() const override;
|
||||
|
||||
/// Use a callback method on all triangles of the concave shape inside a given AABB
|
||||
virtual void testAllTriangles(TriangleCallback& callback, const AABB& localAABB) const=0;
|
||||
|
|
|
@ -68,16 +68,16 @@ class ConeShape : public ConvexShape {
|
|||
|
||||
/// Return a local support point in a given direction without the object margin
|
||||
virtual Vector3 getLocalSupportPointWithoutMargin(const Vector3& direction,
|
||||
void** cachedCollisionData) const;
|
||||
void** cachedCollisionData) const override;
|
||||
|
||||
/// Return true if a point is inside the collision shape
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const;
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -87,7 +87,7 @@ class ConeShape : public ConvexShape {
|
|||
ConeShape(decimal mRadius, decimal height, decimal margin = OBJECT_MARGIN);
|
||||
|
||||
/// Destructor
|
||||
virtual ~ConeShape();
|
||||
virtual ~ConeShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
ConeShape(const ConeShape& shape) = delete;
|
||||
|
@ -102,13 +102,13 @@ class ConeShape : public ConvexShape {
|
|||
decimal getHeight() const;
|
||||
|
||||
/// Set the scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
};
|
||||
|
||||
// Return the radius
|
||||
|
|
|
@ -89,20 +89,20 @@ class ConvexMeshShape : public ConvexShape {
|
|||
void recalculateBounds();
|
||||
|
||||
/// Set the scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return a local support point in a given direction without the object margin.
|
||||
virtual Vector3 getLocalSupportPointWithoutMargin(const Vector3& direction,
|
||||
void** cachedCollisionData) const;
|
||||
void** cachedCollisionData) const override;
|
||||
|
||||
/// Return true if a point is inside the collision shape
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const;
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -120,7 +120,7 @@ class ConvexMeshShape : public ConvexShape {
|
|||
ConvexMeshShape(decimal margin = OBJECT_MARGIN);
|
||||
|
||||
/// Destructor
|
||||
virtual ~ConvexMeshShape();
|
||||
virtual ~ConvexMeshShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
ConvexMeshShape(const ConvexMeshShape& shape) = delete;
|
||||
|
@ -129,10 +129,10 @@ class ConvexMeshShape : public ConvexShape {
|
|||
ConvexMeshShape& operator=(const ConvexMeshShape& shape) = delete;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape.
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
|
||||
/// Add a vertex into the convex mesh
|
||||
void addVertex(const Vector3& vertex);
|
||||
|
|
|
@ -67,7 +67,7 @@ class ConvexShape : public CollisionShape {
|
|||
ConvexShape(CollisionShapeType type, decimal margin);
|
||||
|
||||
/// Destructor
|
||||
virtual ~ConvexShape();
|
||||
virtual ~ConvexShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
ConvexShape(const ConvexShape& shape) = delete;
|
||||
|
@ -79,7 +79,7 @@ class ConvexShape : public CollisionShape {
|
|||
decimal getMargin() const;
|
||||
|
||||
/// Return true if the collision shape is convex, false if it is concave
|
||||
virtual bool isConvex() const;
|
||||
virtual bool isConvex() const override;
|
||||
|
||||
// -------------------- Friendship -------------------- //
|
||||
|
||||
|
|
|
@ -65,16 +65,16 @@ class CylinderShape : public ConvexShape {
|
|||
|
||||
/// Return a local support point in a given direction without the object margin
|
||||
virtual Vector3 getLocalSupportPointWithoutMargin(const Vector3& direction,
|
||||
void** cachedCollisionData) const;
|
||||
void** cachedCollisionData) const override;
|
||||
|
||||
/// Return true if a point is inside the collision shape
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const;
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override ;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -84,7 +84,7 @@ class CylinderShape : public ConvexShape {
|
|||
CylinderShape(decimal radius, decimal height, decimal margin = OBJECT_MARGIN);
|
||||
|
||||
/// Destructor
|
||||
virtual ~CylinderShape();
|
||||
virtual ~CylinderShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
CylinderShape(const CylinderShape& shape) = delete;
|
||||
|
@ -99,13 +99,13 @@ class CylinderShape : public ConvexShape {
|
|||
decimal getHeight() const;
|
||||
|
||||
/// Set the scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
};
|
||||
|
||||
// Return the radius
|
||||
|
|
|
@ -64,7 +64,7 @@ class TriangleOverlapCallback : public TriangleCallback {
|
|||
bool getIsHit() const {return mIsHit;}
|
||||
|
||||
/// Raycast test between a ray and a triangle of the heightfield
|
||||
virtual void testTriangle(const Vector3* trianglePoints);
|
||||
virtual void testTriangle(const Vector3* trianglePoints) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -126,10 +126,10 @@ class HeightFieldShape : public ConcaveShape {
|
|||
// -------------------- Methods -------------------- //
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
/// Insert all the triangles into the dynamic AABB tree
|
||||
void initBVHTree();
|
||||
|
@ -159,7 +159,7 @@ class HeightFieldShape : public ConcaveShape {
|
|||
int upAxis = 1, decimal integerHeightScale = 1.0f);
|
||||
|
||||
/// Destructor
|
||||
virtual ~HeightFieldShape();
|
||||
virtual ~HeightFieldShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
HeightFieldShape(const HeightFieldShape& shape) = delete;
|
||||
|
@ -177,16 +177,16 @@ class HeightFieldShape : public ConcaveShape {
|
|||
HeightDataType getHeightDataType() const;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions.
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Set the local scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
|
||||
/// Use a callback method on all triangles of the concave shape inside a given AABB
|
||||
virtual void testAllTriangles(TriangleCallback& callback, const AABB& localAABB) const;
|
||||
virtual void testAllTriangles(TriangleCallback& callback, const AABB& localAABB) const override;
|
||||
|
||||
// ---------- Friendship ----------- //
|
||||
|
||||
|
|
|
@ -53,16 +53,16 @@ class SphereShape : public ConvexShape {
|
|||
|
||||
/// Return a local support point in a given direction without the object margin
|
||||
virtual Vector3 getLocalSupportPointWithoutMargin(const Vector3& direction,
|
||||
void** cachedCollisionData) const;
|
||||
void** cachedCollisionData) const override;
|
||||
|
||||
/// Return true if a point is inside the collision shape
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const;
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -72,7 +72,7 @@ class SphereShape : public ConvexShape {
|
|||
SphereShape(decimal radius);
|
||||
|
||||
/// Destructor
|
||||
virtual ~SphereShape();
|
||||
virtual ~SphereShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
SphereShape(const SphereShape& shape) = delete;
|
||||
|
@ -84,16 +84,16 @@ class SphereShape : public ConvexShape {
|
|||
decimal getRadius() const;
|
||||
|
||||
/// Set the scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions.
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
|
||||
/// Update the AABB of a body using its collision shape
|
||||
virtual void computeAABB(AABB& aabb, const Transform& transform) const;
|
||||
virtual void computeAABB(AABB& aabb, const Transform& transform) const override;
|
||||
};
|
||||
|
||||
// Get the radius of the sphere
|
||||
|
|
|
@ -67,16 +67,16 @@ class TriangleShape : public ConvexShape {
|
|||
|
||||
/// Return a local support point in a given direction without the object margin
|
||||
virtual Vector3 getLocalSupportPointWithoutMargin(const Vector3& direction,
|
||||
void** cachedCollisionData) const;
|
||||
void** cachedCollisionData) const override;
|
||||
|
||||
/// Return true if a point is inside the collision shape
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const;
|
||||
virtual bool testPointInside(const Vector3& localPoint, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Raycast method with feedback information
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const;
|
||||
virtual bool raycast(const Ray& ray, RaycastInfo& raycastInfo, ProxyShape* proxyShape) const override;
|
||||
|
||||
/// Return the number of bytes used by the collision shape
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -87,7 +87,7 @@ class TriangleShape : public ConvexShape {
|
|||
decimal margin = OBJECT_MARGIN);
|
||||
|
||||
/// Destructor
|
||||
virtual ~TriangleShape();
|
||||
virtual ~TriangleShape() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
TriangleShape(const TriangleShape& shape) = delete;
|
||||
|
@ -96,16 +96,16 @@ class TriangleShape : public ConvexShape {
|
|||
TriangleShape& operator=(const TriangleShape& shape) = delete;
|
||||
|
||||
/// Return the local bounds of the shape in x, y and z directions.
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const;
|
||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||
|
||||
/// Set the local scaling vector of the collision shape
|
||||
virtual void setLocalScaling(const Vector3& scaling);
|
||||
virtual void setLocalScaling(const Vector3& scaling) override;
|
||||
|
||||
/// Return the local inertia tensor of the collision shape
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const;
|
||||
virtual void computeLocalInertiaTensor(Matrix3x3& tensor, decimal mass) const override;
|
||||
|
||||
/// Update the AABB of a body using its collision shape
|
||||
virtual void computeAABB(AABB& aabb, const Transform& transform) const;
|
||||
virtual void computeAABB(AABB& aabb, const Transform& transform) const override;
|
||||
|
||||
/// Return the raycast test type (front, back, front-back)
|
||||
TriangleRaycastSide getRaycastTestType() const;
|
||||
|
|
|
@ -106,19 +106,19 @@ class BallAndSocketJoint : public Joint {
|
|||
// -------------------- Methods -------------------- //
|
||||
|
||||
/// Return the number of bytes used by the joint
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
/// Initialize before solving the constraint
|
||||
virtual void initBeforeSolve(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void initBeforeSolve(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Warm start the constraint (apply the previous impulse at the beginning of the step)
|
||||
virtual void warmstart(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void warmstart(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Solve the velocity constraint
|
||||
virtual void solveVelocityConstraint(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void solveVelocityConstraint(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Solve the position constraint (for position error correction)
|
||||
virtual void solvePositionConstraint(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void solvePositionConstraint(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -128,7 +128,7 @@ class BallAndSocketJoint : public Joint {
|
|||
BallAndSocketJoint(const BallAndSocketJointInfo& jointInfo);
|
||||
|
||||
/// Destructor
|
||||
virtual ~BallAndSocketJoint();
|
||||
virtual ~BallAndSocketJoint() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
BallAndSocketJoint(const BallAndSocketJoint& constraint) = delete;
|
||||
|
|
|
@ -117,19 +117,19 @@ class FixedJoint : public Joint {
|
|||
// -------------------- Methods -------------------- //
|
||||
|
||||
/// Return the number of bytes used by the joint
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
/// Initialize before solving the constraint
|
||||
virtual void initBeforeSolve(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void initBeforeSolve(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Warm start the constraint (apply the previous impulse at the beginning of the step)
|
||||
virtual void warmstart(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void warmstart(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Solve the velocity constraint
|
||||
virtual void solveVelocityConstraint(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void solveVelocityConstraint(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Solve the position constraint (for position error correction)
|
||||
virtual void solvePositionConstraint(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void solvePositionConstraint(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -139,7 +139,7 @@ class FixedJoint : public Joint {
|
|||
FixedJoint(const FixedJointInfo& jointInfo);
|
||||
|
||||
/// Destructor
|
||||
virtual ~FixedJoint();
|
||||
virtual ~FixedJoint() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
FixedJoint(const FixedJoint& constraint) = delete;
|
||||
|
|
|
@ -268,19 +268,19 @@ class HingeJoint : public Joint {
|
|||
const Quaternion& orientationBody2);
|
||||
|
||||
/// Return the number of bytes used by the joint
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
/// Initialize before solving the constraint
|
||||
virtual void initBeforeSolve(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void initBeforeSolve(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Warm start the constraint (apply the previous impulse at the beginning of the step)
|
||||
virtual void warmstart(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void warmstart(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Solve the velocity constraint
|
||||
virtual void solveVelocityConstraint(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void solveVelocityConstraint(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Solve the position constraint (for position error correction)
|
||||
virtual void solvePositionConstraint(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void solvePositionConstraint(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -290,7 +290,7 @@ class HingeJoint : public Joint {
|
|||
HingeJoint(const HingeJointInfo& jointInfo);
|
||||
|
||||
/// Destructor
|
||||
virtual ~HingeJoint();
|
||||
virtual ~HingeJoint() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
HingeJoint(const HingeJoint& constraint) = delete;
|
||||
|
|
|
@ -266,19 +266,19 @@ class SliderJoint : public Joint {
|
|||
void resetLimits();
|
||||
|
||||
/// Return the number of bytes used by the joint
|
||||
virtual size_t getSizeInBytes() const;
|
||||
virtual size_t getSizeInBytes() const override;
|
||||
|
||||
/// Initialize before solving the constraint
|
||||
virtual void initBeforeSolve(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void initBeforeSolve(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Warm start the constraint (apply the previous impulse at the beginning of the step)
|
||||
virtual void warmstart(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void warmstart(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Solve the velocity constraint
|
||||
virtual void solveVelocityConstraint(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void solveVelocityConstraint(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
/// Solve the position constraint (for position error correction)
|
||||
virtual void solvePositionConstraint(const ConstraintSolverData& constraintSolverData);
|
||||
virtual void solvePositionConstraint(const ConstraintSolverData& constraintSolverData) override;
|
||||
|
||||
public :
|
||||
|
||||
|
@ -288,7 +288,7 @@ class SliderJoint : public Joint {
|
|||
SliderJoint(const SliderJointInfo& jointInfo);
|
||||
|
||||
/// Destructor
|
||||
virtual ~SliderJoint();
|
||||
virtual ~SliderJoint() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
SliderJoint(const SliderJoint& constraint) = delete;
|
||||
|
|
|
@ -178,7 +178,7 @@ class DynamicsWorld : public CollisionWorld {
|
|||
DynamicsWorld(const Vector3& mGravity);
|
||||
|
||||
/// Destructor
|
||||
virtual ~DynamicsWorld();
|
||||
virtual ~DynamicsWorld() override;
|
||||
|
||||
/// Deleted copy-constructor
|
||||
DynamicsWorld(const DynamicsWorld& world) = delete;
|
||||
|
@ -277,25 +277,25 @@ class DynamicsWorld : public CollisionWorld {
|
|||
/// Test and report collisions between a given shape and all the others
|
||||
/// shapes of the world
|
||||
virtual void testCollision(const ProxyShape* shape,
|
||||
CollisionCallback* callback);
|
||||
CollisionCallback* callback) override;
|
||||
|
||||
/// Test and report collisions between two given shapes
|
||||
virtual void testCollision(const ProxyShape* shape1,
|
||||
const ProxyShape* shape2,
|
||||
CollisionCallback* callback);
|
||||
CollisionCallback* callback) override;
|
||||
|
||||
/// Test and report collisions between a body and all
|
||||
/// the others bodies of the world
|
||||
virtual void testCollision(const CollisionBody* body,
|
||||
CollisionCallback* callback);
|
||||
CollisionCallback* callback) override;
|
||||
|
||||
/// Test and report collisions between two bodies
|
||||
virtual void testCollision(const CollisionBody* body1,
|
||||
const CollisionBody* body2,
|
||||
CollisionCallback* callback);
|
||||
CollisionCallback* callback) override;
|
||||
|
||||
/// Test and report collisions between all shapes of the world
|
||||
virtual void testCollision(CollisionCallback* callback);
|
||||
virtual void testCollision(CollisionCallback* callback) override;
|
||||
|
||||
/// Return the list of all contacts of the world
|
||||
std::vector<const ContactManifold*> getContactsList() const;
|
||||
|
|
|
@ -63,7 +63,7 @@ class Matrix3x3 {
|
|||
decimal c1, decimal c2, decimal c3);
|
||||
|
||||
/// Destructor
|
||||
virtual ~Matrix3x3();
|
||||
~Matrix3x3();
|
||||
|
||||
/// Copy-constructor
|
||||
Matrix3x3(const Matrix3x3& matrix);
|
||||
|
|
|
@ -70,7 +70,7 @@ class WorldCollisionCallback : public CollisionCallback
|
|||
}
|
||||
|
||||
// This method will be called for contact
|
||||
virtual void notifyContact(const ContactPointInfo& contactPointInfo) {
|
||||
virtual void notifyContact(const ContactPointInfo& contactPointInfo) override {
|
||||
|
||||
if (isContactBetweenBodies(boxBody, sphere1Body, contactPointInfo)) {
|
||||
boxCollideWithSphere1 = true;
|
||||
|
|
|
@ -42,7 +42,7 @@ class OverlapCallback : public DynamicAABBTreeOverlapCallback {
|
|||
|
||||
// Called when a overlapping node has been found during the call to
|
||||
// DynamicAABBTree:reportAllShapesOverlappingWithAABB()
|
||||
virtual void notifyOverlappingNode(int nodeId) {
|
||||
virtual void notifyOverlappingNode(int nodeId) override {
|
||||
mOverlapNodes.push_back(nodeId);
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ class DynamicTreeRaycastCallback : public DynamicAABBTreeRaycastCallback {
|
|||
std::vector<int> mHitNodes;
|
||||
|
||||
// Called when the AABB of a leaf node is hit by a ray
|
||||
virtual decimal raycastBroadPhaseShape(int32 nodeId, const Ray& ray) {
|
||||
virtual decimal raycastBroadPhaseShape(int32 nodeId, const Ray& ray) override {
|
||||
mHitNodes.push_back(nodeId);
|
||||
return 1.0;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ class WorldRaycastCallback : public RaycastCallback {
|
|||
shapeToTest = nullptr;
|
||||
}
|
||||
|
||||
virtual decimal notifyRaycastHit(const RaycastInfo& info) {
|
||||
virtual decimal notifyRaycastHit(const RaycastInfo& info) override {
|
||||
|
||||
if (shapeToTest->getBody()->getID() == info.body->getID()) {
|
||||
raycastInfo.body = info.body;
|
||||
|
|
|
@ -92,7 +92,7 @@ class Box : public openglframework::Object3D, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -101,7 +101,7 @@ class Capsule : public openglframework::Mesh, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -94,7 +94,7 @@ class ConcaveMesh : public openglframework::Mesh, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -100,7 +100,7 @@ class Cone : public openglframework::Mesh, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -93,7 +93,7 @@ class ConvexMesh : public openglframework::Mesh, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -100,7 +100,7 @@ class Cylinder : public openglframework::Mesh, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -101,7 +101,7 @@ class Dumbbell : public openglframework::Mesh, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -107,7 +107,7 @@ class HeightField : public openglframework::Mesh, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -97,7 +97,7 @@ class Sphere : public openglframework::Mesh, public PhysicsObject {
|
|||
void resetTransform(const rp3d::Transform& transform);
|
||||
|
||||
/// Update the transform matrix of the object
|
||||
virtual void updateTransform(float interpolationFactor);
|
||||
virtual void updateTransform(float interpolationFactor) override;
|
||||
|
||||
/// Set the scaling of the object
|
||||
void setScaling(const openglframework::Vector3& scaling);
|
||||
|
|
|
@ -106,24 +106,24 @@ class CollisionShapesScene : public SceneDemo {
|
|||
CollisionShapesScene(const std::string& name);
|
||||
|
||||
/// Destructor
|
||||
virtual ~CollisionShapesScene();
|
||||
virtual ~CollisionShapesScene() override;
|
||||
|
||||
/// Update the physics world (take a simulation step)
|
||||
/// Can be called several times per frame
|
||||
virtual void updatePhysics();
|
||||
virtual void updatePhysics() override;
|
||||
|
||||
/// Take a step for the simulation
|
||||
virtual void update();
|
||||
virtual void update() override;
|
||||
|
||||
/// Render the scene in a single pass
|
||||
virtual void renderSinglePass(openglframework::Shader& shader,
|
||||
const openglframework::Matrix4& worldToCameraMatrix);
|
||||
const openglframework::Matrix4& worldToCameraMatrix) override;
|
||||
|
||||
/// Reset the scene
|
||||
virtual void reset();
|
||||
virtual void reset() override;
|
||||
|
||||
/// Return all the contact points of the scene
|
||||
virtual std::vector<ContactPoint> getContactPoints() const;
|
||||
virtual std::vector<ContactPoint> getContactPoints() const override;
|
||||
};
|
||||
|
||||
// Return all the contact points of the scene
|
||||
|
|
|
@ -66,24 +66,24 @@ class ConcaveMeshScene : public SceneDemo {
|
|||
ConcaveMeshScene(const std::string& name);
|
||||
|
||||
/// Destructor
|
||||
virtual ~ConcaveMeshScene();
|
||||
virtual ~ConcaveMeshScene() override;
|
||||
|
||||
/// Update the physics world (take a simulation step)
|
||||
/// Can be called several times per frame
|
||||
virtual void updatePhysics();
|
||||
virtual void updatePhysics() override;
|
||||
|
||||
/// Update the scene (take a simulation step)
|
||||
virtual void update();
|
||||
virtual void update() override;
|
||||
|
||||
/// Render the scene in a single pass
|
||||
virtual void renderSinglePass(openglframework::Shader& shader,
|
||||
const openglframework::Matrix4& worldToCameraMatrix);
|
||||
const openglframework::Matrix4& worldToCameraMatrix) override;
|
||||
|
||||
/// Reset the scene
|
||||
virtual void reset();
|
||||
virtual void reset() override;
|
||||
|
||||
/// Return all the contact points of the scene
|
||||
virtual std::vector<ContactPoint> getContactPoints() const;
|
||||
virtual std::vector<ContactPoint> getContactPoints() const override;
|
||||
};
|
||||
|
||||
// Return all the contact points of the scene
|
||||
|
|
|
@ -66,24 +66,24 @@ class CubesScene : public SceneDemo {
|
|||
CubesScene(const std::string& name);
|
||||
|
||||
/// Destructor
|
||||
virtual ~CubesScene();
|
||||
virtual ~CubesScene() override;
|
||||
|
||||
/// Update the physics world (take a simulation step)
|
||||
/// Can be called several times per frame
|
||||
virtual void updatePhysics();
|
||||
virtual void updatePhysics() override;
|
||||
|
||||
/// Update the scene (take a simulation step)
|
||||
virtual void update();
|
||||
virtual void update() override;
|
||||
|
||||
/// Render the scene in a single pass
|
||||
virtual void renderSinglePass(openglframework::Shader& shader,
|
||||
const openglframework::Matrix4& worldToCameraMatrix);
|
||||
const openglframework::Matrix4& worldToCameraMatrix) override;
|
||||
|
||||
/// Reset the scene
|
||||
virtual void reset();
|
||||
virtual void reset() override;
|
||||
|
||||
/// Return all the contact points of the scene
|
||||
virtual std::vector<ContactPoint> getContactPoints() const;
|
||||
virtual std::vector<ContactPoint> getContactPoints() const override;
|
||||
};
|
||||
|
||||
// Return all the contact points of the scene
|
||||
|
|
|
@ -63,24 +63,24 @@ class HeightFieldScene : public SceneDemo {
|
|||
HeightFieldScene(const std::string& name);
|
||||
|
||||
/// Destructor
|
||||
virtual ~HeightFieldScene();
|
||||
virtual ~HeightFieldScene() override;
|
||||
|
||||
/// Update the physics world (take a simulation step)
|
||||
/// Can be called several times per frame
|
||||
virtual void updatePhysics();
|
||||
virtual void updatePhysics() override;
|
||||
|
||||
/// Update the scene (take a simulation step)
|
||||
virtual void update();
|
||||
virtual void update() override;
|
||||
|
||||
/// Render the scene in a single pass
|
||||
virtual void renderSinglePass(openglframework::Shader& shader,
|
||||
const openglframework::Matrix4& worldToCameraMatrix);
|
||||
const openglframework::Matrix4& worldToCameraMatrix) override ;
|
||||
|
||||
/// Reset the scene
|
||||
virtual void reset();
|
||||
virtual void reset() override ;
|
||||
|
||||
/// Return all the contact points of the scene
|
||||
virtual std::vector<ContactPoint> getContactPoints() const;
|
||||
virtual std::vector<ContactPoint> getContactPoints() const override ;
|
||||
};
|
||||
|
||||
// Return all the contact points of the scene
|
||||
|
|
|
@ -120,24 +120,24 @@ class JointsScene : public SceneDemo {
|
|||
JointsScene(const std::string& name);
|
||||
|
||||
/// Destructor
|
||||
virtual ~JointsScene();
|
||||
virtual ~JointsScene() override ;
|
||||
|
||||
/// Update the physics world (take a simulation step)
|
||||
/// Can be called several times per frame
|
||||
virtual void updatePhysics();
|
||||
virtual void updatePhysics() override;
|
||||
|
||||
/// Take a step for the simulation
|
||||
virtual void update();
|
||||
virtual void update() override;
|
||||
|
||||
/// Render the scene in a single pass
|
||||
virtual void renderSinglePass(openglframework::Shader& shader,
|
||||
const openglframework::Matrix4& worldToCameraMatrix);
|
||||
const openglframework::Matrix4& worldToCameraMatrix) override;
|
||||
|
||||
/// Reset the scene
|
||||
virtual void reset();
|
||||
virtual void reset() override;
|
||||
|
||||
/// Return all the contact points of the scene
|
||||
virtual std::vector<ContactPoint> getContactPoints() const;
|
||||
virtual std::vector<ContactPoint> getContactPoints() const override;
|
||||
};
|
||||
|
||||
// Return all the contact points of the scene
|
||||
|
|
|
@ -83,7 +83,7 @@ class RaycastManager : public rp3d::RaycastCallback {
|
|||
|
||||
}
|
||||
|
||||
virtual rp3d::decimal notifyRaycastHit(const rp3d::RaycastInfo& raycastInfo) {
|
||||
virtual rp3d::decimal notifyRaycastHit(const rp3d::RaycastInfo& raycastInfo) override {
|
||||
rp3d::Vector3 hitPos = raycastInfo.worldPoint;
|
||||
openglframework::Vector3 position(hitPos.x, hitPos.y, hitPos.z);
|
||||
mHitPoints.push_back(ContactPoint(position));
|
||||
|
@ -176,21 +176,21 @@ class RaycastScene : public SceneDemo {
|
|||
RaycastScene(const std::string& name);
|
||||
|
||||
/// Destructor
|
||||
virtual ~RaycastScene();
|
||||
virtual ~RaycastScene() override;
|
||||
|
||||
/// Update the physics world (take a simulation step)
|
||||
/// Can be called several times per frame
|
||||
virtual void updatePhysics();
|
||||
virtual void updatePhysics() override;
|
||||
|
||||
/// Take a step for the simulation
|
||||
virtual void update();
|
||||
virtual void update() override;
|
||||
|
||||
/// Render the scene in a single pass
|
||||
virtual void renderSinglePass(openglframework::Shader& shader,
|
||||
const openglframework::Matrix4& worldToCameraMatrix);
|
||||
const openglframework::Matrix4& worldToCameraMatrix) override;
|
||||
|
||||
/// Reset the scene
|
||||
virtual void reset();
|
||||
virtual void reset() override;
|
||||
|
||||
/// Change the body to raycast
|
||||
void changeBody();
|
||||
|
@ -199,16 +199,16 @@ class RaycastScene : public SceneDemo {
|
|||
void showHideNormals();
|
||||
|
||||
/// Called when a keyboard event occurs
|
||||
virtual bool keyboardEvent(int key, int scancode, int action, int mods);
|
||||
virtual bool keyboardEvent(int key, int scancode, int action, int mods) override;
|
||||
|
||||
/// Enabled/Disable the shadow mapping
|
||||
void virtual setIsShadowMappingEnabled(bool isShadowMappingEnabled);
|
||||
virtual void setIsShadowMappingEnabled(bool isShadowMappingEnabled) override;
|
||||
|
||||
/// Display/Hide the contact points
|
||||
void virtual setIsContactPointsDisplayed(bool display);
|
||||
virtual void setIsContactPointsDisplayed(bool display) override;
|
||||
|
||||
/// Return all the contact points of the scene
|
||||
virtual std::vector<ContactPoint> getContactPoints() const;
|
||||
virtual std::vector<ContactPoint> getContactPoints() const override;
|
||||
};
|
||||
|
||||
// Display or not the surface normals at hit points
|
||||
|
|
|
@ -120,20 +120,20 @@ class SceneDemo : public Scene {
|
|||
SceneDemo(const std::string& name, float sceneRadius, bool isShadowMappingEnabled = true);
|
||||
|
||||
/// Destructor
|
||||
virtual ~SceneDemo();
|
||||
virtual ~SceneDemo() override;
|
||||
|
||||
/// Update the scene
|
||||
virtual void update();
|
||||
virtual void update() override;
|
||||
|
||||
/// Render the scene (possibly in multiple passes for shadow mapping)
|
||||
virtual void render();
|
||||
virtual void render() override;
|
||||
|
||||
/// Render the scene in a single pass
|
||||
virtual void renderSinglePass(openglframework::Shader& shader,
|
||||
const openglframework::Matrix4& worldToCameraMatrix)=0;
|
||||
const openglframework::Matrix4& worldToCameraMatrix)=0 ;
|
||||
|
||||
/// Enabled/Disable the shadow mapping
|
||||
void virtual setIsShadowMappingEnabled(bool isShadowMappingEnabled);
|
||||
virtual void setIsShadowMappingEnabled(bool isShadowMappingEnabled) override;
|
||||
|
||||
/// Return all the contact points of the scene
|
||||
std::vector<ContactPoint> computeContactPointsOfWorld(const rp3d::DynamicsWorld* world) const;
|
||||
|
|
|
@ -173,25 +173,25 @@ class TestbedApplication : public Screen {
|
|||
TestbedApplication(bool isFullscreen);
|
||||
|
||||
/// Destructor
|
||||
virtual ~TestbedApplication();
|
||||
virtual ~TestbedApplication() override;
|
||||
|
||||
/// Render the content of the application
|
||||
virtual void drawContents();
|
||||
virtual void drawContents() override;
|
||||
|
||||
/// Window resize event handler
|
||||
virtual bool resizeEvent(const Vector2i& size);
|
||||
virtual bool resizeEvent(const Vector2i& size) override;
|
||||
|
||||
/// Default keyboard event handler
|
||||
virtual bool keyboardEvent(int key, int scancode, int action, int modifiers);
|
||||
virtual bool keyboardEvent(int key, int scancode, int action, int modifiers) override;
|
||||
|
||||
/// Handle a mouse button event (default implementation: propagate to children)
|
||||
virtual bool mouseButtonEvent(const Vector2i &p, int button, bool down, int modifiers);
|
||||
virtual bool mouseButtonEvent(const Vector2i &p, int button, bool down, int modifiers) override;
|
||||
|
||||
/// Handle a mouse motion event (default implementation: propagate to children)
|
||||
virtual bool mouseMotionEvent(const Vector2i &p, const Vector2i &rel, int button, int modifiers);
|
||||
virtual bool mouseMotionEvent(const Vector2i &p, const Vector2i &rel, int button, int modifiers) override;
|
||||
|
||||
/// Handle a mouse scroll event (default implementation: propagate to children)
|
||||
virtual bool scrollEvent(const Vector2i &p, const Vector2f &rel);
|
||||
virtual bool scrollEvent(const Vector2i &p, const Vector2f &rel) override;
|
||||
|
||||
/// Initialize the application
|
||||
void init();
|
||||
|
|
|
@ -80,7 +80,7 @@ class Timer {
|
|||
Timer();
|
||||
|
||||
/// Destructor
|
||||
virtual ~Timer();
|
||||
~Timer();
|
||||
|
||||
/// Return the current time of the physics engine
|
||||
long double getPhysicsTime() const;
|
||||
|
|
Loading…
Reference in New Issue
Block a user