images.ui.graphics3d.events.CameraMovedEventData Class
Namespace: images.ui.graphics3d.events
Superclasses: event.EventData
Event data is passed when camera of 3-D viewer is being interactively moved
Since R2022b
Description
The images.ui.graphics3d.events.CameraMovedEventData
class is the class
passed to listeners when the camera of a Viewer3D object is
moving. When the object triggers an event using the notify
handle class method, MATLAB® assigns values to the properties of a CameraMovedEventData
object
and passes that object to the listener callback function (the event handler).
The images.ui.graphics3d.events.CameraMovedEventData
class is a handle
class.
Class Attributes
ConstructOnLoad | true |
HandleCompatible | true |
For information on class attributes, see Class Attributes.
Creation
The notify
handle class method creates a
CameraMovedEventData
object when called to trigger an event.
Properties
Source
— Event source
Viewer3D
object | Volume
object | Surface
object
Event source, specified as a handle to the Viewer3D
object that triggered the event.
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
EventName
— Name of event
character vector
Name of the event, specified as a character vector.
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
CameraPosition
— Current camera position
3-element vector
Current camera position, or viewpoint, specified as a 3-element vector of the form
[x
y
z]. The camera is oriented along the view axis, which is a straight
line that connects the camera position and the camera target. Changing the
property changes the point
from which you view the volume. For an illustration, see Camera Graphics Terminology.CameraPosition
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
CameraTarget
— Current camera target
3-element vector
Current camera target, specified as a 3-element vector of the form [x y z]. The camera is oriented along the view axis, which is a straight line that connects the camera position and the camera target. For an illustration, see Camera Graphics Terminology.
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
CameraUpVector
— Current upwards direction
3-element vector
Current upwards direction, specified as a 3-element vector of the form
[x
y
z]. By default, the z-axis is the up direction
([0 0 1]
). For an illustration, see Camera Graphics Terminology.
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
CameraZoom
— Current camera zoom level
positive number
Current camera zoom level, specified as a positive number.
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
PreviousCameraPosition
— Previous camera position
3-element vector
Previous camera position, or the viewpoint, specified as a 3-element vector of the
form [x
y
z]. The camera is oriented along the view axis, which is a straight
line that connects the camera position and the camera target. Changing the
property changes the point
from which you view the volume. For an illustration, see Camera Graphics Terminology.CameraPosition
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
PreviousCameraTarget
— Previous camera target
3-element vector
Previous camera target, specified as a 3-element vector of the form [x y z]. The camera is oriented along the view axis, which is a straight line that connects the camera position and the camera target. For an illustration, see Camera Graphics Terminology.
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
PreviousCameraUpVector
— Previous upwards direction
3-element vector
Previous upwards direction, specified as a 3-element vector of the form
[x
y
z]. By default, the z-axis is the up direction
([0 0 1]
). For an illustration, see Camera Graphics Terminology.
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
PreviousCameraZoom
— Previous camera zoom level
positive number
Previous camera zoom level, specified as a positive number.
Attributes:
GetAccess | public |
SetAccess | private |
GetObservable | true |
SetObservable | true |
Data Types: char
Examples
Access Event Data
Get the event properties from the
images.ui.graphics3d.events.CameraMovedEventData
object passed to
this callback function when the event is triggered.
function myCallbk(s,evtData) eventSource = evtData.Source; eventName = evtData.EventName; currZoom = evtData.CameraZoom; prevZoom = evtData.PreviousCameraZoom; ... end
Version History
Introduced in R2022b
See Also
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)