-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b71bd93
commit 687c2b6
Showing
1 changed file
with
3 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,27 +33,18 @@ of this software and associated documentation files (the "Software"), to deal | |
* @author Stephen Gold [email protected] | ||
*/ | ||
public class NarrowPhaseQuery extends NonCopyable { | ||
// ************************************************************************* | ||
// fields | ||
|
||
/** | ||
* prevent premature garbage collection of the underlying | ||
* {@code PhysicsSystem} | ||
*/ | ||
final private PhysicsSystem system; | ||
// ************************************************************************* | ||
// constructors | ||
|
||
/** | ||
* Instantiate with the specified native object assigned but not owned. | ||
* | ||
* @param system the underlying {@code PhysicsSystem} (not null) | ||
* @param system the containing object, or {@code null} if none | ||
* @param queryVa the virtual address of the native object to assign (not | ||
* zero) | ||
*/ | ||
NarrowPhaseQuery(PhysicsSystem system, long queryVa) { | ||
this.system = system; | ||
setVirtualAddress(queryVa, null); | ||
super(system, queryVa); | ||
} | ||
// ************************************************************************* | ||
// new methods exposed | ||
|
@@ -555,7 +546,7 @@ public void collideShape(ConstShape shape, Vec3Arg shapeScale, | |
* @return the pre-existing instance | ||
*/ | ||
public PhysicsSystem getSystem() { | ||
return system; | ||
return (PhysicsSystem) getContainingObject(); | ||
} | ||
// ************************************************************************* | ||
// native private methods | ||
|