|
@@ -825,7 +825,7 @@ Viewer::Viewer(roadmanager::OpenDrive* odrManager, const char* modelFilename, co
|
|
|
envTx_->setNodeMask(NodeMask::NODE_MASK_ENV_MODEL);
|
|
|
rootnode_->addChild(envTx_);
|
|
|
|
|
|
- ClearNodeMaskBits(NodeMask::NODE_MASK_TRAILS); // hide trails per default
|
|
|
+ ClearNodeMaskBits(NodeMask::NODE_MASK_TRAILS); // hide trails per default
|
|
|
ClearNodeMaskBits(NodeMask::NODE_MASK_OSI_LINES);
|
|
|
ClearNodeMaskBits(NodeMask::NODE_MASK_OSI_POINTS);
|
|
|
ClearNodeMaskBits(NodeMask::NODE_MASK_OBJECT_SENSORS);
|
|
@@ -886,23 +886,23 @@ Viewer::Viewer(roadmanager::OpenDrive* odrManager, const char* modelFilename, co
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (environment_ == 0)
|
|
|
- {
|
|
|
- if (odrManager->GetNumOfRoads() > 0)
|
|
|
- {
|
|
|
- // No visual model of the road network loaded
|
|
|
- // Generate a simplistic 3D model based on OpenDRIVE content
|
|
|
- LOG("No scenegraph 3D model loaded. Generating a simplistic one...");
|
|
|
+ if (environment_ == 0)
|
|
|
+ {
|
|
|
+ if (odrManager->GetNumOfRoads() > 0)
|
|
|
+ {
|
|
|
+ // No visual model of the road network loaded
|
|
|
+ // Generate a simplistic 3D model based on OpenDRIVE content
|
|
|
+ LOG("No scenegraph 3D model loaded. Generating a simplistic one...");
|
|
|
|
|
|
- roadGeom = new RoadGeom(odrManager);
|
|
|
- environment_ = roadGeom->root_;
|
|
|
- envTx_->addChild(environment_);
|
|
|
+ roadGeom = new RoadGeom(odrManager);
|
|
|
+ environment_ = roadGeom->root_;
|
|
|
+ envTx_->addChild(environment_);
|
|
|
|
|
|
- // Since the generated 3D model is based on OSI features, let's hide those
|
|
|
- ClearNodeMaskBits(NodeMask::NODE_MASK_ODR_FEATURES);
|
|
|
- ClearNodeMaskBits(NodeMask::NODE_MASK_OSI_LINES);
|
|
|
- }
|
|
|
- }
|
|
|
+ // Since the generated 3D model is based on OSI features, let's hide those
|
|
|
+ ClearNodeMaskBits(NodeMask::NODE_MASK_ODR_FEATURES);
|
|
|
+ ClearNodeMaskBits(NodeMask::NODE_MASK_OSI_LINES);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (odrManager->GetNumOfRoads() > 0 && !CreateRoadLines(odrManager))
|
|
|
{
|
|
@@ -1870,6 +1870,7 @@ bool Viewer::CreateRoadLines(roadmanager::OpenDrive* od)
|
|
|
|
|
|
osiPoints_->addChild(osi_geom);
|
|
|
|
|
|
+
|
|
|
if (lane->GetId() == 0)
|
|
|
{
|
|
|
lineWidth->setWidth(4.0f);
|