Logitech Magellan/SPACE MOUSE Classic Programmer's Manual page 14

Logicad3d
Table of Contents

Advertisement

<Magellan
A pointer on the data structure in which
Event>
all information on the served event is
stored.
<Magellan
The scaling factor multiplied by the 3
TraScale>
translation values of a MagellanMotion
Event .
<Magellan
is the scaling factor multiplied by the 3
RotScale>
rotation values of a MagellanMotionEvent .
Result:
The function returns the number
of the translated event. The
constants MagellanInputMotion
Event , MagellanInputButton
PressEvent and MagellanInput
ButtonReleaseEvent are possible.
If the served event is not an
event coming from the X-Window
driver, it can only return the
value FALSE.
File:
xdrvlib.h
The following table describes the structure of
the Magellan/SPACE MOUSE data.
Element
Element
Type
Name
int
Magellan
Contains the last stored event
Type
type. It can take one of the three
following values:
MotionEvent
ButtonPressEvent
ButtonReleaseEvent
These three values are combined
as constants and can be used
within switch operations.
int
Magellan
Contains the number of the last
Button
pressed or released Magellan/
SPACE MOUSE key.
Magellan
double
Contains the three translational
Data [6]
and three rotational values.
Magellan
int
Indicates which repeating data
Period
rate of the Magellan/SPACE
MOUSE can be used for
transmitting. The value is given in
milliseconds.
MagellanRotationMatrix
This function calculates the rotation matrix
from the 3 rotational inputs. Note that the
argument <Rotate> is a 4x4 matrix whose first
three rows and columns store the 3x3 rotation
matrix (see also the related appendix
Mathematics of 3D Motion
Syntax:
int MagellanRotationMatrix (<Rotate>,
<C>,<B>,<A>)
double <Rotate>[4][4];
double <C>,<B>,<A>
<Rotate>
Stores the 4x4 rotation matrix.
<C>
Rotation angle about the z-axis.
<B>
Rotation angle about the y-axis.
<A>
Rotation angle about the x-axis.
Description
Control).
Result:
The function always returns the value
TRUE.
xdrvlib.h
File:
MagellanMultiplicationMatrix
This function multiplies the data from two
rotation matrices (parameters <MatrixB> and
<MatrixC> ) and stores the results in
<MatrixA> . Note that the first three rows and
columns of <MatrixA> store the 3x3 rotation
matrix (see also the related appendix
Mathematics of 3D Motion
Syntax:
int MagellanMultiplicationMatrix
(<MatrixA>,<MatrixB>,<MatrixC>)
double <MatrixA>[4][4];
double <MatrixB>[4][4];
double <MatrixC>[4][4];
<MatrixA>
Stores the result of the multiplication of
<MatrixB> and <MatrixC> .
<MatrixB>
Contains the first operand of the
multiplication operation.
<MatrixC>
Contains the second operand of the
multiplication operation.
The function always returns the
Result:
value TRUE.
xdrvlib.h
File:
MagellanClose
This function closes the software interface to
the X-Window driver. The driver sends the
information received from Magellan/SPACE
MOUSE events to the window that contains an
input focus. The connection to the X-Window
driver can be opened at anytime with the
function MagellanInit .
int MagellanClose (<display>)
Syntax:
Display *<display>;
<display>
Makes the connection to the X-server firm
(see XOpenDisplay in
Manual).
<window>
The number of an opened window or the
constant InputFocus , i.e. PointerWindow
Result:
The function always returns the value
TRUE.
File:
xdrvlib.h
MagellanExist
MagellanExist is a global variable that indicates
whether the X-Window driver is active. The
variable is set as TRUE when the driver is
active and as FALSE when it is not. The value
of MagellanExist can only be changed when
called up with the function MagellanInit or
MagellanClose .
Syntax:
int MagellanExist;
File:
xdrvlib.h
14
Control).
Xlib Programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Magellan/space mouse plusMagellan/space mouse plus xt

Table of Contents