Blender V2.61 - r43446
|
#include <stdlib.h>
#include <math.h>
#include "DNA_screen_types.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "WM_types.h"
#include "transform.h"
#include "MEM_guardedalloc.h"
Go to the source code of this file.
Functions | |
static void | InputVector (TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) |
static void | InputSpring (TransInfo *UNUSED(t), MouseInput *mi, const int mval[2], float output[3]) |
static void | InputSpringFlip (TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) |
static void | InputTrackBall (TransInfo *UNUSED(t), MouseInput *mi, const int mval[2], float output[3]) |
static void | InputHorizontalRatio (TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) |
static void | InputHorizontalAbsolute (TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) |
static void | InputVerticalRatio (TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) |
static void | InputVerticalAbsolute (TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) |
void | setCustomPoints (TransInfo *UNUSED(t), MouseInput *mi, int start[2], int end[2]) |
static void | InputCustomRatio (TransInfo *UNUSED(t), MouseInput *mi, const int mval[2], float output[3]) |
static void | InputAngle (TransInfo *UNUSED(t), MouseInput *mi, const int mval[2], float output[3]) |
void | initMouseInput (TransInfo *UNUSED(t), MouseInput *mi, int center[2], int mval[2]) |
static void | calcSpringFactor (MouseInput *mi) |
void | initMouseInputMode (TransInfo *t, MouseInput *mi, MouseInputMode mode) |
void | setInputPostFct (MouseInput *mi, void(*post)(struct TransInfo *, float[3])) |
void | applyMouseInput (TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) |
int | handleMouseInput (TransInfo *t, MouseInput *mi, wmEvent *event) |
Definition in file transform_input.c.
void applyMouseInput | ( | TransInfo * | t, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) |
Definition at line 386 of file transform_input.c.
References MouseInput::apply, NULL, and MouseInput::post.
Referenced by initMouseInputMode(), and transformEvent().
static void calcSpringFactor | ( | MouseInput * | mi | ) | [static] |
Definition at line 298 of file transform_input.c.
References MouseInput::center, MouseInput::factor, MouseInput::imval, and sqrt().
Referenced by initMouseInputMode().
int handleMouseInput | ( | TransInfo * | t, |
MouseInput * | mi, | ||
wmEvent * | event | ||
) |
Definition at line 399 of file transform_input.c.
References copy_v2_v2_int(), KM_PRESS, LEFTSHIFTKEY, MOD_PRECISION, TransInfo::modifiers, wmEvent::mval, MouseInput::precision, MouseInput::precision_mval, RIGHTSHIFTKEY, TREDRAW_HARD, TREDRAW_NOTHING, wmEvent::type, and wmEvent::val.
Referenced by transformEvent().
void initMouseInput | ( | TransInfo * | UNUSEDt, |
MouseInput * | mi, | ||
int | center[2], | ||
int | mval[2] | ||
) |
Definition at line 284 of file transform_input.c.
References MouseInput::center, MouseInput::factor, MouseInput::imval, NULL, MouseInput::post, and MouseInput::precision.
void initMouseInputMode | ( | TransInfo * | t, |
MouseInput * | mi, | ||
MouseInputMode | mode | ||
) |
Definition at line 311 of file transform_input.c.
References MouseInput::apply, applyMouseInput(), calcSpringFactor(), MouseInput::center, MouseInput::data, MouseInput::factor, TransInfo::helpline, HLP_ANGLE, HLP_HARROW, HLP_NONE, HLP_SPRING, HLP_TRACKBALL, HLP_VARROW, MouseInput::imval, INPUT_ANGLE, INPUT_CUSTOM_RATIO, INPUT_HORIZONTAL_ABSOLUTE, INPUT_HORIZONTAL_RATIO, INPUT_NONE, INPUT_SPRING, INPUT_SPRING_FLIP, INPUT_TRACKBALL, INPUT_VECTOR, INPUT_VERTICAL_ABSOLUTE, INPUT_VERTICAL_RATIO, InputAngle(), InputCustomRatio(), InputHorizontalAbsolute(), InputHorizontalRatio(), InputSpring(), InputSpringFlip(), InputTrackBall(), InputVector(), InputVerticalAbsolute(), InputVerticalRatio(), MEM_callocN(), MEM_freeN(), NULL, and TransInfo::values.
Referenced by handleEventShear(), initAlign(), initBakeTime(), initBevel(), initBevelWeight(), initBoneEnvelope(), initBoneRoll(), initBoneSize(), initCrease(), initCurveShrinkFatten(), initEdgeSlide(), initMirror(), initPushPull(), initResize(), initRotation(), initSeqSlide(), initShear(), initShrinkFatten(), initTilt(), initTimeScale(), initTimeSlide(), initTimeTranslate(), initToSphere(), initTrackball(), initTranslation(), and initWarp().
static void InputAngle | ( | TransInfo * | UNUSEDt, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 223 of file transform_input.c.
References A, angle(), B, MouseInput::center, MouseInput::data, MouseInput::imval, MouseInput::precision, saacos(), and sqrt().
Referenced by initMouseInputMode().
static void InputCustomRatio | ( | TransInfo * | UNUSEDt, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 190 of file transform_input.c.
References MouseInput::data, data, distance(), length(), MouseInput::precision, MouseInput::precision_mval, and sqrt().
Referenced by initMouseInputMode().
static void InputHorizontalAbsolute | ( | TransInfo * | t, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 137 of file transform_input.c.
References dot_v3v3(), InputVector(), project_v3_v3v3(), and TransInfo::viewinv.
Referenced by initMouseInputMode().
static void InputHorizontalRatio | ( | TransInfo * | t, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 119 of file transform_input.c.
References TransInfo::ar, MouseInput::precision, MouseInput::precision_mval, and ARegion::winx.
Referenced by initMouseInputMode().
static void InputSpring | ( | TransInfo * | UNUSEDt, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 62 of file transform_input.c.
References MouseInput::center, MouseInput::factor, MouseInput::precision, MouseInput::precision_mval, and sqrt().
Referenced by initMouseInputMode(), and InputSpringFlip().
static void InputSpringFlip | ( | TransInfo * | t, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 88 of file transform_input.c.
References MouseInput::center, MouseInput::imval, and InputSpring().
Referenced by initMouseInputMode().
static void InputTrackBall | ( | TransInfo * | UNUSEDt, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 101 of file transform_input.c.
References MouseInput::factor, MouseInput::imval, MouseInput::precision, and MouseInput::precision_mval.
Referenced by initMouseInputMode().
static void InputVector | ( | TransInfo * | t, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 44 of file transform_input.c.
References add_v3_v3v3(), convertViewVec(), TransInfo::imval, mul_v3_fl(), MouseInput::precision, and MouseInput::precision_mval.
Referenced by initMouseInputMode(), InputHorizontalAbsolute(), and InputVerticalAbsolute().
static void InputVerticalAbsolute | ( | TransInfo * | t, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 164 of file transform_input.c.
References dot_v3v3(), InputVector(), project_v3_v3v3(), and TransInfo::viewinv.
Referenced by initMouseInputMode().
static void InputVerticalRatio | ( | TransInfo * | t, |
MouseInput * | mi, | ||
const int | mval[2], | ||
float | output[3] | ||
) | [static] |
Definition at line 147 of file transform_input.c.
References TransInfo::ar, MouseInput::precision, MouseInput::precision_mval, and ARegion::winy.
Referenced by initMouseInputMode().
void setCustomPoints | ( | TransInfo * | UNUSEDt, |
MouseInput * | mi, | ||
int | start[2], | ||
int | end[2] | ||
) |
Definition at line 174 of file transform_input.c.
References MouseInput::data, data, MEM_callocN(), and NULL.
void setInputPostFct | ( | MouseInput * | mi, |
void(*)(struct TransInfo *, float[3]) | post | ||
) |
Definition at line 381 of file transform_input.c.
References MouseInput::post, and post.
Referenced by initRotation(), initShear(), and initWarp().