From 20cf5deb46c59b80141931d9ef6ca3a17a90c97b Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Sun, 12 Nov 2006 09:52:03 +0000 Subject: [PATCH] Some clearer comments on the meaning of the tabletdata struct's variables --- intern/ghost/GHOST_Types.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 4abecce50c1..d5575354370 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -55,11 +55,18 @@ typedef enum GHOST_kSuccess } GHOST_TSuccess; +/* Xtilt and Ytilt represent how much the pen is tilted away from + * vertically upright in either the X or Y direction, with X and Y the + * axes of the tablet surface. + * In other words, Xtilt and Ytilt are components of a vector created by projecting + * the pen's angle in 3D space vertically downwards on to the XY plane + * --Matt + */ typedef struct GHOST_TabletData { char Active; /* 0=None, 1=Stylus, 2=Eraser */ - float Pressure; - float Xtilt; - float Ytilt; + float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */ + float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */ + float Ytilt; /* as above */ } GHOST_TabletData;