|
Blender
V2.59
|
Go to the source code of this file.
Defines | |
| #define | M_PI 3.14159265358979323846 |
| #define | M_PI_2 1.57079632679489661923 |
| #define | M_SQRT2 1.41421356237309504880 |
| #define | M_SQRT1_2 0.70710678118654752440 |
| #define | M_1_PI 0.318309886183790671538 |
| #define | M_E 2.7182818284590452354 |
| #define | M_LOG2E 1.4426950408889634074 |
| #define | M_LOG10E 0.43429448190325182765 |
| #define | M_LN2 0.69314718055994530942 |
| #define | M_LN10 2.30258509299404568402 |
| #define | MAXFLOAT ((float)3.40282347e+38) |
| #define | sqrtf(a) ((float)sqrt(a)) |
| #define | powf(a, b) ((float)pow(a, b)) |
| #define | cosf(a) ((float)cos(a)) |
| #define | sinf(a) ((float)sin(a)) |
| #define | acosf(a) ((float)acos(a)) |
| #define | asinf(a) ((float)asin(a)) |
| #define | atan2f(a, b) ((float)atan2(a, b)) |
| #define | tanf(a) ((float)tan(a)) |
| #define | atanf(a) ((float)atan(a)) |
| #define | floorf(a) ((float)floor(a)) |
| #define | ceilf(a) ((float)ceil(a)) |
| #define | fabsf(a) ((float)fabs(a)) |
| #define | logf(a) ((float)log(a)) |
| #define | expf(a) ((float)exp(a)) |
| #define | fmodf(a, b) ((float)fmod(a, b)) |
| #define | hypotf(a, b) ((float)hypot(a, b)) |
| #define | SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; } |
| #define | CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c) |
Functions | |
| MINLINE float | sqrt3f (float f) |
| MINLINE double | sqrt3d (double d) |
| MINLINE float | saacosf (float f) |
| MINLINE float | saasinf (float f) |
| MINLINE float | sasqrtf (float f) |
| MINLINE float | saacos (float fac) |
| MINLINE float | saasin (float fac) |
| MINLINE float | sasqrt (float fac) |
| MINLINE float | interpf (float a, float b, float t) |
| MINLINE float | minf (float a, float b) |
| MINLINE float | maxf (float a, float b) |
| MINLINE float | signf (float f) |
| MINLINE float | power_of_2 (float f) |
| MINLINE float | shell_angle_to_dist (float angle) |
| double | double_round (double x, int ndigits) |
Definition in file BLI_math_base.h.
| #define acosf | ( | a | ) | ((float)acos(a)) |
Definition at line 95 of file BLI_math_base.h.
Referenced by btAcos(), draw_rotation_guide(), and saacosf().
| #define asinf | ( | a | ) | ((float)asin(a)) |
Definition at line 98 of file BLI_math_base.h.
Referenced by btAsin(), flyApply_ndof(), and saasinf().
| #define atan2f | ( | a, | |
| b | |||
| ) | ((float)atan2(a, b)) |
Definition at line 101 of file BLI_math_base.h.
Referenced by btAtan2(), drawHelpline(), imp2radangle(), load_tex(), map_to_sphere(), project_bucket_clip_face(), project_from_camera(), tex_strength(), ui_hsvcircle_vals_from_pos(), and wm_gesture_evaluate().
| #define atanf | ( | a | ) | ((float)atan(a)) |
Definition at line 107 of file BLI_math_base.h.
Referenced by btAtan(), drawmball(), lens_to_angle(), and vectorscope_draw_target().
| #define ceilf | ( | a | ) | ((float)ceil(a)) |
Definition at line 113 of file BLI_math_base.h.
Referenced by bake_rasterize(), BKE_text_to_curve(), ewa_eval(), rasterize_half(), ui_fontscale(), and widget_scroll().
| #define CLAMP | ( | a, | |
| b, | |||
| c | |||
| ) | if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c) |
Definition at line 144 of file BLI_math_base.h.
| #define cosf | ( | a | ) | ((float)cos(a)) |
Definition at line 89 of file BLI_math_base.h.
Referenced by btCos(), draw_forcefield(), draw_rotation_guide(), draw_spot_cone(), drawArc(), drawHelpline(), drawlamp(), ED_view3d_ob_clip_range_get(), ED_view3d_viewplane_get(), feline_eval(), glutil_draw_filled_arc(), glutil_draw_lined_arc(), load_tex(), make_prim(), makebevelcurve(), object_camera_matrix(), p_chart_lscm_solve(), p_chart_stretch_minimize(), polar_to_x(), radangle2imp(), shell_angle_to_dist(), split_sharp_edges(), tex_strength(), and ui_draw_but_HSVCIRCLE().
| #define expf | ( | a | ) | ((float)exp(a)) |
Definition at line 122 of file BLI_math_base.h.
Referenced by btExp(), distlimit_evaluate(), fglow(), LbmFsgrSolver::LbmFsgrSolver(), vol_get_transmittance(), and waveModifier_do().
| #define fabsf | ( | a | ) | ((float)fabs(a)) |
Definition at line 116 of file BLI_math_base.h.
Referenced by alter_co(), applyModifier(), area_poly_v3(), area_tri_v2(), axisProjection(), b_bone_spline_setup(), barycentric_weights(), btFabs(), check_zone(), cmp_uv(), compare_v3v3(), compare_v4v4(), compatible_bump_compute(), compatible_bump_uv_derivs(), cuboid_do(), dist_to_line_v2(), do_displace(), do_material_tex(), do_versions(), draw_bb_quadric(), draw_ptcache_edit(), draw_rotation_guide(), draw_uvs_stretch(), draw_view_axis(), drawlamp(), edgetag_cut_cost(), EM_make_uv_vert_map(), esubdivideflag(), extrudeflag_edge(), extrudeflag_vert(), ff_visible_quad(), find_nearest_uv_vert(), find_vertex_tangent(), flyApply(), flyApply_ndof(), get_graph_keyframe_extents(), gp_draw_stroke_3d(), gp_draw_stroke_buffer(), graphkeys_euler_filter_exec(), handleNumInput(), InitTriInfo(), invert_m4_m4(), is_orthogonal_m3(), is_orthogonal_m4(), isect_sweeping_sphere_tri_v3(), line_clip_rect2f(), line_isect_x(), line_isect_y(), make_uv_vert_map(), measure_facepair(), mixImages(), my_get_local_bounds(), nearest_point_in_tri_surface(), NotZero(), nr_distance_to_edge(), object_get_dimensions(), occ_visible_quad(), p_edge_implicit_seam(), paint_calc_object_space_radius(), param_average(), precalc_wipe_zone(), project_brush_radius(), project_bucket_clip_face(), project_from_view(), psys_get_birth_coordinates(), psys_get_texture(), quat_to_axis_angle(), quat_to_mat3(), quat_to_mat4(), ramp_blend(), rasterize_half(), sculpt_clip(), select_linked_flat_faces(), select_sharp_edges_exec(), shell_angle_to_dist(), similar_edge_select__internal(), similar_face_select__internal(), simpleDeform_bend(), smooth_vertex(), splineik_evaluate_bone(), sticky_select(), sum_or_add_vertex_tangent(), svd_m4(), texture_value_blend(), ui_numedit_but_NUM(), UI_view2d_listview_view_to_cell(), and waveModifier_do().
| #define floorf | ( | a | ) | ((float)floor(a)) |
Definition at line 110 of file BLI_math_base.h.
Referenced by apply_keyb_grid(), bglPointHack(), bilinear_interpolation_color(), bilinear_interpolation_color_wrap(), BKE_image_buf_fill_checker(), calcknots(), do_math(), draw_image_grid(), drawgrid_draw(), ED_markers_post_apply_transform(), evaluate_fcurve(), ewa_eval(), flushTransGraphData(), hsv_to_rgb(), ibuf_get_color_clip_bilerp(), imagewrap(), imagewraposa_aniso(), imapaint_convert_brushco(), mod_inline(), snap_bezier_nearest(), snap_curs_to_grid(), snap_sel_to_grid(), texco_mapping(), ui_but_to_pixelrect(), UI_ColorPtrBlendShade3ubv(), ui_draw_but_curve_grid(), ui_fontscale(), ui_numedit_apply_snapf(), ui_numedit_but_CURVE(), ui_numedit_but_NUM(), ui_numedit_but_SLI(), UI_ThemeColorBlend(), UI_ThemeColorBlendShade(), UI_ThemeColorBlendShadeAlpha(), UI_view2d_listview_view_to_cell(), UI_view2d_view_ortho(), uiAlignPanelStep(), view3d_project_short_clip(), and view3d_project_short_noclip().
| #define fmodf | ( | a, | |
| b | |||
| ) | ((float)fmod(a, b)) |
Definition at line 125 of file BLI_math_base.h.
Referenced by BKE_image_buf_fill_checker(), btFmod(), cmp_uv(), give_stripelem_index(), nlastrip_get_frame_actionclip(), uvco_to_wrapped_pxco(), and waveModifier_do().
| #define hypotf | ( | a, | |
| b | |||
| ) | ((float)hypot(a, b)) |
Definition at line 128 of file BLI_math_base.h.
Referenced by svd_m4().
| #define logf | ( | a | ) | ((float)log(a)) |
Definition at line 119 of file BLI_math_base.h.
Referenced by btLog(), imagewraposa_aniso(), messageOutputFunc(), and Exception::report().
| #define M_1_PI 0.318309886183790671538 |
Definition at line 59 of file BLI_math_base.h.
Referenced by GetSkyXYZRadiance().
| #define M_E 2.7182818284590452354 |
Definition at line 62 of file BLI_math_base.h.
| #define M_LN10 2.30258509299404568402 |
Definition at line 74 of file BLI_math_base.h.
Referenced by soft_range_round_down(), and soft_range_round_up().
| #define M_LN2 0.69314718055994530942 |
Definition at line 71 of file BLI_math_base.h.
Referenced by AtmospherePixleShader(), BL_ConvertActuators(), old_mdisps_convert(), power_of_2(), and precalc_wipe_zone().
| #define M_LOG10E 0.43429448190325182765 |
Definition at line 68 of file BLI_math_base.h.
| #define M_LOG2E 1.4426950408889634074 |
Definition at line 65 of file BLI_math_base.h.
Referenced by imagewraposa_aniso().
| #define M_PI 3.14159265358979323846 |
Definition at line 47 of file BLI_math_base.h.
| #define M_PI_2 1.57079632679489661923 |
Definition at line 50 of file BLI_math_base.h.
Referenced by drawmball(), fcm_fn_generator_evaluate(), project_state_init(), and shadeHaloFloat().
| #define M_SQRT1_2 0.70710678118654752440 |
Definition at line 56 of file BLI_math_base.h.
Referenced by calctrackballvec().
| #define M_SQRT2 1.41421356237309504880 |
Definition at line 53 of file BLI_math_base.h.
Referenced by BKE_screen_view3d_zoom_from_fac(), BKE_screen_view3d_zoom_to_fac(), calctrackballvec(), KX_Dome::CreateMeshDome180(), KX_Dome::CreateMeshDome250(), KX_Dome::CreateMeshPanorama(), quat_to_mat3_no_error(), quat_to_mat4(), and spin_nurb().
| #define MAXFLOAT ((float)3.40282347e+38) |
Definition at line 79 of file BLI_math_base.h.
Referenced by bezt_to_transdata(), calc_distanceCurveVerts(), createTransEditVerts(), and UVsToTransData().
| #define powf | ( | a, | |
| b | |||
| ) | ((float)pow(a, b)) |
Definition at line 86 of file BLI_math_base.h.
Referenced by BKE_image_buf_fill_checker(), BKE_screen_view3d_zoom_to_fac(), btPow(), color_balance_fl(), colorbalance_cdl(), colorbalance_lgg(), do_path_effectors(), draw_forcefield(), draw_uvs_stretch(), gamma_correct(), linearrgb_to_rec709(), linearrgb_to_srgb(), psys_render_simplify_distribution(), rec709_to_linearrgb(), srgb_to_linearrgb(), svd_m4(), ui_draw_but_HSVCIRCLE(), ui_numedit_but_HISTOGRAM(), ui_numedit_but_NUM(), and view3d_smoothview_invoke().
| #define sinf | ( | a | ) | ((float)sin(a)) |
Definition at line 92 of file BLI_math_base.h.
Referenced by btSin(), draw_forcefield(), draw_rotation_guide(), draw_spot_cone(), drawArc(), drawHelpline(), ED_view3d_ob_clip_range_get(), ED_view3d_viewplane_get(), feline_eval(), glutil_draw_filled_arc(), glutil_draw_lined_arc(), load_tex(), make_prim(), makebevelcurve(), object_camera_matrix(), p_chart_stretch_minimize(), polar_to_y(), radangle2imp(), tex_strength(), and ui_draw_but_HSVCIRCLE().
| #define sqrtf | ( | a | ) | ((float)sqrt(a)) |
Definition at line 83 of file BLI_math_base.h.
Referenced by FLUID_3D::addSmokeTestCase(), FLUID_3D::addVorticity(), alter_co(), area_sample(), barycentric_transform(), BKE_screen_view3d_zoom_from_fac(), btSqrt(), calc_overlap(), calc_vp_alpha_dl(), curvemapping_changed(), dblur(), dist_to_line_segment_v2(), do_projectpaint_thread(), drawHelpline(), drawlamp(), ewa_eval(), face_duplilist(), face_to_crn_interp(), ff_normalize(), fglow(), find_first_points(), imagewraposa_aniso(), imp2radangle(), init_mv_jit(), InputCustomRatio(), len_v2(), len_v2v2(), len_v3(), Length(), lensDistort(), load_tex(), mat3_to_quat(), normalize_v2_v2(), normalize_v3_v3(), normalizef(), occ_lookup(), precalc_wipe_zone(), samevolume_evaluate(), sasqrtf(), smoothMask(), sph_density_accum_cb(), WTURBULENCE::stepTurbulenceFull(), svd_m4(), tex_strength(), ui_numedit_but_NORMAL(), vectorscope_draw_target(), vnormal(), and waveModifier_do().
| #define SWAP | ( | type, | |
| a, | |||
| b | |||
| ) | { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; } |
Definition at line 140 of file BLI_math_base.h.
Referenced by adduplicateflagNurb(), applyModifier(), area_copy_data(), armature_click_extrude_exec(), armature_extrude_exec(), bake_rasterize(), BKE_nlastrips_has_space(), BKE_nlatrack_has_space(), buf_rectfill_area(), bvh_partition(), change_sequence(), curvemapping_do_ibuf(), deleteflagNurb(), do_2d_mapping(), do_grab_brush(), do_strand_fillac(), doMirrorOnAxis(), drawviewborder_triangle(), dvert_mirror_op(), edge_rotate(), filldisplist(), flipface(), getLowestRoot(), imagewraposa(), imagewraposa_aniso(), imapaint_canvas_set(), IMB_flipx(), interp_weights_face_v3(), invert_m4_m4(), isect_seg_seg_v2_point(), isect_sweeping_sphere_tri_v3(), kdtree_balance(), make_edges_mdata(), makeBevelList(), mesh_get_x_mirror_faces(), multiple_scattering_diffusion(), node_composit_exec_bilateralblur(), node_update(), ob_parcurve(), occ_build_split(), old_mdisps_convert(), partition_indices(), rasterize_half(), RE_SwapResult(), RE_zbuf_accumulate_vecblur(), rotate_direction_nurb(), seq_swap(), setup_app_data(), shadeSkyView(), sort_time_beztmaps(), sort_time_fcurve(), swap_v2_v2(), swap_v3_v3(), swap_v4_v4(), switchdirection_knots(), switchdirectionNurb(), test_index_face(), texture_value_blend(), to_edgesort(), ui_but_update_from_old_block(), ui_but_update_linklines(), uiBlockFlipOrder(), uiWidgetScrollDraw(), undo_copy_tile(), viewdolly_apply(), viewzoom_apply(), widget_numbut(), widget_numslider(), widget_state(), widget_state_numslider(), widget_textbut(), zbuffer_transp_shade(), zbufshade_tile(), and zbufshadeDA_tile().
| #define tanf | ( | a | ) | ((float)tan(a)) |
Definition at line 104 of file BLI_math_base.h.
Referenced by angle_to_lens(), btTan(), and project_camera_info().
| double double_round | ( | double | x, |
| int | ndigits | ||
| ) |
Definition at line 67 of file math_base.c.
References fabs(), pow(), and round().
Referenced by Color_ToTupleExt(), Euler_ToTupleExt(), Quaternion_to_tuple_ext(), and Vector_to_tuple_ext().
| MINLINE float interpf | ( | float | a, |
| float | b, | ||
| float | t | ||
| ) |
Definition at line 100 of file math_base_inline.c.
Referenced by fcurve_eval_samples(), update_reports_display_invoke(), and weight_set_exec().
| MINLINE float maxf | ( | float | a, |
| float | b | ||
| ) |
Definition at line 125 of file math_base_inline.c.
Referenced by do_displace(), face_to_crn_interp(), heat_set_H(), isect_seg_seg_v2_point(), and svd_m4().
| MINLINE float minf | ( | float | a, |
| float | b | ||
| ) |
Definition at line 120 of file math_base_inline.c.
Referenced by gjkepa2_impl::EPA::findbest(), isect_seg_seg_v2_point(), and svd_m4().
| MINLINE float power_of_2 | ( | float | f | ) |
Definition at line 115 of file math_base_inline.c.
References KDL::log(), M_LN2, and pow().
Referenced by sequencer_view_all_preview_exec(), and view_all_exec().
| MINLINE float saacos | ( | float | fac | ) |
Definition at line 60 of file math_base_inline.c.
Referenced by accumulate_vertex_normals(), add_render_lamp(), applyModifier(), applyTranslation(), basic_rotate(), Blinn_Spec(), boid_body(), cache_key_incremental_rotation(), calc_bevel_sin_cos(), costAngle(), do_guides(), do_sky_tex(), draw_manipulator_rotate(), dupli_extrude_cursor(), dvar_eval_rotDiff(), ED_view3d_ob_clip_range_get(), ED_view3d_viewplane_get(), effector_falloff(), filterSmartReebGraph(), gpu_lamp_from_blender(), InputAngle(), lasso_inside(), makeshadowbuf(), map_to_sphere(), mat3_to_quat_is_ok(), mul_fac_qt_fl(), OrenNayar_Diff(), particle_billboard(), psys_thread_create_path(), Quaternion_getAngle(), screen_aligned(), select_linked_flat_faces(), select_sharp_edges_exec(), set_phong_threshold(), speedvector_project(), spotvolume(), Toon_Diff(), Toon_Spec(), tri_to_quat(), vec_to_quat(), Vector_angle(), and WardIso_Spec().
| MINLINE float saacosf | ( | float | f | ) |
Definition at line 80 of file math_base_inline.c.
Referenced by ff_quad_form_factor(), and occ_quad_form_factor().
| MINLINE float saasin | ( | float | fac | ) |
Definition at line 67 of file math_base_inline.c.
References KDL::asin(), and M_PI.
Referenced by angle_normalized_v2v2(), and angle_normalized_v3v3().
| MINLINE float saasinf | ( | float | f | ) |
Definition at line 87 of file math_base_inline.c.
| MINLINE float sasqrt | ( | float | fac | ) |
Definition at line 74 of file math_base_inline.c.
References sqrt().
Referenced by Blinn_Spec(), boid_body(), boid_brain(), CookTorr_Spec(), Phong_Spec(), shadeHaloFloat(), shrinkwrap_calc_nearest_surface_point(), shrinkwrap_calc_nearest_vertex(), Toon_Spec(), and WardIso_Spec().
| MINLINE float sasqrtf | ( | float | f | ) |
Definition at line 94 of file math_base_inline.c.
References sqrtf.
| MINLINE float shell_angle_to_dist | ( | float | angle | ) |
Definition at line 109 of file math_base_inline.c.
References cosf, fabsf, and SMALL_NUMBER.
Referenced by applyModifier(), EM_solidify(), and uv_image_outset().
| MINLINE float signf | ( | float | f | ) |
Definition at line 130 of file math_base_inline.c.
Referenced by do_displace().
| MINLINE double sqrt3d | ( | double | d | ) |
Definition at line 53 of file math_base_inline.c.
References KDL::exp(), and KDL::log().
Referenced by findzero().
| MINLINE float sqrt3f | ( | float | f | ) |
Definition at line 46 of file math_base_inline.c.
References KDL::exp(), and KDL::log().
Referenced by ui_numedit_but_HSVCIRCLE().