Fix typo
This commit is contained in:
parent
95ade79af5
commit
dd91f6dcbf
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user