Main Content

images.ui.graphics3d.events.AnnotationMovedEventData Class

Namespace: images.ui.graphics3d.events
Superclasses: event.EventData

Event data is passed when annotation is moved

Since R2024a

Description

The images.ui.graphics3d.events.AnnotationMovedEventData class is the class passed to listeners when you move an annotation within a Viewer3D object. When the object triggers an event using the notify handle class method, MATLAB® assigns values to the properties of an AnnotationMovedEventData object and passes that object to the listener callback function (the event handler).

The images.ui.graphics3d.events.AnnotationMovedEventData 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 an AnnotationMovedEventData object when called to trigger an event.

Properties

expand all

Event source, specified as a handle to the Viewer3D 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

Annotation that has moved within the viewer, specified as a Point or Line object. Each Point object specifies a 3-D point annotation, and each Line object specifies a 3-D line annotation.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Current location of the annotation, specified as a 3-element vector of the form [x y z].

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Previous location of the annotation, specified as a 3-element vector of the form [x y z].

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Examples

collapse all

This code defines a callback function that gets the event properties from the images.ui.graphics3d.events.AnnotationMovedEventData object passed to it when the event is triggered.

function myCallbk(s,evtData)
   eventSource = evtData.Source;
   eventName = evtData.EventName;
   eventAnnotation = evtData.Annotation;
   eventCurrPos = evtData.Position;
   eventPrevPos = evtData.PreviousPosition;
   ...
end

Version History

Introduced in R2024a