---
name: "mouse_getposition_6d"
section: "3vga"
platform: "linux"
package: "svgalibg1-dev"
version: "1:1.4.3-7"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/mouse_getposition_6d/3vga"
---

# mouse\_getposition\_6d(3vga)

provide an interface to 3d mice

## NAME

mouse\_getposition\_6d, mouse\_setposition\_6d, mouse\_setrange\_6d - provide an interface to 3d mice

## SYNOPSIS

**#include \<vgamouse.h\>**

**void mouse\_getposition\_6d(int \****x***, int \****y***, int \****z***, int \****rx* **, int \****ry***, int \****rz***);**\
 **void mouse\_setposition\_6d(int** *x***, int** *y***, int** *z***, int** *rx* **, int** *ry***, int** *rz***, int** *dim\_mask***);**\
 **void mouse\_setrange\_6d(int** *x1***, int** *x2***, int** *y1***, int** *y2***, int** *z1* **, int** *z2***, int** *rx1***, int** *rx2***, int** *ry1***, int** *ry2* **, int** *rz1***, int** *rz2***, int** *dim\_mask***);**

## DESCRIPTION

These routines provide the same function as [**mouse\_getx**(3)](/mouse_getx/3.md), [**mouse\_gety**(3)](/mouse_gety/3.md), [**mouse\_setxrange**(3)](/mouse_setxrange/3.md), [**mouse\_setyrange**(3)](/mouse_setyrange/3.md), [**mouse\_setposition**(3)](/mouse_setposition/3.md), and  [**mouse\_getx**(3)](/mouse_getx/3.md), except that they work in all six dimensions, x, y, z, and rotations about those axes.

For **mouse\_getposition\_6d()**, **NULL** pointers may be passed for any coordinate you don't care to know about.  Those dimensions will be ignored.

**mouse\_setposition\_6d()** and **mouse\_setrange\_6d()** take an additional argument called *dim\_mask*, which should be an logical or of the following: **MOUSE\_XDIM**, **MOUSE\_YDIM**, **MOUSE\_ZDIM**, **MOUSE\_RXDIM**,  **MOUSE\_RYDIM**, or **MOUSE\_RZDIM**. **MOUSE\_2DIM**, **MOUSE\_3DIM**, **MOUSE\_6DIM** can be used as shorthand for the XY, XYZ, or XYZRxRyRz dimensions.  The position or ranges will only be set if that dimension is included in *dim\_mask*.

The 6d mouse routines can be used safely with **any** mouse type, including standard 2D mice.

When used with mice that support fewer than six axes, the other coordinates will always return zero (or whatever value you set them to).

## SEE ALSO

[**svgalib**(7)](/svgalib/7.md), [**vgagl**(7)](/vgagl/7.md), [**libvga.config**(5)](/libvga.config/5.md), **eventtest**(6), [**mouse\_close**(3)](/mouse_close/3.md), [**mouse\_init**(3)](/mouse_init/3.md), [**mouse\_setposition**(3)](/mouse_setposition/3.md), [**mouse\_getx**(3)](/mouse_getx/3.md), [**mouse\_setscale**(3)](/mouse_setscale/3.md), [**mouse\_setwrap**(3)](/mouse_setwrap/3.md), [**mouse\_setxrange**(3)](/mouse_setxrange/3.md), [**mouse\_update**(3)](/mouse_update/3.md), [**mouse\_waitforupdate**(3)](/mouse_waitforupdate/3.md), [**vga\_setmousesupport**(3)](/vga_setmousesupport/3.md), [**mouse\_seteventhandler**(3)](/mouse_seteventhandler/3.md), [**vga\_waitevent**(3)](/vga_waitevent/3.md)

## AUTHOR

This manual page was edited by Michael Weller \<eowmob@exp-math.uni-essen.de\>. The exact source of the referenced function as well as of the original documentation is unknown.

It is very likely that both are at least to some extent are due to Harm Hanemaayer \<H.Hanemaayer@inter.nl.net\>.

Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections to this first version of the svgalib manual.
