From dd91f6dcbf49eaba97d15b603cf3fcf36ba60426 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Mon, 4 Sep 2017 22:23:29 +0200 Subject: [PATCH] Fix typo --- src/collision/CollisionDetection.cpp | 6 +++--- src/collision/ContactManifold.cpp | 6 +++--- src/collision/ContactManifold.h | 28 ++++++++++++++-------------- src/collision/ContactManifoldSet.cpp | 16 ++++++++-------- src/collision/ContactManifoldSet.h | 8 ++++---- src/constraint/ContactPoint.cpp | 6 +++--- src/constraint/ContactPoint.h | 24 ++++++++++++------------ src/engine/OverlappingPair.h | 16 ++++++++-------- 8 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/collision/CollisionDetection.cpp b/src/collision/CollisionDetection.cpp index 3f9a45f6..b284c034 100644 --- a/src/collision/CollisionDetection.cpp +++ b/src/collision/CollisionDetection.cpp @@ -103,7 +103,7 @@ void CollisionDetection::computeMiddlePhase() { OverlappingPair* pair = it->second; - // Make all the contact manifolds and contact points of the pair obselete + // Make all the contact manifolds and contact points of the pair obsolete pair->makeContactsObselete(); ProxyShape* shape1 = pair->getShape1(); @@ -410,8 +410,8 @@ void CollisionDetection::processPotentialContacts(OverlappingPair* pair) { potentialManifold = potentialManifold->mNext; } - // Clear the obselete contact manifolds and contact points - pair->clearObseleteManifoldsAndContactPoints(); + // Clear the obsolete contact manifolds and contact points + pair->clearObsoleteManifoldsAndContactPoints(); // Reset the potential contacts of the pair pair->clearPotentialContactManifolds(); diff --git a/src/collision/ContactManifold.cpp b/src/collision/ContactManifold.cpp index 803a9e82..62ca7a0c 100644 --- a/src/collision/ContactManifold.cpp +++ b/src/collision/ContactManifold.cpp @@ -34,7 +34,7 @@ ContactManifold::ContactManifold(const ContactManifoldInfo* manifoldInfo, ProxyS : mShape1(shape1), mShape2(shape2), mContactPoints(nullptr), mContactNormalId(manifoldInfo->getContactNormalId()), mNbContactPoints(0), mFrictionImpulse1(0.0), mFrictionImpulse2(0.0), mFrictionTwistImpulse(0.0), mIsAlreadyInIsland(false), - mMemoryAllocator(memoryAllocator), mNext(nullptr), mPrevious(nullptr), mIsObselete(false) { + mMemoryAllocator(memoryAllocator), mNext(nullptr), mPrevious(nullptr), mIsObsolete(false) { // For each contact point info in the manifold const ContactPointInfo* pointInfo = manifoldInfo->getFirstContactPointInfo(); @@ -87,7 +87,7 @@ void ContactManifold::addContactPoint(const ContactPointInfo* contactPointInfo) mNbContactPoints++; } -// Clear the obselete contact points +// Clear the obsolete contact points void ContactManifold::clearObseleteContactPoints() { ContactPoint* contactPoint = mContactPoints; @@ -96,7 +96,7 @@ void ContactManifold::clearObseleteContactPoints() { ContactPoint* nextContactPoint = contactPoint->getNext(); - if (contactPoint->getIsObselete()) { + if (contactPoint->getIsObsolete()) { // Delete the contact point contactPoint->~ContactPoint(); diff --git a/src/collision/ContactManifold.h b/src/collision/ContactManifold.h index ada20003..e34c4543 100644 --- a/src/collision/ContactManifold.h +++ b/src/collision/ContactManifold.h @@ -140,8 +140,8 @@ class ContactManifold { /// Pointer to the previous contact manifold in linked-list ContactManifold* mPrevious; - /// True if the contact manifold is obselete - bool mIsObselete; + /// True if the contact manifold is obsolete + bool mIsObsolete; // -------------------- Methods -------------------- // @@ -151,13 +151,13 @@ class ContactManifold { /// Set the pointer to the next element in the linked-list void setNext(ContactManifold* nextManifold); - /// Return true if the manifold is obselete - bool getIsObselete() const; + /// Return true if the manifold is obsolete + bool getIsObsolete() const; - /// Set to true to make the manifold obselete - void setIsObselete(bool isObselete, bool setContactPoints); + /// Set to true to make the manifold obsolete + void setIsObsolete(bool isObselete, bool setContactPoints); - /// Clear the obselete contact points + /// Clear the obsolete contact points void clearObseleteContactPoints(); /// Return the contact normal direction Id of the manifold @@ -384,19 +384,19 @@ inline void ContactManifold::setNext(ContactManifold* nextManifold) { mNext = nextManifold; } -// Return true if the manifold is obselete -inline bool ContactManifold::getIsObselete() const { - return mIsObselete; +// Return true if the manifold is obsolete +inline bool ContactManifold::getIsObsolete() const { + return mIsObsolete; } -// Set to true to make the manifold obselete -inline void ContactManifold::setIsObselete(bool isObselete, bool setContactPoints) { - mIsObselete = isObselete; +// Set to true to make the manifold obsolete +inline void ContactManifold::setIsObsolete(bool isObsolete, bool setContactPoints) { + mIsObsolete = isObsolete; if (setContactPoints) { ContactPoint* contactPoint = mContactPoints; while (contactPoint != nullptr) { - contactPoint->setIsObselete(isObselete); + contactPoint->setIsObsolete(isObsolete); contactPoint = contactPoint->getNext(); } diff --git a/src/collision/ContactManifoldSet.cpp b/src/collision/ContactManifoldSet.cpp index fb3beda2..5ad8ce71 100644 --- a/src/collision/ContactManifoldSet.cpp +++ b/src/collision/ContactManifoldSet.cpp @@ -131,8 +131,8 @@ void ContactManifoldSet::updateManifoldWithNewOne(ContactManifold* oldManifold, contactPointInfo = contactPointInfo->next; } - // The old manifold is no longer obselete - oldManifold->setIsObselete(false, false); + // The old manifold is no longer obsolete + oldManifold->setIsObsolete(false, false); } // Return the manifold with the smallest contact penetration depth among its points @@ -270,27 +270,27 @@ void ContactManifoldSet::removeManifold(ContactManifold* manifold) { mNbManifolds--; } -// Make all the contact manifolds and contact points obselete -void ContactManifoldSet::makeContactsObselete() { +// Make all the contact manifolds and contact points obsolete +void ContactManifoldSet::makeContactsObsolete() { ContactManifold* manifold = mManifolds; while (manifold != nullptr) { - manifold->setIsObselete(true, true); + manifold->setIsObsolete(true, true); manifold = manifold->getNext(); } } -// Clear the obselete contact manifolds and contact points -void ContactManifoldSet::clearObseleteManifoldsAndContactPoints() { +// Clear the obsolete contact manifolds and contact points +void ContactManifoldSet::clearObsoleteManifoldsAndContactPoints() { ContactManifold* manifold = mManifolds; ContactManifold* previousManifold = nullptr; while (manifold != nullptr) { ContactManifold* nextManifold = manifold->getNext(); - if (manifold->getIsObselete()) { + if (manifold->getIsObsolete()) { if (previousManifold != nullptr) { previousManifold->setNext(nextManifold); diff --git a/src/collision/ContactManifoldSet.h b/src/collision/ContactManifoldSet.h index 0990277c..1676f5a2 100644 --- a/src/collision/ContactManifoldSet.h +++ b/src/collision/ContactManifoldSet.h @@ -115,14 +115,14 @@ class ContactManifoldSet { /// Return a pointer to the first element of the linked-list of contact manifolds ContactManifold* getContactManifolds() const; - /// Make all the contact manifolds and contact points obselete - void makeContactsObselete(); + /// Make all the contact manifolds and contact points obsolete + void makeContactsObsolete(); /// Return the total number of contact points in the set of manifolds int getTotalNbContactPoints() const; - /// Clear the obselete contact manifolds and contact points - void clearObseleteManifoldsAndContactPoints(); + /// Clear the obsolete contact manifolds and contact points + void clearObsoleteManifoldsAndContactPoints(); // Map the normal vector into a cubemap face bucket (a face contains 4x4 buckets) // Each face of the cube is divided into 4x4 buckets. This method maps the diff --git a/src/constraint/ContactPoint.cpp b/src/constraint/ContactPoint.cpp index fa6838ec..2cd951b4 100644 --- a/src/constraint/ContactPoint.cpp +++ b/src/constraint/ContactPoint.cpp @@ -37,7 +37,7 @@ ContactPoint::ContactPoint(const ContactPointInfo* contactInfo, const Transform& mPenetrationDepth(contactInfo->penetrationDepth), mLocalPointOnBody1(contactInfo->localPoint1), mLocalPointOnBody2(contactInfo->localPoint2), - mIsRestingContact(false), mIsObselete(false), mNext(nullptr) { + mIsRestingContact(false), mIsObsolete(false), mNext(nullptr) { assert(mPenetrationDepth > decimal(0.0)); @@ -45,7 +45,7 @@ ContactPoint::ContactPoint(const ContactPointInfo* contactInfo, const Transform& mWorldPointOnBody1 = body1Transform * mLocalPointOnBody1; mWorldPointOnBody2 = body2Transform * mLocalPointOnBody2; - mIsObselete = false; + mIsObsolete = false; } // Update the contact point with a new one that is similar (very close) @@ -64,5 +64,5 @@ void ContactPoint::update(const ContactPointInfo* contactInfo, const Transform& mWorldPointOnBody1 = body1Transform * mLocalPointOnBody1; mWorldPointOnBody2 = body2Transform * mLocalPointOnBody2; - mIsObselete = false; + mIsObsolete = false; } diff --git a/src/constraint/ContactPoint.h b/src/constraint/ContactPoint.h index 41cc35e4..288abdcc 100644 --- a/src/constraint/ContactPoint.h +++ b/src/constraint/ContactPoint.h @@ -71,8 +71,8 @@ class ContactPoint { /// Cached penetration impulse decimal mPenetrationImpulse; - /// True if the contact point is obselete - bool mIsObselete; + /// True if the contact point is obsolete + bool mIsObsolete; /// Pointer to the next contact point in the linked-list ContactPoint* mNext; @@ -93,14 +93,14 @@ class ContactPoint { /// Set the mIsRestingContact variable void setIsRestingContact(bool isRestingContact); - /// Set to true to make the contact point obselete - void setIsObselete(bool isObselete); + /// Set to true to make the contact point obsolete + void setIsObsolete(bool isObselete); /// Set the next contact point in the linked list void setNext(ContactPoint* next); - /// Return true if the contact point is obselete - bool getIsObselete() const; + /// Return true if the contact point is obsolete + bool getIsObsolete() const; public : @@ -206,14 +206,14 @@ inline void ContactPoint::setIsRestingContact(bool isRestingContact) { mIsRestingContact = isRestingContact; } -// Return true if the contact point is obselete -inline bool ContactPoint::getIsObselete() const { - return mIsObselete; +// Return true if the contact point is obsolete +inline bool ContactPoint::getIsObsolete() const { + return mIsObsolete; } -// Set to true to make the contact point obselete -inline void ContactPoint::setIsObselete(bool isObselete) { - mIsObselete = isObselete; +// Set to true to make the contact point obsolete +inline void ContactPoint::setIsObsolete(bool isObsolete) { + mIsObsolete = isObsolete; } // Return the next contact point in the linked list diff --git a/src/engine/OverlappingPair.h b/src/engine/OverlappingPair.h index e8c89dda..5141b8cc 100644 --- a/src/engine/OverlappingPair.h +++ b/src/engine/OverlappingPair.h @@ -164,11 +164,11 @@ class OverlappingPair { /// Reduce the number of contact points of all the potential contact manifolds void reducePotentialContactManifolds(); - /// Make the contact manifolds and contact points obselete + /// Make the contact manifolds and contact points obsolete void makeContactsObselete(); - /// Clear the obselete contact manifold and contact points - void clearObseleteManifoldsAndContactPoints(); + /// Clear the obsolete contact manifold and contact points + void clearObsoleteManifoldsAndContactPoints(); /// Return the pair of bodies index static overlappingpairid computeID(ProxyShape* shape1, ProxyShape* shape2); @@ -211,10 +211,10 @@ inline const ContactManifoldSet& OverlappingPair::getContactManifoldSet() { return mContactManifoldSet; } -// Make the contact manifolds and contact points obselete +// Make the contact manifolds and contact points obsolete inline void OverlappingPair::makeContactsObselete() { - mContactManifoldSet.makeContactsObselete(); + mContactManifoldSet.makeContactsObsolete(); } // Return the pair of bodies index @@ -262,9 +262,9 @@ inline ContactManifoldInfo* OverlappingPair::getPotentialContactManifolds() { return mPotentialContactManifolds; } -// Clear the obselete contact manifold and contact points -inline void OverlappingPair::clearObseleteManifoldsAndContactPoints() { - mContactManifoldSet.clearObseleteManifoldsAndContactPoints(); +// Clear the obsolete contact manifold and contact points +inline void OverlappingPair::clearObsoleteManifoldsAndContactPoints() { + mContactManifoldSet.clearObsoleteManifoldsAndContactPoints(); } }