.. | .. |
---|
893 | 893 | |
---|
894 | 894 | boolean changedir = random && Math.random() < 0.01; // && !link2master; |
---|
895 | 895 | |
---|
896 | | - if (transformcount*factor > maxcount || (step == 1 && changedir)) |
---|
| 896 | + if (transformcount*factor >= maxcount && (rewind || random) || |
---|
| 897 | + (step == 1 && changedir)) |
---|
897 | 898 | { |
---|
898 | 899 | countdown = 1; |
---|
899 | 900 | delay = speedup?8:1; |
---|
.. | .. |
---|
3503 | 3504 | if (blockloop) |
---|
3504 | 3505 | return; |
---|
3505 | 3506 | |
---|
3506 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3507 | + if (//marked || // does not make sense |
---|
| 3508 | + (bRep != null || material != null)) // borderline... |
---|
3507 | 3509 | live = h; |
---|
3508 | 3510 | |
---|
3509 | 3511 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3524 | 3526 | return; |
---|
3525 | 3527 | |
---|
3526 | 3528 | //if (bRep != null) |
---|
3527 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3529 | + if (//marked || // does not make sense |
---|
| 3530 | + (bRep != null || material != null)) // borderline... |
---|
3528 | 3531 | link2master = h; |
---|
3529 | 3532 | |
---|
3530 | 3533 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3544 | 3547 | if (blockloop) |
---|
3545 | 3548 | return; |
---|
3546 | 3549 | |
---|
3547 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3550 | + if (//marked || // does not make sense |
---|
| 3551 | + (bRep != null || material != null)) // borderline... |
---|
3548 | 3552 | hide = h; |
---|
3549 | 3553 | |
---|
3550 | 3554 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3564 | 3568 | if (blockloop) |
---|
3565 | 3569 | return; |
---|
3566 | 3570 | |
---|
3567 | | - if (bRep != null && material != null) // borderline... |
---|
| 3571 | + if (bRep != null || material != null) // borderline... |
---|
3568 | 3572 | marked = h; |
---|
3569 | 3573 | |
---|
3570 | 3574 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3579 | 3583 | } |
---|
3580 | 3584 | } |
---|
3581 | 3585 | |
---|
| 3586 | + void RewindLeaves(boolean h) |
---|
| 3587 | + { |
---|
| 3588 | + if (blockloop) |
---|
| 3589 | + return; |
---|
| 3590 | + |
---|
| 3591 | + if (bRep != null || material != null) // borderline... |
---|
| 3592 | + rewind = h; |
---|
| 3593 | + |
---|
| 3594 | + for (int i = 0; i < Size(); i++) |
---|
| 3595 | + { |
---|
| 3596 | + Object3D child = (Object3D) get(i); // reserve(i); |
---|
| 3597 | + if (child == null) |
---|
| 3598 | + continue; |
---|
| 3599 | + blockloop = true; |
---|
| 3600 | + child.RewindLeaves(h); |
---|
| 3601 | + blockloop = false; |
---|
| 3602 | + // release(i); |
---|
| 3603 | + } |
---|
| 3604 | + } |
---|
| 3605 | + |
---|
| 3606 | + void RandomLeaves(boolean h) |
---|
| 3607 | + { |
---|
| 3608 | + if (blockloop) |
---|
| 3609 | + return; |
---|
| 3610 | + |
---|
| 3611 | + if (bRep != null || material != null) // borderline... |
---|
| 3612 | + random = h; |
---|
| 3613 | + |
---|
| 3614 | + for (int i = 0; i < Size(); i++) |
---|
| 3615 | + { |
---|
| 3616 | + Object3D child = (Object3D) get(i); // reserve(i); |
---|
| 3617 | + if (child == null) |
---|
| 3618 | + continue; |
---|
| 3619 | + blockloop = true; |
---|
| 3620 | + child.RandomLeaves(h); |
---|
| 3621 | + blockloop = false; |
---|
| 3622 | + // release(i); |
---|
| 3623 | + } |
---|
| 3624 | + } |
---|
| 3625 | + |
---|
3582 | 3626 | void SetTexRes(int tr) |
---|
3583 | 3627 | { |
---|
3584 | 3628 | texres = tr; |
---|