Skip to content

Commit

Permalink
bugfix: no suitable constructor found
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jul 12, 2024
1 parent 84369fd commit 7e750f2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/main/java/com/github/stephengold/joltjni/AaBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ public AaBox() {
setVirtualAddress(boxVa, true);
}

/**
* Instantiate a box with the specified native object assigned.
*
* @param boxVa the virtual address of the native object to assign (not
* zero)
* @param owner true → make the current object the owner, false →
* the current object isn't the owner
*/
AaBox(long boxVa, boolean owner) {
super();
setVirtualAddress(boxVa, owner);
}

/**
* Instantiate a box with the specified minimum and maximum coordinates.
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/stephengold/joltjni/Body.java
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public long getUserData() {
public AaBox getWorldSpaceBounds() {
long bodyVa = va();
long boxVa = getWorldSpaceBounds(bodyVa);
AaBox result = new AaBox(boxVa);
AaBox result = new AaBox(boxVa, false);

return result;
}
Expand Down

0 comments on commit 7e750f2

Please sign in to comment.