Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2007-08-31 02:02:32 +0400
committerMartin Poirier <theeth@yahoo.com>2007-08-31 02:02:32 +0400
commit800c6db46fd3d45c1ef16f1ba5f2ce4ab0fd9307 (patch)
tree851ae596f87b455c3051a1189f9ebe07de1a912a /source/blender/include/BIF_transform.h
parent7f6bb8d8ccd49b3f14f9799962bfa37d47beef68 (diff)
Some cleanup of the ndof functions:
Moving filterNDOFvalues and getndof to editscreen.c/BIF_mywindow.h (this might not be the best spot but it matches table/mouse functions) Adding missing function definition in include files and fix declaration mixup (void functions used as int, short pointer used as float pointer) New NDofInput model for transform (reusable externally in the future): Handles ndof events, accumulates values and enables remapping and rescaling values to fit any axis combinaison into a float[3] (this could be extended in the future, also, it doesn't support out of order axis right now). Compatible with "gears" (Ctrl key) New transform context for pure NDof input transform (entered when using Transform mode on the device). In this mode, transform "transactions" are automatically confirmed when the device returns to its rest position Rotation on Z triggers a rotation (axis is perpendicular to the screen as usual, constraints works as expected) Rotation on X/Y triggers trackball rotation Translation on X/Y/Z triggers translation (doesn't support constraints correctly). The device can also be used during a "normal" transform operation. In this case, there is no auto confirm but button 1 (right) can be used to confirm while button 2 is used to clear the NDof input (back to mouse input). NDof support was added to translation, rotation and trackball (as previously mentionned) but also to Tilt (same as rotation) and Push/Pull (move device along Z axis). This is a bit preliminary work, so everyone should feel free to comment and send suggestions. NOTE: this commit also merges revision 11523 from the trunk
Diffstat (limited to 'source/blender/include/BIF_transform.h')
-rw-r--r--[-rwxr-xr-x]source/blender/include/BIF_transform.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/include/BIF_transform.h b/source/blender/include/BIF_transform.h
index 3b5eeb6f35a..a8abcabc4cb 100755..100644
--- a/source/blender/include/BIF_transform.h
+++ b/source/blender/include/BIF_transform.h
@@ -62,10 +62,12 @@
#define CTX_EDGE 2
#define CTX_NO_PET 4
#define CTX_TWEAK 8
+#define CTX_NDOF 16
void initTransform(int mode, int context);
void Transform(void);
void Mirror(short mode);
+void NDofTransform();
/* Standalone call to get the transformation center corresponding to the current situation
* returns 1 if successful, 0 otherwise (usually means there's no selection)
@@ -81,9 +83,12 @@ void BIF_setSingleAxisConstraint(float vec[3], char *text);
void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
void BIF_setLocalAxisConstraint(char axis, char *text);
void BIF_setLocalLockConstraint(char axis, char *text);
+
+/* Drawing callbacks */
void BIF_drawConstraint(void);
void BIF_drawPropCircle(void);
void BIF_drawSnap(void);
+
void BIF_getPropCenter(float *center);
void BIF_TransformSetUndo(char *str);