visualizer: adopt backend-neutral cScene3DNode (OSG+VSG coexistence)#1116
visualizer: adopt backend-neutral cScene3DNode (OSG+VSG coexistence)#1116tabgab wants to merge 4 commits into
Conversation
Companion to the omnetpp-dev change that makes cScene3DNode a
renderer-neutral handle rather than an alias of osg::Node. Wrap OSG scene
roots with omnetpp::createScene3DNode() when calling cOsgCanvas::setScene(),
and recover the typed root via getOsgRoot()/getVsgRoot() instead of casting
cScene3DNode directly to a scene-graph type.
Updated both visualizer trees:
- OSG: SceneOsgVisualizer, SceneOsgEarthVisualizer, SceneOsgVisualizerBase,
OsgScene, and GeographicCoordinateSystem (osgEarth map node lookup)
- VSG: SceneVsgVisualizer, VsgScene
Lets INET build and run against an OMNeT++ that contains both 3-D backends,
with the renderer selected per simulation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Corrects the "VisualizationOsg and VisualizationVsg are mutually exclusive" note (true only before the backend-neutral cScene3DNode change) and documents that an OMNeT++ configured with both WITH_OSG=yes and WITH_VSG=yes contains both 3D backends, selected per simulation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The feature description said VisualizationOsg and VisualizationVsg are mutually exclusive; that is no longer true after the backend-neutral cScene3DNode change. There is no `conflicts` between them, so both can be enabled together in an OMNeT++ built with WITH_OSG + WITH_VSG, each scene rendering on the backend its visualizer creates. (VisualizationVsg is still initiallyEnabled=false, so enable it explicitly for coexistence.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nehandle.h The five OSG source files adopted in this PR #include "qtenv/osg/osgscenehandle.h", which lives under $(OMNETPP_ROOT)/src. That include path was only added by the VisualizationVsg makefrag block (line 81), so an OSG-only build (VisualizationOsg enabled, VisualizationVsg disabled — the common existing configuration) could not find the header and failed to compile. Add -I$(OMNETPP_ROOT)/src to the VisualizationOsg block, mirroring the VSG block. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for the analysis — went through all four findings. Summary: one real bug (now fixed + verified), three not actionable. Details below. 1. OSG-only build failure (missing include path) — fixed in
|
What
Companion to omnetpp/omnetpp-dev
topic/VSG(backend-neutralcScene3DNode, PR omnetpp/omnetpp-dev#5). Updates INET's OSG and VSG visualizers to the renderer-neutral scene-handle API so INET builds and runs against an OMNeT++ that contains both 3-D backends, with the renderer chosen per simulation.How
omnetpp::createScene3DNode()when callingcOsgCanvas::setScene().getOsgRoot()/getVsgRoot()instead of castingcScene3DNodedirectly to a scene-graph type.SceneOsgVisualizer,SceneOsgEarthVisualizer,SceneOsgVisualizerBase,OsgScene,GeographicCoordinateSystemSceneVsgVisualizer,VsgSceneVerified
Built against an OMNeT++ with both backends. From the same build: INET OSG showcase (
showcases/visualizer/osg/networknode,oppqtenv-osg) and VSG showcases (vsgsignal,vsgsignal3d,vsglidar,vsgsignalwave,oppqtenv-vsg) each render on the correct backend.Requires the omnetpp-dev
topic/VSGchange (PR omnetpp/omnetpp-dev#5) to build.🤖 Generated with Claude Code