The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



MouseAction


Unit:SDL_rot3d
Class:TRot3D
Declaration:property MouseAction: TMouseActMode;

The property MouseAction facilitates interactive rotating and zooming of the data. This property may take one of the following five values:

maDrawMTrace The mouse movement is recorded if the left mouse button is pressed. The recorded mouse trace is displayed. See MouseTrace for details.
maNone No built-in interaction is possible. The only way to apply a mouse controlled action is by utilizing the mouse events.
maPan The data can be moved across the graphics area of Rot3D.
maRotAndZoom This mode is a combination of maRotate and maZoom. The rotation is accomplished by pressing the left mouse button, the zooming is performed by using the right mouse button. Note, that this mode may interfere with a pop-up menu assigned to Rot3D.
maRotate The data can be rotated by pressing and holding the left mouse button. The rotation of the data image will then follow the mouse movement. There are two modes of mapping the mouse movement to the 3D rotation (see property MouseRot3Axes).
maZoom The user can zoom into the data by holding the left mouse button down and moving the mouse vertically. The magnification factor increases when moving upwards, and decreases when moving downwards.

Hint 1: These interactive modes will function smoothly only on a powerful computer with a proper graphics card.

Hint 2: When rotating the data interactively (in 3-axes-mode - see property MouseRot3Axes), the mapping between the vertical mouse movement and the rotation angles depends on the value of the property ViewAngleZ. A value of 90 degrees for ViewAngleZ is a good choice.

Hint 3: In the case of type ambiguities concerning maNone please visit the SDL TechnNotes.

Example: This property is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): exrot3d



Last Update: 2023-Dec-14