Blender V2.61 - r43446
Defines | Functions

util_math.h File Reference

#include <float.h>
#include <math.h>
#include <stdio.h>
#include "util_types.h"

Go to the source code of this file.

Defines

#define _USE_MATH_DEFINES
#define M_PI_F   ((float)3.14159265358979323846264338327950288)
#define M_PI_2_F   ((float)1.57079632679489661923132169163975144)
#define M_PI_4_F   ((float)0.785398163397448309615660845819875721)
#define M_1_PI_F   ((float)0.318309886183790671537767526745028724)
#define M_2_PI_F   ((float)0.636619772367581343075535053490057448)

Functions

__device_inline int max (int a, int b)
__device_inline int min (int a, int b)
__device_inline float max (float a, float b)
__device_inline float min (float a, float b)
__device_inline double max (double a, double b)
__device_inline double min (double a, double b)
__device_inline float min4 (float a, float b, float c, float d)
__device_inline float max4 (float a, float b, float c, float d)
__device_inline int clamp (int a, int mn, int mx)
__device_inline float clamp (float a, float mn, float mx)
__device_inline float signf (float f)
__device_inline float nonzerof (float f, float eps)
__device_inline bool is_zero (const float2 a)
__device_inline float average (const float2 a)
__device_inline float2 operator- (const float2 a)
__device_inline float2 operator* (const float2 a, const float2 b)
__device_inline float2 operator* (const float2 a, float f)
__device_inline float2 operator* (float f, const float2 a)
__device_inline float2 operator/ (float f, const float2 a)
__device_inline float2 operator/ (const float2 a, float f)
__device_inline float2 operator/ (const float2 a, const float2 b)
__device_inline float2 operator+ (const float2 a, const float2 b)
__device_inline float2 operator- (const float2 a, const float2 b)
__device_inline float2 operator+= (float2 &a, const float2 b)
__device_inline float2 operator*= (float2 &a, const float2 b)
__device_inline float2 operator*= (float2 &a, float f)
__device_inline float2 operator/= (float2 &a, const float2 b)
__device_inline float2 operator/= (float2 &a, float f)
__device_inline float dot (const float2 a, const float2 b)
__device_inline float cross (const float2 a, const float2 b)
__device_inline float len (const float2 a)
__device_inline float2 normalize (const float2 a)
__device_inline float2 normalize_len (const float2 a, float *t)
__device_inline bool operator== (const float2 a, const float2 b)
__device_inline bool operator!= (const float2 a, const float2 b)
__device_inline float2 min (float2 a, float2 b)
__device_inline float2 max (float2 a, float2 b)
__device_inline float2 clamp (float2 a, float2 mn, float2 mx)
__device_inline float2 fabs (float2 a)
__device_inline float2 as_float2 (const float4 a)
__device_inline void print_float2 (const char *label, const float2 &a)
__device_inline float2 interp (float2 a, float2 b, float t)
__device_inline bool is_zero (const float3 a)
__device_inline float average (const float3 a)
__device_inline float3 operator- (const float3 a)
__device_inline float3 operator* (const float3 a, const float3 b)
__device_inline float3 operator* (const float3 a, float f)
__device_inline float3 operator* (float f, const float3 a)
__device_inline float3 operator/ (float f, const float3 a)
__device_inline float3 operator/ (const float3 a, float f)
__device_inline float3 operator/ (const float3 a, const float3 b)
__device_inline float3 operator+ (const float3 a, const float3 b)
__device_inline float3 operator- (const float3 a, const float3 b)
__device_inline float3 operator+= (float3 &a, const float3 b)
__device_inline float3 operator*= (float3 &a, const float3 b)
__device_inline float3 operator*= (float3 &a, float f)
__device_inline float3 operator/= (float3 &a, const float3 b)
__device_inline float3 operator/= (float3 &a, float f)
__device_inline float dot (const float3 a, const float3 b)
__device_inline float3 cross (const float3 a, const float3 b)
__device_inline float len (const float3 a)
__device_inline float3 normalize (const float3 a)
__device_inline float3 normalize_len (const float3 a, float *t)
__device_inline bool operator== (const float3 a, const float3 b)
__device_inline bool operator!= (const float3 a, const float3 b)
__device_inline float3 min (float3 a, float3 b)
__device_inline float3 max (float3 a, float3 b)
__device_inline float3 clamp (float3 a, float3 mn, float3 mx)
__device_inline float3 fabs (float3 a)
__device_inline float3 float4_to_float3 (const float4 a)
__device_inline float4 float3_to_float4 (const float3 a)
__device_inline void print_float3 (const char *label, const float3 &a)
__device_inline float3 interp (float3 a, float3 b, float t)
__device_inline bool is_zero (const float4 &a)
__device_inline float average (const float4 &a)
__device_inline float4 operator- (const float4 &a)
__device_inline float4 operator* (const float4 &a, const float4 &b)
__device_inline float4 operator* (const float4 &a, float f)
__device_inline float4 operator* (float f, const float4 &a)
__device_inline float4 operator/ (const float4 &a, float f)
__device_inline float4 operator/ (const float4 &a, const float4 &b)
__device_inline float4 operator+ (const float4 &a, const float4 &b)
__device_inline float4 operator- (const float4 &a, const float4 &b)
__device_inline float4 operator+= (float4 &a, const float4 &b)
__device_inline float4 operator*= (float4 &a, const float4 &b)
__device_inline float4 operator/= (float4 &a, float f)
__device_inline float dot (const float4 &a, const float4 &b)
__device_inline float4 cross (const float4 &a, const float4 &b)
__device_inline float4 min (float4 a, float4 b)
__device_inline float4 max (float4 a, float4 b)
__device_inline void print_float4 (const char *label, const float4 &a)
__device_inline int3 max (int3 a, int3 b)
__device_inline int3 clamp (const int3 &a, int mn, int mx)
__device_inline int3 clamp (const int3 &a, int3 &mn, int mx)
__device_inline void print_int3 (const char *label, const int3 &a)
__device_inline int4 operator>= (float4 a, float4 b)
__device_inline void print_int4 (const char *label, const int4 &a)
__device_inline unsigned int as_uint (float f)
__device_inline int __float_as_int (float f)
__device_inline float __int_as_float (int i)
__device_inline uint __float_as_uint (float f)
__device_inline float __uint_as_float (uint i)
template<class A , class B >
lerp (const A &a, const A &b, const B &t)
__device_inline float triangle_area (const float3 v1, const float3 v2, const float3 v3)
__device_inline void make_orthonormals (const float3 N, float3 *a, float3 *b)

Define Documentation

#define _USE_MATH_DEFINES

Definition at line 29 of file util_math.h.

#define M_1_PI_F   ((float)0.318309886183790671537767526745028724)
#define M_2_PI_F   ((float)0.636619772367581343075535053490057448)

Definition at line 54 of file util_math.h.

#define M_PI_2_F   ((float)1.57079632679489661923132169163975144)

Definition at line 45 of file util_math.h.

Referenced by bsdf_ward_sample(), safe_asinf(), and sky_radiance().

#define M_PI_4_F   ((float)0.785398163397448309615660845819875721)

Definition at line 48 of file util_math.h.

Referenced by concentric_sample_disk(), and to_unit_disk().

#define M_PI_F   ((float)3.14159265358979323846264338327950288)

Function Documentation

__device_inline int __float_as_int ( float  f)
__device_inline uint __float_as_uint ( float  f)

Definition at line 759 of file util_math.h.

References i.

Referenced by ray_offset().

__device_inline float __int_as_float ( int  i)
__device_inline float __uint_as_float ( uint  i)

Definition at line 766 of file util_math.h.

References i.

Referenced by ray_offset().

__device_inline float2 as_float2 ( const float4  a)

Definition at line 330 of file util_math.h.

References make_float2(), float4::x, and float4::y.

__device_inline unsigned int as_uint ( float  f)

Definition at line 738 of file util_math.h.

References i.

__device_inline float average ( const float2  a)
__device_inline float average ( const float4 a)

Definition at line 567 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float average ( const float3  a)

Definition at line 362 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline float3 clamp ( float3  a,
float3  mn,
float3  mx 
)

Definition at line 522 of file util_math.h.

References max, and min.

__device_inline float2 clamp ( float2  a,
float2  mn,
float2  mx 
)

Definition at line 320 of file util_math.h.

References max, and min.

__device_inline float clamp ( float  a,
float  mn,
float  mx 
)

Definition at line 134 of file util_math.h.

References max, and min.

__device_inline int3 clamp ( const int3 a,
int  mn,
int  mx 
)

Definition at line 691 of file util_math.h.

References clamp, int3::x, int3::y, and int3::z.

__device_inline int3 clamp ( const int3 a,
int3 mn,
int  mx 
)

Definition at line 697 of file util_math.h.

References clamp, int3::x, int3::y, and int3::z.

__device_inline int clamp ( int  a,
int  mn,
int  mx 
)

Definition at line 129 of file util_math.h.

References max, and min.

__device_inline float4 cross ( const float4 a,
const float4 b 
)

Definition at line 654 of file util_math.h.

References float4::x, float4::y, and float4::z.

__device_inline float cross ( const float2  a,
const float2  b 
)

Definition at line 273 of file util_math.h.

References float2::x, and float2::y.

__device_inline float3 cross ( const float3  a,
const float3  b 
)

Definition at line 470 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float dot ( const float4 a,
const float4 b 
)

Definition at line 649 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float dot ( const float3  a,
const float3  b 
)

Definition at line 465 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline float dot ( const float2  a,
const float2  b 
)

Definition at line 268 of file util_math.h.

References float2::x, and float2::y.

__device_inline float3 fabs ( float3  a)

Definition at line 527 of file util_math.h.

References fabsf, make_float3(), float3::x, float3::y, and float3::z.

__device_inline float2 fabs ( float2  a)

Definition at line 325 of file util_math.h.

References fabsf, make_float2(), float2::x, and float2::y.

__device_inline float4 float3_to_float4 ( const float3  a)

Definition at line 539 of file util_math.h.

References make_float4(), float3::x, float3::y, and float3::z.

Referenced by Camera::device_update().

__device_inline float3 float4_to_float3 ( const float4  a)
__device_inline float3 interp ( float3  a,
float3  b,
float  t 
)

Definition at line 553 of file util_math.h.

__device_inline float2 interp ( float2  a,
float2  b,
float  t 
)
__device_inline bool is_zero ( const float4 a)

Definition at line 562 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline bool is_zero ( const float3  a)

Definition at line 357 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline bool is_zero ( const float2  a)

Definition at line 158 of file util_math.h.

References float2::x, and float2::y.

Referenced by direct_emission(), and kernel_path_integrate().

__device_inline float len ( const float3  a)

Definition at line 478 of file util_math.h.

References dot(), and sqrtf.

__device_inline float len ( const float2  a)

Definition at line 282 of file util_math.h.

References dot(), and sqrtf.

Referenced by add_struct(), add_text(), add_type(), addblur_rect(), addblur_rect_key(), KX_GameObject::AlignAxisToVect(), alter_co(), an_stringdec(), apply_heights_callback(), area_quad_v3(), area_tri_v3(), arraysize(), AUD_LimiterReader::AUD_LimiterReader(), AUD_readSound(), AUD_readSoundBuffer(), avi_fetchibuf(), BKE_add_image_file(), BKE_add_movieclip_file(), BKE_image_user_get_frame(), BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), BKE_rebase_path(), BKE_report(), BLI_add_slash(), BLI_ascii_strtolower(), BLI_ascii_strtoupper(), BLI_del_slash(), BLI_dir_free_space(), BLI_dynstr_appendf(), BLI_dynstr_vappendf(), BLI_edgefill(), BLI_exists(), BLI_has_parent(), BLI_jitterate1(), BLI_linklist_length(), BLI_str_utf8_as_unicode(), BLI_str_utf8_as_unicode_and_size(), BLI_str_utf8_as_unicode_step(), BLI_str_utf8_from_unicode(), BLI_str_utf8_size(), BLI_strcasestr(), BLI_strdupcat(), BLI_strdupn(), BLI_strescape(), BLI_stringdec(), BLI_strlen_utf8(), BLI_strncasecmp(), BLI_strncpy_wchar_as_utf8(), BLI_strncpy_wchar_from_utf8(), BLI_system_thread_count(), BLI_uniquename_cb(), BLI_wstrlen_utf8(), BLO_is_a_library(), BME_bevel_initialize(), BME_bevel_mesh(), BME_bevel_poly(), BME_bevel_split_edge(), BME_bmesh_to_derivedmesh(), BME_bmesh_to_editmesh(), BME_cycle_length(), BME_cycle_remove(), BME_cycle_validate(), BME_derivedmesh_to_bmesh(), BME_disk_count_edgeflag(), BME_disk_hasedge(), BME_disk_remove_edge(), BME_editmesh_to_bmesh(), BME_is_nonmanifold_vert(), BME_JEKV(), BME_KF(), BME_loop_find_loop(), BME_loop_reverse(), BME_MF(), BME_radial_find_face(), BME_radial_remove_loop(), BME_SFME(), BME_split_edge(), bmesh_dissolve_disk(), boid_brain(), bone_autoside_name(), boxPack2D(), boxPack_FromPyObject(), boxPack_ToPyObject(), bpath_traverse_id(), BPY_context_member_get(), BPy_IDGroup_CorrectListLen(), BPy_IDProperty_Map_ValidateAndCreate(), bpy_text_import(), BPy_Wrap_GetKeys(), brush_curve_strength(), brush_curve_strength_clamp(), brush_painter_paint(), btAdjustInternalEdgeContacts(), btStrLen(), Buffer_to_list(), Buffer_to_list_recursive(), bvh_instance_pop(), bvh_instance_push(), calc_edge_stress_add(), calcArcCorrelation(), calchandle_curvemap(), calchandleNurb(), calculate_speedvector(), calculate_structlens(), btTransformUtil::calculateDiffAxisAngle(), btTransformUtil::calculateDiffAxisAngleQuaternion(), check_for_dupid(), checkPackedFile(), clampto_evaluate(), cloth_calc_helper_forces(), column_widths(), STR_String::Concat(), console_insert_exec(), console_line_insert(), STR_String::Copy(), correct_bezpart(), createArc(), curve_to_displist(), delete_exec(), densfunc(), dist_to_line_segment_v2(), DM_add_tangent_layer(), DNA_elem_array_size(), do_grab_brush(), do_material_tex(), do_snake_hook_brush(), doEdgeSlide(), dquat_to_mat4(), draw_brackets(), draw_distortion(), draw_motion_path_instance(), drawfloor(), drawgrid(), duplicateNurb(), ED_armature_from_edit(), eff_calc_visibility(), elementsize(), ensure_digits(), exr_rgba_channelname(), KX_Camera::ExtractFrustumSphere(), extrudeflagNurb(), fcurve_path_rename(), FHT(), fillrect(), find_elem(), find_first_points(), flatten_string(), flatten_string_append(), flip_side_name(), followtrack_evaluate(), fsmenu_read_bookmarks(), fsmenu_read_system(), gearGL(), get_part_from_ibuf(), get_suggest_prefix(), Projections::getBoxMask(), Projections::getChildrenMasks(), GHOST_SystemWin32::getClipboard(), AUD_LimiterReader::getLength(), AUD_DelayReader::getLength(), Projections::getSubProjectionsSimple(), RAS_MeshObject::GetVertex(), GHOST_SystemCocoa::GHOST_SystemCocoa(), GHOST_WindowX11::GHOST_WindowX11(), gpu_str_skip_token(), GPU_texture_convert_pixels(), hash(), idp_sequence_type(), imb_exr_split_channel_name(), IMB_indexer_get_frame_index(), init_render_dm(), init_render_mesh(), btDefaultSerializer::initDNA(), insert_text_exec(), interleave_rect(), interp_weights_poly_v3(), is_basis_mball(), is_hidden_file(), is_track_clean(), knife_cut_exec(), KX_ConstraintActuator::KX_ConstraintActuator(), labda_PdistVL2Dfl(), lasso_inside(), layer_menu(), light_distribution_sample(), load_fluidsimspeedvectors(), load_tex(), M_Geometry_box_pack_2d(), make_memhead_header(), make_pass_name(), make_structDNA(), makeBevelList(), makeDispListSurf(), makeNurbcurve(), makeNurbfaces(), map_to_sphere(), map_to_tube(), mathutils_rna_vector_set(), mbvh_instance_pop(), mbvh_instance_push(), md5_stream(), mean_value_half_tan(), MEM_mapallocN(), mesh_add_edges(), mesh_add_faces(), mesh_add_verts(), mesh_layers_menu_charlen(), meshdeform_intersect(), meshdeform_ray_tree_intersect(), AUD_SoftwareDevice::mix(), my_memcmp(), mywrite(), new_folder_path(), nlaedit_split_strip_actclip(), node_animation_properties(), normalize(), normalize_len(), normalize_m4(), normalize_m4_m4(), normalize_qt(), NPP_Write(), RAS_MeshObject::NumVertices(), object_set_dimensions(), occ_find_bbox_axis(), oldreadcolrs(), operator_search_cb(), outliner_buttons(), output_iris(), p_chart_boundaries(), p_chart_minimum_area_angle(), p_chart_symmetry_pins(), pass_menu(), paste_selection(), permutate(), pose_slide_apply_props(), poselib_preview_handle_search(), posttrans_fcurve_clean(), preprocess_include(), btSphereSphereCollisionAlgorithm::processCollision(), prop_subscript_ass_array_int(), btSoftBody::PSolve_Links(), psys_get_dupli_path_transform(), ptcache_file_compressed_read(), ptcache_filename(), pyrna_array_contains_py(), pyrna_deferred_register_class_recursive(), pyrna_math_object_from_array(), pyrna_param_to_py(), pyrna_prop_array_ass_subscript(), pyrna_prop_array_iter(), pyrna_prop_array_subscript(), pyrna_prop_array_subscript_int(), pyrna_prop_collection_ass_subscript(), pyrna_prop_collection_ass_subscript_int(), pyrna_prop_collection_subscript(), pyrna_prop_collection_subscript_int(), pyrna_prop_str(), pyrna_py_from_array_index(), qbvh_instance_pop(), qbvh_instance_push(), Quaternion_angle_set(), Quaternion_axis_vector_set(), radial_control_get_path(), AUD_SequencerReader::read(), AUD_ReverseReader::read(), AUD_LoopReader::read(), AUD_LinearResampleReader::read(), AUD_LimiterReader::read(), AUD_DoubleReader::read(), AUD_DelayReader::read(), reconstruct_elem(), reopen_text(), resizeArcBuckets(), btSolve2LinearConstraint::resolveBilateralPairConstraint(), btSolve2LinearConstraint::resolveUnilateralPairConstraint(), RIG_parentControl(), RNA_function_call_direct_va(), rna_generate_property(), RNA_parameter_length_get(), rna_parameter_size(), RNA_path_resolve_full(), rna_path_token(), RNA_property_as_string(), RNA_property_boolean_get_default_index(), RNA_property_boolean_get_index(), RNA_property_boolean_set_index(), RNA_property_collection_move(), RNA_property_collection_remove(), RNA_property_copy(), RNA_property_float_get_default_index(), RNA_property_float_get_index(), RNA_property_float_set_index(), RNA_property_int_get_default_index(), RNA_property_int_get_index(), RNA_property_int_set_index(), RNA_property_multi_array_length(), RNA_property_reset(), rna_token_strip_quotes(), rule_avoid_collision(), rule_follow_leader(), rule_goal_avoid(), rule_separate(), MT_Vector3::safe_normalized(), scene_intersect(), scroll_printstr(), AUD_LoopReader::seek(), AUD_FFMPEGReader::seek(), seg_intersect(), seq_tx_set_final_right(), sequencer_change_path_exec(), btDefaultSerializer::serializeName(), btDiscreteDynamicsWorld::serializeRigidBodies(), btCollisionShape::serializeSingleShape(), btSoftRigidDynamicsWorld::serializeSoftBodies(), session_print(), set_case(), STR_String::SetLength(), setNearestAxis3d(), sound_new_file(), sphere_do(), EdgeDice::stitch_triangles(), STR_gHash(), STR_String::STR_String(), string_dup(), svm_node_camera(), svm_vector_math(), svm_wave(), switch_endian_knots(), CcdPhysicsController::SynchronizeMotionStates(), system_cpu_thread_count(), DiagSplit::T(), test_endian_zbuf(), test_pointer_array(), text_cursor_set_to_pos_wrapped(), text_font_draw_character_utf8(), text_insert_invoke(), texttool_docs_show(), texttool_suggest_add(), texttool_suggest_prefix(), time_draw_cache(), to_hex_char(), toggle_case_exec(), transform_uniform_scale(), triangle_area(), IsoSurface::triangulate(), txt_comment(), txt_format_line(), txt_indent(), txt_insert_buf(), txt_utf8_len(), txttl_cmp(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_item_array(), ui_item_name_add_colon(), ui_item_rna_size(), ui_layer_but_cb(), ui_textedit_copypaste(), ui_textedit_delete(), ui_textedit_delete_selection(), ui_textedit_move(), ui_textedit_type_buf(), UI_view2d_text_cache_add(), UI_view2d_text_cache_rectf(), uiItemFullR(), uiTemplateList(), unique_name(), unit_as_string(), unit_scale_str(), update_string(), btSoftBody::updateNormals(), validate_array_length(), voronoi_distance(), weight_sample_invoke(), wm_read_exotic(), WM_write_file(), AUD_FFMPEGWriter::write(), writedata(), AUD_FileWriter::writeReader(), and zmask_rect().

template<class A , class B >
A lerp ( const A &  a,
const A &  b,
const B &  t 
)

Definition at line 775 of file util_math.h.

References A, and B.

__device_inline void make_orthonormals ( const float3  N,
float3 a,
float3 b 
)
__device_inline float3 max ( float3  a,
float3  b 
)

Definition at line 516 of file util_math.h.

References make_float3(), max, float3::x, float3::y, and float3::z.

__device_inline double max ( double  a,
double  b 
)

Definition at line 105 of file util_math.h.

__device_inline float2 max ( float2  a,
float2  b 
)

Definition at line 314 of file util_math.h.

References max, float2::x, and float2::y.

__device_inline int max ( int  a,
int  b 
)

Definition at line 85 of file util_math.h.

__device_inline float4 max ( float4  a,
float4  b 
)

Definition at line 665 of file util_math.h.

References make_float4(), max, float4::w, float4::x, float4::y, and float4::z.

__device_inline int3 max ( int3  a,
int3  b 
)

Definition at line 685 of file util_math.h.

References max, int3::x, int3::y, and int3::z.

__device_inline float max ( float  a,
float  b 
)

Definition at line 95 of file util_math.h.

__device_inline float max4 ( float  a,
float  b,
float  c,
float  d 
)

Definition at line 122 of file util_math.h.

References max.

Referenced by bvh_node_intersect(), and qbvh_bb_intersect().

__device_inline float min ( float  a,
float  b 
)

Definition at line 100 of file util_math.h.

__device_inline float3 min ( float3  a,
float3  b 
)

Definition at line 510 of file util_math.h.

References make_float3(), min, float3::x, float3::y, and float3::z.

__device_inline float2 min ( float2  a,
float2  b 
)

Definition at line 308 of file util_math.h.

References min, float2::x, and float2::y.

__device_inline int min ( int  a,
int  b 
)

Definition at line 90 of file util_math.h.

__device_inline float4 min ( float4  a,
float4  b 
)

Definition at line 660 of file util_math.h.

References make_float4(), min, float4::w, float4::x, float4::y, and float4::z.

__device_inline double min ( double  a,
double  b 
)

Definition at line 110 of file util_math.h.

__device_inline float min4 ( float  a,
float  b,
float  c,
float  d 
)

Definition at line 117 of file util_math.h.

References min.

Referenced by bvh_node_intersect(), and qbvh_bb_intersect().

__device_inline float nonzerof ( float  f,
float  eps 
)

Definition at line 146 of file util_math.h.

References eps, fabsf, and signf().

__device_inline float2 normalize ( const float2  a)

Definition at line 287 of file util_math.h.

References len().

__device_inline float3 normalize ( const float3  a)

Definition at line 485 of file util_math.h.

References len().

__device_inline float2 normalize_len ( const float2  a,
float *  t 
)
__device_inline float3 normalize_len ( const float3  a,
float *  t 
)

Definition at line 492 of file util_math.h.

References len().

__device_inline bool operator!= ( const float3  a,
const float3  b 
)

Definition at line 505 of file util_math.h.

__device_inline bool operator!= ( const float2  a,
const float2  b 
)

Definition at line 303 of file util_math.h.

__device_inline float2 operator* ( const float2  a,
const float2  b 
)

Definition at line 182 of file util_math.h.

References float2::x, and float2::y.

__device_inline float2 operator* ( const float2  a,
float  f 
)

Definition at line 188 of file util_math.h.

References float2::x, and float2::y.

__device_inline float2 operator* ( float  f,
const float2  a 
)

Definition at line 194 of file util_math.h.

References float2::x, and float2::y.

__device_inline float4 operator* ( const float4 a,
const float4 b 
)

Definition at line 578 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float4 operator* ( const float4 a,
float  f 
)

Definition at line 584 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float4 operator* ( float  f,
const float4 a 
)

Definition at line 590 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float3 operator* ( const float3  a,
const float3  b 
)

Definition at line 375 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float3 operator* ( const float3  a,
float  f 
)

Definition at line 381 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float3 operator* ( float  f,
const float3  a 
)

Definition at line 387 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float4 operator*= ( float4 a,
const float4 b 
)

Definition at line 630 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float2 operator*= ( float2 a,
const float2  b 
)

Definition at line 238 of file util_math.h.

References float2::x, and float2::y.

Referenced by ATTRIBUTE_ALIGNED16().

__device_inline float2 operator*= ( float2 a,
float  f 
)

Definition at line 245 of file util_math.h.

References float2::x, and float2::y.

__device_inline float3 operator*= ( float3 a,
const float3  b 
)

Definition at line 432 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline float3 operator*= ( float3 a,
float  f 
)

Definition at line 440 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline float4 operator+ ( const float4 a,
const float4 b 
)

Definition at line 609 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float2 operator+ ( const float2  a,
const float2  b 
)

Definition at line 219 of file util_math.h.

References float2::x, and float2::y.

__device_inline float3 operator+ ( const float3  a,
const float3  b 
)

Definition at line 412 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float4 operator+= ( float4 a,
const float4 b 
)

Definition at line 621 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float2 operator+= ( float2 a,
const float2  b 
)

Definition at line 231 of file util_math.h.

References float2::x, and float2::y.

Referenced by ATTRIBUTE_ALIGNED16().

__device_inline float3 operator+= ( float3 a,
const float3  b 
)

Definition at line 424 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline float4 operator- ( const float4 a)

Definition at line 572 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float2 operator- ( const float2  a,
const float2  b 
)

Definition at line 225 of file util_math.h.

References float2::x, and float2::y.

__device_inline float3 operator- ( const float3  a)

Definition at line 369 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float3 operator- ( const float3  a,
const float3  b 
)

Definition at line 418 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float4 operator- ( const float4 a,
const float4 b 
)

Definition at line 615 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float2 operator- ( const float2  a)

Definition at line 176 of file util_math.h.

References float2::x, and float2::y.

Referenced by btConeTwistConstraint::computeTwistLimitInfo().

__device_inline float3 operator/ ( float  f,
const float3  a 
)

Definition at line 393 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float3 operator/ ( const float3  a,
float  f 
)

Definition at line 399 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float4 operator/ ( const float4 a,
float  f 
)

Definition at line 596 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float2 operator/ ( const float2  a,
const float2  b 
)

Definition at line 213 of file util_math.h.

References float2::x, and float2::y.

__device_inline float4 operator/ ( const float4 a,
const float4 b 
)

Definition at line 603 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float3 operator/ ( const float3  a,
const float3  b 
)

Definition at line 406 of file util_math.h.

References make_float3(), float3::x, float3::y, and float3::z.

__device_inline float2 operator/ ( const float2  a,
float  f 
)

Definition at line 206 of file util_math.h.

References float2::x, and float2::y.

__device_inline float2 operator/ ( float  f,
const float2  a 
)

Definition at line 200 of file util_math.h.

References float2::x, and float2::y.

__device_inline float2 operator/= ( float2 a,
const float2  b 
)

Definition at line 252 of file util_math.h.

References float2::x, and float2::y.

Referenced by ATTRIBUTE_ALIGNED16().

__device_inline float2 operator/= ( float2 a,
float  f 
)

Definition at line 259 of file util_math.h.

References float2::x, and float2::y.

__device_inline float3 operator/= ( float3 a,
float  f 
)

Definition at line 456 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline float4 operator/= ( float4 a,
float  f 
)

Definition at line 639 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

__device_inline float3 operator/= ( float3 a,
const float3  b 
)

Definition at line 448 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline bool operator== ( const float3  a,
const float3  b 
)

Definition at line 500 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline bool operator== ( const float2  a,
const float2  b 
)

Definition at line 298 of file util_math.h.

References float2::x, and float2::y.

__device_inline int4 operator>= ( float4  a,
float4  b 
)

Definition at line 718 of file util_math.h.

References make_int4(), float4::w, float4::x, float4::y, and float4::z.

__device_inline void print_float2 ( const char *  label,
const float2 a 
)

Definition at line 339 of file util_math.h.

References float2::x, and float2::y.

__device_inline void print_float3 ( const char *  label,
const float3 a 
)

Definition at line 546 of file util_math.h.

References float3::x, float3::y, and float3::z.

__device_inline void print_float4 ( const char *  label,
const float4 a 
)

Definition at line 674 of file util_math.h.

References float4::w, float4::x, float4::y, and float4::z.

Referenced by print_transform().

__device_inline void print_int3 ( const char *  label,
const int3 a 
)

Definition at line 707 of file util_math.h.

References int3::x, int3::y, and int3::z.

__device_inline void print_int4 ( const char *  label,
const int4 a 
)

Definition at line 727 of file util_math.h.

References int4::w, int4::x, int4::y, and int4::z.

__device_inline float signf ( float  f)

Definition at line 141 of file util_math.h.

Referenced by do_displace(), nonzerof(), and svm_node_set_bump().

__device_inline float triangle_area ( const float3  v1,
const float3  v2,
const float3  v3 
)