0

two viewports. One master, the other slave

Anonymous 10 years ago updated by ไอยดา สุรีวงค์ 3 years ago 1
This discussion was imported from CodePlex

steunissen wrote at 2011-07-28 11:00:

I have two viewports which should have identical camera positions and properties.

One viewport is used as a "master" in which I manipulate my camera (view point, position etc etc). The other view cannot be manipulated but should follow any camera change I make in the master view.

Possibly there are better solutions and I'd love to hear them, but this is how I solved it now :

I have added a HelixView3D.CameraChanged event to the master view. This copies all camera properties from the master to the slave :

 

NonShadedView.ViewHelix.Camera.Position = ShadedView.ViewHelix.Camera.Position;
NonShadedView.ViewHelix.Camera.FarPlaneDistance = ShadedView.ViewHelix.Camera.FarPlaneDistance;
NonShadedView.ViewHelix.Camera.LookDirection = ShadedView.ViewHelix.Camera.LookDirection;

....................etc.

 

The only thing not working is a change in Field of View.

I cannot find which property defines the Field of View. Possibly it is not set as public ?

Any help appreciated.

Sander.


steunissen wrote at 2011-07-29 13:03:

Found the answer myself:

reference the camera as a perspective camera and you are good to go ! The field of view property is available

 

Sander.


objo wrote at 2011-09-14 09:25:

see the new ContourDemo, it is using master-slave views.