Skip to content

Commit

Permalink
PhysicsSystem: add 2 public getters
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Sep 25, 2024
1 parent 0f903b5 commit 10c5973
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/main/java/com/github/stephengold/joltjni/PhysicsSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,33 @@ public ContactListener getContactListener() {
return contactListener;
}

/**
* Generate a broad-phase layer filter using the current pair filter and the
* specified layer index.
*
* @param objectLayer the index of the object layer to use
* @return a new filter
*/
public DefaultBroadPhaseLayerFilter getDefaultBroadPhaseLayerFilter(
int objectLayer) {
DefaultBroadPhaseLayerFilter result
= new DefaultBroadPhaseLayerFilter(ovbFilter, objectLayer);
return result;
}

/**
* Generate an object layer filter using the current pair filter and the
* specified layer index.
*
* @param objectLayer the index of the object layer to use
* @return a new filter
*/
public DefaultObjectLayerFilter getDefaultLayerFilter(int objectLayer) {
DefaultObjectLayerFilter result
= new DefaultObjectLayerFilter(ovoFilter, objectLayer);
return result;
}

/**
* Copy the gravity vector. The physics system is unaffected.
*
Expand Down

0 comments on commit 10c5973

Please sign in to comment.