const PxRenderBuffer& rb = scene->getRenderBuffer();
for(PxU32 i=0; i < rb.getNbPoints(); i++)
{
const PxDebugPoint& point = rb.getPoints()[i];
// render the point
}
for(PxU32 i=0; i < rb.getNbLines(); i++)
{
const PxDebugLine& line = rb.getLines()[i];
// render the line
}
It seems the array fields for points, lines, etc in PxRenderBuffer are mapped to a single element with no way to index into them.
I think PxDebugLine.arrayGet for example can be used to work around this:
PxRenderBuffer renderBuffer = physxScene.getRenderBuffer();
int pointsLength = renderBuffer.getNbPoints();
int pointsBaseAddress = renderBuffer.getPoints().getAddress();
for (int p = 0; p < pointsLength; ++p) {
PxDebugPoint point = PxDebugPoint.arrayGet(pointsBaseAddress, p);
}
Hi! I was researching how to implement a debug visualization using the official docs:
https://nvidia-omniverse.github.io/PhysX/physx/5.4.0/docs/DebugVisualization.html
It seems the array fields for points, lines, etc in PxRenderBuffer are mapped to a single element with no way to index into them.
https://github.com/fabmax/physx-jni/blob/77bb9e5175594e86f1bbb4504c8f4a8ec02298b6/physx-jni/src/main/webidl/common/PxDebugDrawer.idl#L32
I think PxDebugLine.arrayGet for example can be used to work around this:
But I believe it should be exposed like the getAnyHit(index) accessor from PxSweepResult https://github.com/fabmax/physx-jni/blob/77bb9e5175594e86f1bbb4504c8f4a8ec02298b6/physx-jni/src/main/webidl/physics/PxSceneQuery.idl#L224
Where you do