TView on TPad

Hi all,
I want to visualize my geometry. It seems to work OK, but there is a question.
I want to know how does the TView class works. Can I set some parameters (like SetParallel or Top) forcibly while I’m creating my geometry?
Shoul I update my Pad? Should I do smth else?

When I try to save the canvas as *.C file I cannot find there an interesting information :frowning:

Yes you can set some parameters like SetParallel in TView. See:

So what am I doing wrong in this code:

TView *view=new TView(1);
view->SetParallel();  // seems this doesn't work :(
...//creating geometry

where should I specify my view settings?

And also another question:
Is it possible to paint different nodes made from the same TGeoVolume in different colors?
For example I have a set of scintillator counters and I want to paint them according to their energy release.

Just do things the opposite way, since TGeoVolume::Draw() creates a TView object that you are replacing…

...//creating geometry
TView *view = pad1->GetView();
view->... whatever with TView API


Thanks a lot :smiley:

One more question. :blush:
When I save the canvas to ps-file I obtain there a perspective view.

...// [i]something is done with other pads on the canvas[/i] [b]can1[/b].

What should I do to obtain a parallel one?

I do not see this problem. I have executed rootgeom.C. I set “perspective” or “parapel” from the TView pop up menu in the canvas, saved the canvas into a PS file: The PS file is always identical to what is visible on the screen (ie: perspecive or parallel view). May be you have a little script showing the problem ?

While executing rootgeom.C I’ve found the same problem.
I set the parallel view from a popup menu, then I save the picture in ps-file using the main menu. And in ps-file I obtain a picture with a perpective view. The picture on visible screen is changing to the perspective view after I choose “Save ->”.
Also when I drag cursor over the canvas with a parralel view (without pressing any buttons on the mouse or in the keyboard) the view becomes perpsective!

The same things happen when I execute my script.

ROOT version 4.04/02f