64 float d1[3], d2[3], len_d1;
102 const float denominator,
109 const float epsilon = 0.25f / 65536.0f;
110 if (
fabsf(denominator) < epsilon) {
112 if (numerator < -epsilon) {
119 const float correction = numerator / denominator;
120 if (correction < 0.0f || !isfinite(correction)) {
125 if (denominator < 0.0f) {
127 if (*scale < correction) {
134 if (*scale > correction) {
144 float base_offset[2] = {0.0f, 0.0f};
158 for (
TransData *td = tc->data; td < tc->
data + tc->data_len; td++) {
161 const float *scale_origin = use_local_center ? td->center : t->
center_global;
164 const float *
min = td->loc;
165 const float *
max = td->loc;
170 scale_origin[0] - base_offset[0], scale_origin[0] -
min[0], &scale);
174 base_offset[0] + t->
aspect[0] - scale_origin[0],
max[0] - scale_origin[0], &scale);
180 scale_origin[1] - base_offset[1], scale_origin[1] -
min[1], &scale);
183 base_offset[1] + t->
aspect[1] - scale_origin[1],
max[1] - scale_origin[1], &scale);
189 return scale != 1.0f;
202 float ratio = t->
values[0];
221 float pvec[3] = {0.0f, 0.0f, 0.0f};
223 for (i = 0; i < 3; i++) {
243 for (i = 0; i < tc->data_len; i++, td++) {
273 for (i = 0; i < tc->data_len; i++, td++) {
299 float mouse_dir_constraint[3];
318 int mval_start[2], mval_end[2];
323 mul_v3_m3v3(mval_dir, viewmat, mouse_dir_constraint);
338 mval_end[0] = t->
center2d[0] + mval_dir[0];
339 mval_end[1] = t->
center2d[1] + mval_dir[1];
351#ifdef USE_NUM_NO_ZERO
int BKE_image_find_nearest_tile_with_offset(const Image *image, const float co[2], float r_uv_offset[2]) ATTR_NONNULL(2
void mul_m3_v3(const float M[3][3], float r[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void size_to_mat3(float R[3][3], const float size[3])
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void copy_m4_m3(float m1[4][4], const float m2[3][3])
void transform_pivot_set_m4(float mat[4][4], const float pivot[3])
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE bool is_zero_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3(float r[3], const float a[3])
void project_v3_v3v3(float out[3], const float p[3], const float v_proj[3])
MINLINE bool is_zero_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v2(float n[2])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
void project_v2_v2v2(float out[2], const float p[2], const float v_proj[2])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
void ED_area_status_text(ScrArea *area, const char *str)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
VecBase< float, 2 > float2
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
const TransDataContainer * tc
void(* applySize)(const TransInfo *t, const TransDataContainer *tc, const TransData *td, float r_smat[3][3])
void(* applyRot)(const TransInfo *t, const TransDataContainer *tc, const TransData *td, float r_axis[3], float *r_angle)
float values_modal_offset[4]