I am making an application in TEveBrowser and I need to hide Geometry scene, so only Event scene is present.
There is a check box in TEveBrowser for this options shown on the picture below:
But I want to make a separate button for this, therefore I need this peace of code.
Can I somehow see the code for hiding geometry in TEveBrowser?
Or do You maybe know how can I hide the geometry without searching through code?
tn = new TEveGeoTopNode(gGeoManager, gGeoManager->GetTopNode());
gEve->AddGlobalElement(tn,0); // 0 is default parent[/code]
And when the previous Check Button (SI - Geometry scene) is unchecked the geometry is not visible.
I have tried to use the following command to hide the geometry, but I get the segmentation error.
I have found mistake. I haven’t included this: TEveViewer.
Now, there is no syntax error and it compiles . But when I click on the button, I get the segmentation error.
I execute the code using Visual Studio 2012 and root v. 5.26.
[quote=“AryaStark”]I execute the code using Visual Studio 2012 and root v. 5.26.[/quote]You cannot use Visual Studio 2012. You must use the same version of Visual Studio than the one which has been used to build ROOT itself (and there is no version of ROOT compatible with Visual Studio 2012).
You were right!
I have extracted my class from Visual Studio and I have compiled it using ROOT like one of the examples in tutorial.
Also I have added the previous code for hiding geometry as a method.
Now, everything works, and I don’t have any segmentation errors!
We can say that this thread is [color=#00BF00]solved [/color](and that the problem was in Visual Studio)
PS: At some point, I will still have to put the code in Visual Studio, and when the project is over make a binary exe file of it. Is there maybe some tutorial or forum thread where I can see how to do so, without having segmentation errors?
Thank you!
[quote=“AryaStark”]PS: At some point, I will still have to put the code in Visual Studio, and when the project is over make a binary exe file of it. Is there maybe some tutorial or forum thread where I can see how to do so, without having segmentation errors?[/quote] If you just need to build a standalone application, you can take a look at the examples in the $ROOTSYS/test directory, using the Makefile.win32 nmake makefile. But you will still need the exact same version than the one used to build ROOT itself.