Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 0bbc105

Browse files
committed
Fix comments
1 parent 7a74292 commit 0bbc105

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

Entities/AtomGroup.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ float AtomGroup::Travel(Vector &position,
955955
list<Atom *> hitTerrAtoms;
956956
list<Atom *> penetratingAtoms;
957957
list<Atom *> hitResponseAtoms;
958-
Vector linSegTraj; //!< The planned travelling distance of this AtomGroup's origin in pixels.
958+
Vector linSegTraj; //!< The planned travel trajectory of this AtomGroup's origin in pixels.
959959
Vector atomTraj;
960960
Vector preHitPos;
961961
Vector hitNormal;
@@ -971,11 +971,11 @@ float AtomGroup::Travel(Vector &position,
971971
if (!scenePreLocked)
972972
g_SceneMan.LockScene();
973973

974-
// Loop for all the different straight segments (between bounces etc) that
975-
// have to be traveled during the travelTime.
974+
// Loop for all the different straight segments (between bounces etc) that
975+
// have to be traveled during the travelTime.
976976
do
977977
{
978-
// First see what atoms are inside either the terrain or another MO, and cause collisions responses before even starting the segment
978+
// First see what atoms are inside either the terrain or another MO, and cause collisions responses before even starting the segment
979979
for (Atom *atom : m_Atoms)
980980
{
981981
const Vector startOff = m_pOwnerMO->RotateOffset(atom->GetOffset());
@@ -1106,7 +1106,7 @@ float AtomGroup::Travel(Vector &position,
11061106
hitTerrAtoms.push_back(atom);
11071107
}
11081108

1109-
// MO hits?
1109+
// MO hits?
11101110
if (hitMOs) {
11111111
const MOID tempMOID = atom->HitWhatMOID();
11121112
if (tempMOID != g_NoMOID)
@@ -1164,12 +1164,12 @@ float AtomGroup::Travel(Vector &position,
11641164
hitStep = true;
11651165
++hitCount;
11661166

1167-
// Calculate the progress made on this segment before hitting something.
1168-
// Special case of being at rest
1167+
// Calculate the progress made on this segment before hitting something.
1168+
// Special case of being at rest
11691169
if (stepCount == 0 && stepsOnSeg == 1)
11701170
{
11711171
halted = true;
1172-
// m_pOwnerMO->SetToSettle(true);
1172+
//m_pOwnerMO->SetToSettle(true);
11731173
}
11741174
segProgress = static_cast<float>(stepCount) / static_cast<float>(stepsOnSeg);
11751175

@@ -1200,15 +1200,15 @@ float AtomGroup::Travel(Vector &position,
12001200
hitData.HitVel[HITOR] = velocity + hitData.HitRadius[HITOR].GetPerpendicular() * angVel;
12011201

12021202
const float radMag = hitData.HitRadius[HITOR].GetMagnitude();
1203-
// These are set temporarily here, will be re-set later when the normal of the hit terrain bitmap (ortho pixel side) is known.
1203+
// These are set temporarily here, will be re-set later when the normal of the hit terrain bitmap (ortho pixel side) is known.
12041204
hitData.HitDenominator = (1.0F / massDistribution) + ((radMag * radMag) / momentInertiaDistribution);
12051205
hitData.PreImpulse[HITOR] = hitData.HitVel[HITOR] / hitData.HitDenominator;
1206-
// Set the atom with the hit data with all the info we have so far.
1206+
// Set the atom with the hit data with all the info we have so far.
12071207
(*aItr)->SetHitData(hitData);
12081208

12091209
if (g_SceneMan.WillPenetrate((*aItr)->GetCurrentPos().GetFloorIntX(), (*aItr)->GetCurrentPos().GetFloorIntY(), hitData.PreImpulse[HITOR]))
12101210
{
1211-
// Move the penetrating atom to the pen. list from the coll. list.
1211+
// Move the penetrating atom to the pen. list from the coll. list.
12121212
penetratingAtoms.push_back(*aItr);
12131213
aItr = hitTerrAtoms.erase(aItr);
12141214
somethingPenetrated = true;
@@ -1266,14 +1266,14 @@ float AtomGroup::Travel(Vector &position,
12661266
// Calc and store the collision response effects.
12671267
for (Atom *penetratingAtom : penetratingAtoms)
12681268
{
1269-
// This gets re-set later according to the ortho pixel edges hit.
1269+
// This gets re-set later according to the ortho pixel edges hit.
12701270
// hitData.BitmapNormal = -(hitData.HitVel[HITOR].GetNormalized());
12711271
// hitData.SquaredMIHandle[HITOR] = hitData.HitRadius[HITOR].GetPerpendicular()/*.Dot(hitData.BitmapNormal)*/;
12721272
// hitData.SquaredMIHandle[HITOR] *= hitData.SquaredMIHandle[HITOR];
12731273
// hitData.HitDenominator = (1.0 / massDistribution) + (hitData.SquaredMIHandle[HITOR] / momentInertiaDistribution);
12741274
// hitData.PreImpulse[HITOR] = hitData.HitVel[HITOR] / hitData.HitDenominator;
12751275

1276-
// Get the hitdata so far gathered for this Atom.
1276+
// Get the hitdata so far gathered for this Atom.
12771277
hitData = penetratingAtom->GetHitData();
12781278

12791279
if (g_SceneMan.TryPenetrate(penetratingAtom->GetCurrentPos().GetFloorIntX(),
@@ -1285,25 +1285,25 @@ float AtomGroup::Travel(Vector &position,
12851285
1/*(*penetratingAtom)->GetNumPenetrations()*/))
12861286
{
12871287

1288-
// Recalc these here without the distributed mass and MI.
1288+
// Recalc these here without the distributed mass and MI.
12891289
const float radMag = hitData.HitRadius[HITOR].GetMagnitude();
12901290
hitData.HitDenominator = (1.0F / mass) + ((radMag * radMag) / m_MomInertia);
12911291
hitData.PreImpulse[HITOR] = hitData.HitVel[HITOR] / hitData.HitDenominator;
12921292
hitData.TotalMass[HITOR] = mass;
12931293
hitData.MomInertia[HITOR] = m_MomInertia;
12941294
hitData.ImpulseFactor[HITOR] = hitFactor;
1295-
// Finally calculate the hit response impulse.
1295+
// Finally calculate the hit response impulse.
12961296
hitData.ResImpulse[HITOR] = ((hitData.HitVel[HITOR] * retardation) /
12971297
hitData.HitDenominator) * hitFactor;
12981298

1299-
// Call the call-on-sink function, if requested.
1299+
// Call the call-on-sink function, if requested.
13001300
if (callOnSink)
13011301
halted = halted || m_pOwnerMO->OnSink(hitData);
13021302

1303-
// Copy back the new hit data with all the info we have so far.
1303+
// Copy back the new hit data with all the info we have so far.
13041304
penetratingAtom->SetHitData(hitData);
1305-
// Save the atom for later application of its hit data to the body.
1306-
hitResponseAtoms.push_back(penetratingAtom);
1305+
// Save the atom for later application of its hit data to the body.
1306+
hitResponseAtoms.push_back(penetratingAtom);
13071307
}
13081308
}
13091309
}

0 commit comments

Comments
 (0)