Blender V2.61 - r43446
Functions

transform_input.c File Reference

#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)

Detailed Description

Definition in file transform_input.c.


Function Documentation

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 
)
void initMouseInput ( TransInfo UNUSEDt,
MouseInput mi,
int  center[2],
int  mval[2] 
)
void initMouseInputMode ( TransInfo t,
MouseInput mi,
MouseInputMode  mode 
)
static void InputAngle ( TransInfo UNUSEDt,
MouseInput mi,
const int  mval[2],
float  output[3] 
) [static]
static void InputCustomRatio ( TransInfo UNUSEDt,
MouseInput mi,
const int  mval[2],
float  output[3] 
) [static]
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]
static void InputSpring ( TransInfo UNUSEDt,
MouseInput mi,
const int  mval[2],
float  output[3] 
) [static]
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]
static void InputVector ( TransInfo t,
MouseInput mi,
const int  mval[2],
float  output[3] 
) [static]
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]
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().