Blender V4.3
transform_mode_rotate.cc File Reference
#include <cstdlib>
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_task.h"
#include "BKE_report.hh"
#include "BKE_unit.hh"
#include "ED_screen.hh"
#include "UI_interface.hh"
#include "transform.hh"
#include "transform_convert.hh"
#include "transform_snap.hh"
#include "transform_mode.hh"

Go to the source code of this file.

Classes

struct  RotateMatrixCache
 
struct  TransDataArgs_Rotate
 
struct  TransDataArgs_RotateTLS
 

Functions

Transform (Rotation) Matrix Cache
static void rmat_cache_init (RotateMatrixCache *rmc, const float angle, const float axis[3])
 
static void rmat_cache_reset (RotateMatrixCache *rmc)
 
static void rmat_cache_update (RotateMatrixCache *rmc, const float axis[3], const float angle)
 
Transform (Rotation) Element
static void transdata_elem_rotate (const TransInfo *t, const TransDataContainer *tc, TransData *td, const float axis[3], const float angle, const float angle_step, const bool is_large_rotation, RotateMatrixCache *rmc)
 
static void transdata_elem_rotate_fn (void *__restrict iter_data_v, const int iter, const TaskParallelTLS *__restrict tls)
 
Transform (Rotation)
static float RotationBetween (TransInfo *t, const float p1[3], const float p2[3])
 
static void ApplySnapRotation (TransInfo *t, float *value)
 
static float large_rotation_limit (float angle)
 
static void applyRotationValue (TransInfo *t, float angle, const float axis[3], const bool is_large_rotation)
 
static bool uv_rotation_in_clip_bounds_test (const TransInfo *t, const float angle)
 
static bool clip_uv_transform_rotate (const TransInfo *t, float *vec, float *vec_inside_bounds)
 
static void applyRotation (TransInfo *t)
 
static void applyRotationMatrix (TransInfo *t, float mat_xform[4][4])
 
static void initRotation (TransInfo *t, wmOperator *)
 

Variables

TransModeInfo TransMode_rotate
 

Function Documentation

◆ applyRotation()

◆ applyRotationMatrix()

◆ applyRotationValue()

◆ ApplySnapRotation()

static void ApplySnapRotation ( TransInfo * t,
float * value )
static

◆ clip_uv_transform_rotate()

static bool clip_uv_transform_rotate ( const TransInfo * t,
float * vec,
float * vec_inside_bounds )
static

Definition at line 305 of file transform_mode_rotate.cc.

References angle(), ELEM, max_i(), and uv_rotation_in_clip_bounds_test().

Referenced by applyRotation().

◆ initRotation()

◆ large_rotation_limit()

static float large_rotation_limit ( float angle)
static

Definition at line 211 of file transform_mode_rotate.cc.

References angle(), fabsf, float, fmodf, and M_PI.

Referenced by applyRotation(), and applyRotationValue().

◆ rmat_cache_init()

static void rmat_cache_init ( RotateMatrixCache * rmc,
const float angle,
const float axis[3] )
static

◆ rmat_cache_reset()

static void rmat_cache_reset ( RotateMatrixCache * rmc)
static

Definition at line 49 of file transform_mode_rotate.cc.

References RotateMatrixCache::do_update_matrix.

Referenced by transdata_elem_rotate().

◆ rmat_cache_update()

static void rmat_cache_update ( RotateMatrixCache * rmc,
const float axis[3],
const float angle )
static

◆ RotationBetween()

◆ transdata_elem_rotate()

◆ transdata_elem_rotate_fn()

static void transdata_elem_rotate_fn ( void *__restrict iter_data_v,
const int iter,
const TaskParallelTLS *__restrict tls )
static

◆ uv_rotation_in_clip_bounds_test()

static bool uv_rotation_in_clip_bounds_test ( const TransInfo * t,
const float angle )
static

Variable Documentation

◆ TransMode_rotate

TransModeInfo TransMode_rotate
Initial value:
= {
0,
nullptr,
nullptr,
}
static void initRotation(TransInfo *t, wmOperator *)
static void applyRotation(TransInfo *t)
static float RotationBetween(TransInfo *t, const float p1[3], const float p2[3])
static void ApplySnapRotation(TransInfo *t, float *value)
static void applyRotationMatrix(TransInfo *t, float mat_xform[4][4])

Definition at line 431 of file transform_mode_rotate.cc.

Referenced by mode_info_get().