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