Main Content

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

expand all

Event source, specified as a handle to the Viewer object that triggered the event.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Name of the event, specified as a character vector.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Data Types: char

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 CameraPosition property changes the point from which you view the volume. For an illustration, see Camera Graphics Terminology.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Data Types: char

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

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

Current camera zoom level, specified as a positive number.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Data Types: char

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 CameraPosition property changes the point from which you view the volume. For an illustration, see Camera Graphics Terminology.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Data Types: char

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

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

Previous camera zoom level, specified as a positive number.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Data Types: char

Examples

collapse all

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 R2022b

expand all