File Exchange

image thumbnail

View Contol Widget

version 1.1.0.0 (6.43 KB) by Kevin Moerman
Makes 3D view interactions feel like what one would expect from a CAD package

4 Downloads

Updated 01 Mar 2019

View License

Intuitive manipulation of a figure using key and mouse gestures. Makes view interactions feel like what one would expect from a CAD package.
Usage:
figure; surf(peaks(25); vcw; %After plotting
figure; vcw; %Before plotting
Users can specify the functionality for mouse buttons.

VCW is inspired by and similar to fcw function by Oliver Woodford. However vcw offers the following added features (including toolbar button):

1) handing of colorbars (bug in fcw when view(2) is used combined with panning which induced zooming and panning)
2) overobj based axes selection so that the current axes is determined based on mouse pointer location for most functions
3) A toggle button for activation and deactivation in the figure toolbar
4) ability to start vcw before objects are plotted
5) "proper" closure of the vcw widget, in fcw the q button did not exit the keyDown functions such as panning etc. Now the quit action deactivates the widget
6) Upon activation of the vcw widget the plotting and default view manipulation tools and buttons are disabled
(to avoid interference with vcw)
7) Added "linked" mode by using ALT button to alter views for all axes in figure uppon keypress
8) Altered keypress functions and behaviour with SHIFT (which now negates directions)
9) Added i key option to display help information.
10) Allows for saving of a new default view

Cite As

Kevin Moerman (2019). View Contol Widget (https://www.mathworks.com/matlabcentral/fileexchange/50663-view-contol-widget), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Thanks for posting this Michael. Camview was an external function one should download but it seems missing now so I've added it to the latest version. Let me know how you get on.
Note that future developments of VCW will take place as part of the GIBBON project (https://www.gibboncode.org/) and will no longer be added here.

I tried the code but get the following error:
Undefined function or variable 'camview'

Error in vcw>start_vcw_toggle (line 133)
start_vcw(x{1},x{2},x{3});

is the function camview missing? Thx

Apologies there was a missing function (overobj2) which has now been added.

Kevin

awesome :)

Updates

1.1.0.0

Added missing function overobj2

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Figure control widget