A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/AlmasB/FXGL/commit/8197d51ef below:

encapsulate islang flag in Body · AlmasB/FXGL@8197d51 · GitHub

@@ -308,7 +308,7 @@ private void solve(TimeStep step) {

308 308 309 309

// Clear all the island flags.

310 310

for (Body b : bodies) {

311 -

b.m_flags &= ~Body.e_islandFlag;

311 +

b.setIslandFlag(false);

312 312

}

313 313

for (Contact c = contactManager.contactList; c != null; c = c.m_next) {

314 314

c.m_flags &= ~Contact.ISLAND_FLAG;

@@ -324,7 +324,7 @@ private void solve(TimeStep step) {

324 324

}

325 325 326 326

for (Body seed : bodies) {

327 -

if ((seed.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {

327 +

if (seed.isIslandFlagOn2()) {

328 328

continue;

329 329

}

330 330

@@ -341,7 +341,7 @@ private void solve(TimeStep step) {

341 341

island.clear();

342 342

int stackCount = 0;

343 343

stack[stackCount++] = seed;

344 -

seed.m_flags |= Body.e_islandFlag;

344 +

seed.setIslandFlag(true);

345 345 346 346

// Perform a depth first search (DFS) on the constraint graph.

347 347

while (stackCount > 0) {

@@ -386,13 +386,13 @@ private void solve(TimeStep step) {

386 386

Body other = ce.other;

387 387 388 388

// Was the other body already added to this island?

389 -

if ((other.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {

389 +

if (other.isIslandFlagOn2()) {

390 390

continue;

391 391

}

392 392 393 393

assert stackCount < stackSize;

394 394

stack[stackCount++] = other;

395 -

other.m_flags |= Body.e_islandFlag;

395 +

other.setIslandFlag(true);

396 396

}

397 397 398 398

// Search all joints connect to this body.

@@ -411,13 +411,13 @@ private void solve(TimeStep step) {

411 411

island.add(je.joint);

412 412

je.joint.m_islandFlag = true;

413 413 414 -

if ((other.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {

414 +

if (other.isIslandFlagOn2()) {

415 415

continue;

416 416

}

417 417 418 418

assert stackCount < stackSize;

419 419

stack[stackCount++] = other;

420 -

other.m_flags |= Body.e_islandFlag;

420 +

other.setIslandFlag(true);

421 421

}

422 422

}

423 423

island.solve(step, gravity, allowSleep);

@@ -428,7 +428,7 @@ private void solve(TimeStep step) {

428 428

// Synchronize fixtures, check for out of range bodies.

429 429

for (Body b : bodies) {

430 430

// If a body was not in an island then it did not move.

431 -

if ((b.m_flags & Body.e_islandFlag) == 0) {

431 +

if (b.isIslandFlagOff()) {

432 432

continue;

433 433

}

434 434

@@ -459,7 +459,7 @@ private void solveTOI(final TimeStep step) {

459 459 460 460

if (stepComplete) {

461 461

for (Body b : bodies) {

462 -

b.m_flags &= ~Body.e_islandFlag;

462 +

b.setIslandFlag(false);

463 463

b.m_sweep.alpha0 = 0.0f;

464 464

}

465 465

@@ -613,8 +613,8 @@ private void solveTOI(final TimeStep step) {

613 613

island.add(bB);

614 614

island.add(minContact);

615 615 616 -

bA.m_flags |= Body.e_islandFlag;

617 -

bB.m_flags |= Body.e_islandFlag;

616 +

bA.setIslandFlag(true);

617 +

bB.setIslandFlag(true);

618 618

minContact.m_flags |= Contact.ISLAND_FLAG;

619 619 620 620

// Get contacts on bodyA and bodyB.

@@ -654,7 +654,7 @@ private void solveTOI(final TimeStep step) {

654 654 655 655

// Tentatively advance the body to the TOI.

656 656

backup1.set(other.m_sweep);

657 -

if ((other.m_flags & Body.e_islandFlag) == 0) {

657 +

if (other.isIslandFlagOff()) {

658 658

other.advance(minAlpha);

659 659

}

660 660

@@ -680,12 +680,12 @@ private void solveTOI(final TimeStep step) {

680 680

island.add(contact);

681 681 682 682

// Has the other body already been added to the island?

683 -

if ((other.m_flags & Body.e_islandFlag) != 0) {

683 +

if (other.isIslandFlagOn()) {

684 684

continue;

685 685

}

686 686 687 687

// Add the other body to the island.

688 -

other.m_flags |= Body.e_islandFlag;

688 +

other.setIslandFlag(true);

689 689 690 690

if (other.getType() != BodyType.STATIC) {

691 691

other.setAwake(true);


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4