images.ui.graphics.events.CameraMovedEventData Class
Namespace: images.ui.graphics.events
Superclasses: event.EventData
Event data is passed when camera of viewer is being interactively moved
Renamed from images.ui.graphics3d.events.CameraMovedEventData in R2024b
Description
The images.ui.graphics.events.CameraMovedEventData
class is the class
passed to listeners when the camera of a Viewer 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.graphics.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
Viewer
object | Volume
object | Surface
object
Event source, specified as a handle to the Viewer
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.graphics.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 R2022bR2024b: Renamed from images.ui.graphics3d.events.CameraMovedEventData
To reflect new workflows, the
images.ui.graphics3d.events.CameraMovedEventData
class is now called
images.ui.graphics.events.CameraMovedEventData
. There are no plans to
remove support for references to the old name.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)