Run-time visualization of Chrono modeling elements (mostly bodies, but also some connections such as linear and rotational springs) is done by attaching visual assets to these elements and then using a run-time visualization module such as Chrono::Irrlicht (which you must enable and configure during CMake configuration).
Once you configure and build Chrono with Irrlicht support enabled, look at any of the demos named “demo_IRR_***” for examples of attaching visual assets to your bodies and having those rendered during simulation.
Look also at demo_IRR_debugDrawer_collisionModels which may be exactly what you want. That uses a class derived from btIDebugDraw and interfaces to Irrlicht calls for the actual rendering.
--Radu
--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
projectchron...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/0fe05b4c-ca67-4118-ae3d-168a08c6ed3bn%40googlegroups.com.
The visual assets are independent of the collision system. So, you can use whatever shapes, meshes, or lines you want for each body, and they will be rendered.
Use the class derived from btIDebugDraw obviously only works with the Bullet collision system.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/f3ad4295-7e27-4328-9b6c-272cd47ab825n%40googlegroups.com.
I see, you are using your own visualization system. In that case, unless you have it fully interfaced to the Chrono asset system, you will not be able to use that to visualize the collision shapes (you cannot overlay Irrlicht or OpenGL on top of your rendering).
For now, I suggest you use the Bullet collision system (if you design your Chrono code appropriately, you can switch between the two collision systems with one flag) and use the btIDebugDraw mechanism as illustrated in that demo (replacing the underlying call to the Irrlicht line drawing function to one using your own visualization system). In principle, it’s not all that difficult to provide a similar mechanism for rendering collision shapes when using the parallel Chrono collision; I’ll look into that at some point.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/d4f794e8-d745-467a-bc8a-0a16e3689344n%40googlegroups.com.