MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / update

Method update

deps/physx/physx/samples/samplebase/RenderPhysX3Debug.cpp:60–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void 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
102void RenderPhysX3Debug::update(const PxRenderBuffer& debugRenderable, const Camera& camera)
103{

Callers

nothing calls this directly

Calls 11

PxMinFunction · 0.85
PxMaxFunction · 0.85
printFormattedFunction · 0.85
getNbPointsMethod · 0.80
getPointsMethod · 0.80
getNbLinesMethod · 0.80
getLinesMethod · 0.80
cullMethod · 0.80
RendererColorClass · 0.70
getNbTrianglesMethod · 0.45
getTrianglesMethod · 0.45

Tested by

no test coverage detected