![Logitech Magellan/SPACE MOUSE Classic Programmer'S Manual Download Page 14](http://html1.mh-extra.com/html/logitech/magellan-space-mouse-classic/magellan-space-mouse-classic_programmers-manual_1937109014.webp)
14
<Magellan
Event>
A pointer on the data structure in which
all information on the served event is
stored.
<Magellan
TraScale>
The scaling factor multiplied by the 3
translation values of a
MagellanMotion
Event.
<Magellan
RotScale>
is the scaling factor multiplied by the 3
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
Type
Element
Name
Description
int
Magellan
Type
Contains the last stored event
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
Button
Contains the number of the last
pressed or released Magellan/
SPACE MOUSE key.
double
Magellan
Data[6]
Contains the three translational
and three rotational values.
int
Magellan
Period
Indicates which repeating data
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 Control
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.
Result:
The function always returns the value
TRUE.
File:
xdrvlib.h
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 Control
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.
Result:
The function always returns the
value TRUE.
File:
xdrvlib.h
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
.
Syntax:
int MagellanClose (<display>)
Display *<display>;
<display>
Makes the connection to the X-server firm
(see
XOpenDisplay in
<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
Summary of Contents for Magellan/SPACE MOUSE Classic
Page 1: ......