@@ -955,7 +955,7 @@ float AtomGroup::Travel(Vector &position,
955
955
list<Atom *> hitTerrAtoms;
956
956
list<Atom *> penetratingAtoms;
957
957
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.
959
959
Vector atomTraj;
960
960
Vector preHitPos;
961
961
Vector hitNormal;
@@ -971,11 +971,11 @@ float AtomGroup::Travel(Vector &position,
971
971
if (!scenePreLocked)
972
972
g_SceneMan.LockScene ();
973
973
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.
976
976
do
977
977
{
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
979
979
for (Atom *atom : m_Atoms)
980
980
{
981
981
const Vector startOff = m_pOwnerMO->RotateOffset (atom->GetOffset ());
@@ -1106,7 +1106,7 @@ float AtomGroup::Travel(Vector &position,
1106
1106
hitTerrAtoms.push_back (atom);
1107
1107
}
1108
1108
1109
- // MO hits?
1109
+ // MO hits?
1110
1110
if (hitMOs) {
1111
1111
const MOID tempMOID = atom->HitWhatMOID ();
1112
1112
if (tempMOID != g_NoMOID)
@@ -1164,12 +1164,12 @@ float AtomGroup::Travel(Vector &position,
1164
1164
hitStep = true ;
1165
1165
++hitCount;
1166
1166
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
1169
1169
if (stepCount == 0 && stepsOnSeg == 1 )
1170
1170
{
1171
1171
halted = true ;
1172
- // m_pOwnerMO->SetToSettle(true);
1172
+ // m_pOwnerMO->SetToSettle(true);
1173
1173
}
1174
1174
segProgress = static_cast <float >(stepCount) / static_cast <float >(stepsOnSeg);
1175
1175
@@ -1200,15 +1200,15 @@ float AtomGroup::Travel(Vector &position,
1200
1200
hitData.HitVel [HITOR] = velocity + hitData.HitRadius [HITOR].GetPerpendicular () * angVel;
1201
1201
1202
1202
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.
1204
1204
hitData.HitDenominator = (1 .0F / massDistribution) + ((radMag * radMag) / momentInertiaDistribution);
1205
1205
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.
1207
1207
(*aItr)->SetHitData (hitData);
1208
1208
1209
1209
if (g_SceneMan.WillPenetrate ((*aItr)->GetCurrentPos ().GetFloorIntX (), (*aItr)->GetCurrentPos ().GetFloorIntY (), hitData.PreImpulse [HITOR]))
1210
1210
{
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.
1212
1212
penetratingAtoms.push_back (*aItr);
1213
1213
aItr = hitTerrAtoms.erase (aItr);
1214
1214
somethingPenetrated = true ;
@@ -1266,14 +1266,14 @@ float AtomGroup::Travel(Vector &position,
1266
1266
// Calc and store the collision response effects.
1267
1267
for (Atom *penetratingAtom : penetratingAtoms)
1268
1268
{
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.
1270
1270
// hitData.BitmapNormal = -(hitData.HitVel[HITOR].GetNormalized());
1271
1271
// hitData.SquaredMIHandle[HITOR] = hitData.HitRadius[HITOR].GetPerpendicular()/*.Dot(hitData.BitmapNormal)*/;
1272
1272
// hitData.SquaredMIHandle[HITOR] *= hitData.SquaredMIHandle[HITOR];
1273
1273
// hitData.HitDenominator = (1.0 / massDistribution) + (hitData.SquaredMIHandle[HITOR] / momentInertiaDistribution);
1274
1274
// hitData.PreImpulse[HITOR] = hitData.HitVel[HITOR] / hitData.HitDenominator;
1275
1275
1276
- // Get the hitdata so far gathered for this Atom.
1276
+ // Get the hitdata so far gathered for this Atom.
1277
1277
hitData = penetratingAtom->GetHitData ();
1278
1278
1279
1279
if (g_SceneMan.TryPenetrate (penetratingAtom->GetCurrentPos ().GetFloorIntX (),
@@ -1285,25 +1285,25 @@ float AtomGroup::Travel(Vector &position,
1285
1285
1 /* (*penetratingAtom)->GetNumPenetrations()*/ ))
1286
1286
{
1287
1287
1288
- // Recalc these here without the distributed mass and MI.
1288
+ // Recalc these here without the distributed mass and MI.
1289
1289
const float radMag = hitData.HitRadius [HITOR].GetMagnitude ();
1290
1290
hitData.HitDenominator = (1 .0F / mass) + ((radMag * radMag) / m_MomInertia);
1291
1291
hitData.PreImpulse [HITOR] = hitData.HitVel [HITOR] / hitData.HitDenominator ;
1292
1292
hitData.TotalMass [HITOR] = mass;
1293
1293
hitData.MomInertia [HITOR] = m_MomInertia;
1294
1294
hitData.ImpulseFactor [HITOR] = hitFactor;
1295
- // Finally calculate the hit response impulse.
1295
+ // Finally calculate the hit response impulse.
1296
1296
hitData.ResImpulse [HITOR] = ((hitData.HitVel [HITOR] * retardation) /
1297
1297
hitData.HitDenominator ) * hitFactor;
1298
1298
1299
- // Call the call-on-sink function, if requested.
1299
+ // Call the call-on-sink function, if requested.
1300
1300
if (callOnSink)
1301
1301
halted = halted || m_pOwnerMO->OnSink (hitData);
1302
1302
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.
1304
1304
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);
1307
1307
}
1308
1308
}
1309
1309
}
0 commit comments