comment out each unused parameter
Signed-off-by: DNKpp <DNKpp2011@gmail.com>
This commit is contained in:
parent
f8975140b0
commit
165097a161
@ -185,7 +185,7 @@ inline Vector3 BoxShape::getLocalSupportPointWithoutMargin(const Vector3& direct
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return true if a point is inside the collision shape
|
// Return true if a point is inside the collision shape
|
||||||
inline bool BoxShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
|
inline bool BoxShape::testPointInside(const Vector3& localPoint, Collider* /*collider*/) const {
|
||||||
return (localPoint.x < mHalfExtents[0] && localPoint.x > -mHalfExtents[0] &&
|
return (localPoint.x < mHalfExtents[0] && localPoint.x > -mHalfExtents[0] &&
|
||||||
localPoint.y < mHalfExtents[1] && localPoint.y > -mHalfExtents[1] &&
|
localPoint.y < mHalfExtents[1] && localPoint.y > -mHalfExtents[1] &&
|
||||||
localPoint.z < mHalfExtents[2] && localPoint.z > -mHalfExtents[2]);
|
localPoint.z < mHalfExtents[2] && localPoint.z > -mHalfExtents[2]);
|
||||||
|
|||||||
@ -130,7 +130,7 @@ inline bool ConcaveShape::isPolyhedron() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return true if a point is inside the collision shape
|
// Return true if a point is inside the collision shape
|
||||||
inline bool ConcaveShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
|
inline bool ConcaveShape::testPointInside(const Vector3& /*localPoint*/, Collider* /*collider*/) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ inline size_t SphereShape::getSizeInBytes() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
||||||
inline Vector3 SphereShape::getLocalSupportPointWithoutMargin(const Vector3& direction) const {
|
inline Vector3 SphereShape::getLocalSupportPointWithoutMargin(const Vector3& /*direction*/) const {
|
||||||
|
|
||||||
// Return the center of the sphere (the radius is taken into account in the object margin)
|
// Return the center of the sphere (the radius is taken into account in the object margin)
|
||||||
return Vector3(0.0, 0.0, 0.0);
|
return Vector3(0.0, 0.0, 0.0);
|
||||||
@ -185,7 +185,7 @@ inline decimal SphereShape::getVolume() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return true if a point is inside the collision shape
|
// Return true if a point is inside the collision shape
|
||||||
inline bool SphereShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
|
inline bool SphereShape::testPointInside(const Vector3& localPoint, Collider* /*collider*/) const {
|
||||||
return (localPoint.lengthSquare() < mMargin * mMargin);
|
return (localPoint.lengthSquare() < mMargin * mMargin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -222,12 +222,12 @@ inline void TriangleShape::getLocalBounds(Vector3& min, Vector3& max) const {
|
|||||||
* coordinates
|
* coordinates
|
||||||
* @param mass Mass to use to compute the inertia tensor of the collision shape
|
* @param mass Mass to use to compute the inertia tensor of the collision shape
|
||||||
*/
|
*/
|
||||||
inline Vector3 TriangleShape::getLocalInertiaTensor(decimal mass) const {
|
inline Vector3 TriangleShape::getLocalInertiaTensor(decimal /*mass*/) const {
|
||||||
return Vector3(0, 0, 0);
|
return Vector3(0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return true if a point is inside the collision shape
|
// Return true if a point is inside the collision shape
|
||||||
inline bool TriangleShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
|
inline bool TriangleShape::testPointInside(const Vector3& /*localPoint*/, Collider* /*collider*/) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,13 +55,13 @@ class EventListener : public CollisionCallback {
|
|||||||
/**
|
/**
|
||||||
* @param callbackData Contains information about all the contacts
|
* @param callbackData Contains information about all the contacts
|
||||||
*/
|
*/
|
||||||
virtual void onContact(const CollisionCallback::CallbackData& callbackData) override {}
|
virtual void onContact(const CollisionCallback::CallbackData& /*callbackData*/) override {}
|
||||||
|
|
||||||
/// Called when some trigger events occur
|
/// Called when some trigger events occur
|
||||||
/**
|
/**
|
||||||
* @param callbackData Contains information about all the triggers that are colliding
|
* @param callbackData Contains information about all the triggers that are colliding
|
||||||
*/
|
*/
|
||||||
virtual void onTrigger(const OverlapCallback::CallbackData& callbackData) {}
|
virtual void onTrigger(const OverlapCallback::CallbackData& /*callbackData*/) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class DefaultAllocator : public MemoryAllocator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Release previously allocated memory.
|
/// Release previously allocated memory.
|
||||||
virtual void release(void* pointer, size_t size) override {
|
virtual void release(void* pointer, size_t /*size*/) override {
|
||||||
std::free(pointer);
|
std::free(pointer);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -35,7 +35,7 @@ using namespace reactphysics3d;
|
|||||||
// This technique is based on the "Robust Contact Creation for Physics Simulations" presentation
|
// This technique is based on the "Robust Contact Creation for Physics Simulations" presentation
|
||||||
// by Dirk Gregorius.
|
// by Dirk Gregorius.
|
||||||
bool CapsuleVsCapsuleAlgorithm::testCollision(CapsuleVsCapsuleNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems,
|
bool CapsuleVsCapsuleAlgorithm::testCollision(CapsuleVsCapsuleNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems,
|
||||||
MemoryAllocator& memoryAllocator) {
|
MemoryAllocator& /*memoryAllocator*/) {
|
||||||
|
|
||||||
bool isCollisionFound = false;
|
bool isCollisionFound = false;
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ using namespace reactphysics3d;
|
|||||||
// This technique is based on the "Robust Contact Creation for Physics Simulations" presentation
|
// This technique is based on the "Robust Contact Creation for Physics Simulations" presentation
|
||||||
// by Dirk Gregorius.
|
// by Dirk Gregorius.
|
||||||
bool SphereVsCapsuleAlgorithm::testCollision(SphereVsCapsuleNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems,
|
bool SphereVsCapsuleAlgorithm::testCollision(SphereVsCapsuleNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems,
|
||||||
MemoryAllocator& memoryAllocator) {
|
MemoryAllocator& /*memoryAllocator*/) {
|
||||||
|
|
||||||
bool isCollisionFound = false;
|
bool isCollisionFound = false;
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace reactphysics3d;
|
||||||
|
|
||||||
bool SphereVsSphereAlgorithm::testCollision(SphereVsSphereNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems, MemoryAllocator& memoryAllocator) {
|
bool SphereVsSphereAlgorithm::testCollision(SphereVsSphereNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems, MemoryAllocator& /*memoryAllocator*/) {
|
||||||
|
|
||||||
bool isCollisionFound = false;
|
bool isCollisionFound = false;
|
||||||
|
|
||||||
|
|||||||
@ -92,7 +92,7 @@ Vector3 BoxShape::getLocalInertiaTensor(decimal mass) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Raycast method with feedback information
|
// Raycast method with feedback information
|
||||||
bool BoxShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
|
bool BoxShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& /*allocator*/) const {
|
||||||
|
|
||||||
Vector3 rayDirection = ray.point2 - ray.point1;
|
Vector3 rayDirection = ray.point2 - ray.point1;
|
||||||
decimal tMin = DECIMAL_SMALLEST;
|
decimal tMin = DECIMAL_SMALLEST;
|
||||||
|
|||||||
@ -67,7 +67,7 @@ Vector3 CapsuleShape::getLocalInertiaTensor(decimal mass) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return true if a point is inside the collision shape
|
// Return true if a point is inside the collision shape
|
||||||
bool CapsuleShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
|
bool CapsuleShape::testPointInside(const Vector3& localPoint, Collider* /*collider*/) const {
|
||||||
|
|
||||||
const decimal diffYCenterSphere1 = localPoint.y - mHalfHeight;
|
const decimal diffYCenterSphere1 = localPoint.y - mHalfHeight;
|
||||||
const decimal diffYCenterSphere2 = localPoint.y + mHalfHeight;
|
const decimal diffYCenterSphere2 = localPoint.y + mHalfHeight;
|
||||||
@ -83,7 +83,7 @@ bool CapsuleShape::testPointInside(const Vector3& localPoint, Collider* collider
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Raycast method with feedback information
|
// Raycast method with feedback information
|
||||||
bool CapsuleShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
|
bool CapsuleShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& /*allocator*/) const {
|
||||||
|
|
||||||
const Vector3 n = ray.point2 - ray.point1;
|
const Vector3 n = ray.point2 - ray.point1;
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@ void ConvexMeshShape::recalculateBounds() {
|
|||||||
// Raycast method with feedback information
|
// Raycast method with feedback information
|
||||||
/// This method implements the technique in the book "Real-time Collision Detection" by
|
/// This method implements the technique in the book "Real-time Collision Detection" by
|
||||||
/// Christer Ericson.
|
/// Christer Ericson.
|
||||||
bool ConvexMeshShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
|
bool ConvexMeshShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* /*collider*/, MemoryAllocator& /*allocator*/) const {
|
||||||
|
|
||||||
// Ray direction
|
// Ray direction
|
||||||
Vector3 direction = ray.point2 - ray.point1;
|
Vector3 direction = ray.point2 - ray.point1;
|
||||||
|
|||||||
@ -93,7 +93,7 @@ void HeightFieldShape::getLocalBounds(Vector3& min, Vector3& max) const {
|
|||||||
// and then for each rectangle in the sub-grid we generate two triangles that we use to test collision.
|
// and then for each rectangle in the sub-grid we generate two triangles that we use to test collision.
|
||||||
void HeightFieldShape::computeOverlappingTriangles(const AABB& localAABB, List<Vector3>& triangleVertices,
|
void HeightFieldShape::computeOverlappingTriangles(const AABB& localAABB, List<Vector3>& triangleVertices,
|
||||||
List<Vector3>& triangleVerticesNormals, List<uint>& shapeIds,
|
List<Vector3>& triangleVerticesNormals, List<uint>& shapeIds,
|
||||||
MemoryAllocator& allocator) const {
|
MemoryAllocator& /*allocator*/) const {
|
||||||
|
|
||||||
RP3D_PROFILE("HeightFieldShape::computeOverlappingTriangles()", mProfiler);
|
RP3D_PROFILE("HeightFieldShape::computeOverlappingTriangles()", mProfiler);
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ void SphereShape::computeAABB(AABB& aabb, const Transform& transform) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Raycast method with feedback information
|
// Raycast method with feedback information
|
||||||
bool SphereShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
|
bool SphereShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& /*allocator*/) const {
|
||||||
|
|
||||||
const Vector3 m = ray.point1;
|
const Vector3 m = ray.point1;
|
||||||
decimal c = m.dot(m) - mMargin * mMargin;
|
decimal c = m.dot(m) - mMargin * mMargin;
|
||||||
|
|||||||
@ -246,7 +246,7 @@ void TriangleShape::computeAABB(AABB& aabb, const Transform& transform) const {
|
|||||||
// Raycast method with feedback information
|
// Raycast method with feedback information
|
||||||
/// This method use the line vs triangle raycasting technique described in
|
/// This method use the line vs triangle raycasting technique described in
|
||||||
/// Real-time Collision Detection by Christer Ericson.
|
/// Real-time Collision Detection by Christer Ericson.
|
||||||
bool TriangleShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
|
bool TriangleShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& /*allocator*/) const {
|
||||||
|
|
||||||
RP3D_PROFILE("TriangleShape::raycast()", mProfiler);
|
RP3D_PROFILE("TriangleShape::raycast()", mProfiler);
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ uint PhysicsWorld::mNbWorlds = 0;
|
|||||||
* @param worldSettings The settings of the world
|
* @param worldSettings The settings of the world
|
||||||
* @param profiler Pointer to the profiler
|
* @param profiler Pointer to the profiler
|
||||||
*/
|
*/
|
||||||
PhysicsWorld::PhysicsWorld(MemoryManager& memoryManager, const WorldSettings& worldSettings, Profiler* profiler)
|
PhysicsWorld::PhysicsWorld(MemoryManager& memoryManager, const WorldSettings& worldSettings, Profiler* /*profiler*/)
|
||||||
: mMemoryManager(memoryManager), mConfig(worldSettings), mEntityManager(mMemoryManager.getHeapAllocator()), mDebugRenderer(mMemoryManager.getHeapAllocator()),
|
: mMemoryManager(memoryManager), mConfig(worldSettings), mEntityManager(mMemoryManager.getHeapAllocator()), mDebugRenderer(mMemoryManager.getHeapAllocator()),
|
||||||
mCollisionBodyComponents(mMemoryManager.getHeapAllocator()), mRigidBodyComponents(mMemoryManager.getHeapAllocator()),
|
mCollisionBodyComponents(mMemoryManager.getHeapAllocator()), mRigidBodyComponents(mMemoryManager.getHeapAllocator()),
|
||||||
mTransformComponents(mMemoryManager.getHeapAllocator()), mCollidersComponents(mMemoryManager.getHeapAllocator()),
|
mTransformComponents(mMemoryManager.getHeapAllocator()), mCollidersComponents(mMemoryManager.getHeapAllocator()),
|
||||||
|
|||||||
@ -153,7 +153,7 @@ void BroadPhaseSystem::updateColliderInternal(int32 broadPhaseId, Collider* coll
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update the broad-phase state of some colliders components
|
// Update the broad-phase state of some colliders components
|
||||||
void BroadPhaseSystem::updateCollidersComponents(uint32 startIndex, uint32 nbItems, decimal timeStep) {
|
void BroadPhaseSystem::updateCollidersComponents(uint32 startIndex, uint32 nbItems, decimal /*timeStep*/) {
|
||||||
|
|
||||||
RP3D_PROFILE("BroadPhaseSystem::updateCollidersComponents()", mProfiler);
|
RP3D_PROFILE("BroadPhaseSystem::updateCollidersComponents()", mProfiler);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user