VisualizationController CATVisViewerFeedbackEvent

Usage: you must use this class as is. You should never derive it.


public class CATVisViewerFeedbackEvent

Class notification for CATViewer interactions.
Role: A such notification is sent when an interaction occurs in a which has the feedback mode active. The method enables you to set the feedback mode, and the method enables you to unset it.
This class notification offers methods to access information concerning the interaction, be it a mouse motion or a button action.
To receive such notifications, you should set a callback on a CATViewer::VIEWER_FEEDBACK_UPDATE class event.

See also:


Constructor and Destructor Index


o ~CATVisViewerFeedbackEvent()

Method Index


o GetContext()
Retrieves the context that gave birth to the event.
o GetElementsUnder()
Retrieves elements under the mouse.
o GetIntersection()
Retrieves the intersection point between the mouse pointer and the underlying geometry.
o GetMousePosition(int*,int*)
Retrieves the mouse pointer position in screen coordinates.
o GetViewer()
Retrieves the viewer that triggered the event.

Enumerated Type Index


o EventContext
Defines the notification creation context.

Constructor and Destructor


o ~CATVisViewerFeedbackEvent
public virtual ~CATVisViewerFeedbackEvent()

Methods


o GetContext
public GetContext()
Retrieves the context that gave birth to the event.
Returns:
The event context.
o GetElementsUnder
public GetElementsUnder()
Retrieves elements under the mouse.
RoleThis methods enables you to know all the elements (until the geometry level) under the mouse. The elements in the are sorted: the first (0 index) is the nearest, and the last (n-1 index) is the further.
Returns:
The set of element under the mouse.
o GetIntersection
public GetIntersection()
Retrieves the intersection point between the mouse pointer and the underlying geometry.
Returns:
The intersection point.
o GetMousePosition
public GetMousePosition( oXPixel,
oYPixel)
Retrieves the mouse pointer position in screen coordinates.
Parameters:
oXPixel
The X position. The range of the value is between 0 and the width (-1) of the support (
).
oXPixel increases from left to right.
oYPixel
The Y position. The range of the value is between 0 and the height (-1) of the support (
).
oYPixel increases from top to bottom.
o GetViewer
public GetViewer()
Retrieves the viewer that triggered the event.
Returns:
The viewer.

Enumerated Types


o EventContext
enum EventContext {
  Preactivate,
  MoveOver,
  Move,
  EndPreactivate,
  BeginManipulate,
  Activate,
  Context,
  EndManipulate
}
Defines the notification creation context.
Parameters:
Preactivate
There are two cases to consider:
  • The mouse pointer, coming from the background, enters on a graphic representation. Two notifications with the following context are sent in this order:
    1. A EndPreactivate context: The pointer returned by
is null
  • A Preactivate context: The pointer returned by is not null
  • The mouse pointer leaves a graphic representation to the background. Two notifications with the following context are sent in this order:
    1. A EndPreactivate context: The pointer returned by is not null
    2. A Preactivate context: The pointer returned by is null
    MoveOver
    The mouse pointer leaves a graphic representation to enter on a new one. The pointer returned by
    is not null.
    Move
    The mouse pointer moves on a graphic representation or the background. In the first case, the pointer returned by
    is not null, otherwise the pointer is nul.
    EndPreactivate
    There are two cases to consider:
    • The mouse pointer, coming from the background, enters on a graphic representation. Two notifications with the following context are sent in this order:
      1. A EndPreactivate context: The pointer returned by
    is null
  • A Preactivate context: The pointer returned by is not null
  • The mouse pointer leaves a graphic representation to the background. Two notifications with the following context are sent in this order:
    1. A EndPreactivate context: The pointer returned by is not null
    2. A Preactivate context: The pointer returned by is null
    BeginManipulate
    If a graphic representation is taken for manipulation, the pointer returned by
    is not null, otherwise if the background is taken for manipulation, the pointer is null.
    Activate
    If a graphic representation is selected, the pointer returned by
    is not null, otherwise if the background is selected, the pointer is null.
    Context
    Contextual action is asked. If a graphic representation is selected, the pointer returned by
    is not null, otherwise if the background is selected, the pointer is null.
    EndManipulate
    When a manipulation is ended, the manipulated object is released, the pointer returned by
    is not null, otherwise if the background is selected, the pointer is null.

    This object is included in the file: CATVisViewerFeedbackEvent.h
    If needed, your Imakefile.mk should include the module: CATVisController

    Copyright © 1999-2014, Dassault Systèmes. All rights reserved.