My SplitterState parts viewports

Hello!

as a byproduct, i wrote a SplitterState. Here in the video the SplitterState are not wise composed, the composition serves to demonstrate the possibility of interlocking these below one another. the outer viewport starts at
cam.setViewPort (0.1f, 0.9f, 0.06f, 0.9f);
and will be enlarged again later.

A SplitterState sets the viewport to pause.
replacedViewPort.setEnabled(false);
Adds two new ViewPorts vp1 and vp2 with their own root nodes. Such a ViewPort vp1 or vp2 can be put to sleep (pause) in the next SplitterState in order to generate two other ViewPorts vp3 and vp4.

If the slack original ViewPort is resized, then vp1 and vp2 are adjusted. Since vp1 and vp2 are suddenly resized and since one of the two is the basis for vp3 and vp4, v3 and v4 are also adjusted recursively.

SplittBars are shown in the guiNode.

P.S.

Problem with camera update is solved.

1 Like