Skip to content

Commit

Permalink
Remove isBoat, see #123
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 7, 2024
1 parent 9280562 commit 7f16a25
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
7 changes: 0 additions & 7 deletions js/buoyancy/model/Boat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,6 @@ export default class Boat extends ApplicationsMass {
this.basin.liquidYInterpolatedProperty.setRatio( interpolationRatio );
}

/**
* Returns whether this is a boat (as more complicated handling is needed in this case).
*/
public override isBoat(): boolean {
return true;
}

/**
* Called after a engine-physics-model step once before doing other operations (like computing buoyant forces,
* displacement, etc.) so that it can set high-performance flags used for this purpose.
Expand Down
7 changes: 0 additions & 7 deletions js/common/model/Mass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,6 @@ export default abstract class Mass extends PhetioObject {
this.stepTop = 0; // maxmimum y value of the mass
}

/**
* Returns whether this is a boat (as more complicated handling is needed in this case).
*/
public isBoat(): boolean {
return false;
}

/**
* Returns the bounds of this mass.
*/
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/DebugView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default class DebugView extends Node {
} );
this.poolVolumePath.shape = poolVolumeShape;

const boat = this.model.masses.find( mass => mass.isBoat() );
const boat = this.model.masses.find( mass => mass instanceof Boat );
if ( boat instanceof Boat ) {
const boatYValues = _.range( boat.stepBottom, boat.stepTop, 0.002 );

Expand Down

0 comments on commit 7f16a25

Please sign in to comment.