| 58 | } |
| 59 | |
| 60 | void RenderPhysX3Debug::update(const PxRenderBuffer& debugRenderable) |
| 61 | { |
| 62 | // Points |
| 63 | const PxU32 numPoints = debugRenderable.getNbPoints(); |
| 64 | if(numPoints) |
| 65 | { |
| 66 | const PxDebugPoint* PX_RESTRICT points = debugRenderable.getPoints(); |
| 67 | checkResizePoint(numPoints); |
| 68 | for(PxU32 i=0; i<numPoints; i++) |
| 69 | { |
| 70 | const PxDebugPoint& point = points[i]; |
| 71 | addPoint(point.pos, RendererColor(point.color)); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | // Lines |
| 76 | const PxU32 numLines = debugRenderable.getNbLines(); |
| 77 | if(numLines) |
| 78 | { |
| 79 | const PxDebugLine* PX_RESTRICT lines = debugRenderable.getLines(); |
| 80 | checkResizeLine(numLines * 2); |
| 81 | for(PxU32 i=0; i<numLines; i++) |
| 82 | { |
| 83 | const PxDebugLine& line = lines[i]; |
| 84 | addLine(line.pos0, line.pos1, RendererColor(line.color0)); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | // Triangles |
| 89 | const PxU32 numTriangles = debugRenderable.getNbTriangles(); |
| 90 | if(numTriangles) |
| 91 | { |
| 92 | const PxDebugTriangle* PX_RESTRICT triangles = debugRenderable.getTriangles(); |
| 93 | checkResizeTriangle(numTriangles * 3); |
| 94 | for(PxU32 i=0; i<numTriangles; i++) |
| 95 | { |
| 96 | const PxDebugTriangle& triangle = triangles[i]; |
| 97 | addTriangle(triangle.pos0, triangle.pos1, triangle.pos2, RendererColor(triangle.color0)); |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | void RenderPhysX3Debug::update(const PxRenderBuffer& debugRenderable, const Camera& camera) |
| 103 | { |
nothing calls this directly
no test coverage detected