Skip to content

Commit

Permalink
virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
Lama-Lama committed Feb 22, 2024
1 parent 5ad9ea5 commit a60473b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ private native void allocate(@Const btCollisionObject collisionObject,
public native @Cast("unsigned int") int m_flags(); public native RayResultCallback m_flags(int setter);
public native @Cast("bool") boolean hasHit();

@Virtual
public native @Cast("bool") boolean needsCollision(btBroadphaseProxy proxy0);

@Virtual
public native @Cast("btScalar") double addSingleResult(@ByRef LocalRayResult rayResult, @Cast("bool") boolean normalInWorldSpace);
}

Expand All @@ -127,6 +129,7 @@ private native void allocate(@Const btCollisionObject collisionObject,
public native @ByRef btVector3 m_hitNormalWorld(); public native ClosestRayResultCallback m_hitNormalWorld(btVector3 setter);
public native @ByRef btVector3 m_hitPointWorld(); public native ClosestRayResultCallback m_hitPointWorld(btVector3 setter);

@Virtual
public native @Cast("btScalar") double addSingleResult(@ByRef LocalRayResult rayResult, @Cast("bool") boolean normalInWorldSpace);
}

Expand All @@ -147,6 +150,7 @@ private native void allocate(@Const btCollisionObject collisionObject,
public native @ByRef btVector3Array m_hitPointWorld(); public native AllHitsRayResultCallback m_hitPointWorld(btVector3Array setter);
public native @ByRef btScalarArray m_hitFractions(); public native AllHitsRayResultCallback m_hitFractions(btScalarArray setter);

@Virtual
public native @Cast("btScalar") double addSingleResult(@ByRef LocalRayResult rayResult, @Cast("bool") boolean normalInWorldSpace);
}

Expand Down Expand Up @@ -187,6 +191,7 @@ private native void allocate(@Const btCollisionObject hitCollisionObject,

public native @Cast("bool") boolean needsCollision(btBroadphaseProxy proxy0);

@Virtual
public native @Cast("btScalar") double addSingleResult(@ByRef LocalConvexResult convexResult, @Cast("bool") boolean normalInWorldSpace);
}

Expand All @@ -205,6 +210,7 @@ private native void allocate(@Const btCollisionObject hitCollisionObject,
public native @ByRef btVector3 m_hitPointWorld(); public native ClosestConvexResultCallback m_hitPointWorld(btVector3 setter);
public native @Const btCollisionObject m_hitCollisionObject(); public native ClosestConvexResultCallback m_hitCollisionObject(btCollisionObject setter);

@Virtual
public native @Cast("btScalar") double addSingleResult(@ByRef LocalConvexResult convexResult, @Cast("bool") boolean normalInWorldSpace);
}

Expand All @@ -218,8 +224,10 @@ private native void allocate(@Const btCollisionObject hitCollisionObject,
public native int m_collisionFilterMask(); public native ContactResultCallback m_collisionFilterMask(int setter);
public native @Cast("btScalar") double m_closestDistanceThreshold(); public native ContactResultCallback m_closestDistanceThreshold(double setter);

@Virtual
public native @Cast("bool") boolean needsCollision(btBroadphaseProxy proxy0);

@Virtual
public native @Cast("btScalar") double addSingleResult(@ByRef btManifoldPoint cp, @Const btCollisionObjectWrapper colObj0Wrap, int partId0, int index0, @Const btCollisionObjectWrapper colObj1Wrap, int partId1, int index1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ public class btOverlapCallback extends Pointer {
public btOverlapCallback(Pointer p) { super(p); }

//return true for deletion of the pair
@Virtual
public native @Cast("bool") boolean processOverlap(@ByRef btBroadphasePair pair);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ public class btOverlapFilterCallback extends Pointer {
public btOverlapFilterCallback(Pointer p) { super(p); }

// return true when pairs need collision
@Virtual
public native @Cast("bool") boolean needBroadphaseCollision(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1);
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void map(InfoMap infoMap) {
.put(new Info("btCollisionWorldImporter.h").linePatterns("struct btContactSolverInfo;").skip())
.put(new Info("btDispatcher.h").linePatterns("class btRigidBody;").skip())
.put(new Info("btPersistentManifold.h").linePatterns("struct btCollisionResult;").skip())

.put(new Info("btCollisionWorld", "btOverlapFilterCallback", "btOverlapCallback").virtualize())
.put(new Info(
"BT_MPR_FABS",
"BT_MPR_SQRT",
Expand Down

0 comments on commit a60473b

Please sign in to comment.