aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmath
diff options
context:
space:
mode:
authorJacek Antonelli2009-08-29 17:44:38 -0500
committerJacek Antonelli2009-08-29 22:49:51 -0500
commit6a5aab98892df74f60743f5b789959c9593d6647 (patch)
tree62da18f8540879ed01e12eeb0ce49375474272e4 /linden/indra/llmath
parentMerge branch 'mac-openal-url' into next (diff)
parentConverted 1.23 XUI files to unix line endings. (diff)
downloadmeta-impy-6a5aab98892df74f60743f5b789959c9593d6647.zip
meta-impy-6a5aab98892df74f60743f5b789959c9593d6647.tar.gz
meta-impy-6a5aab98892df74f60743f5b789959c9593d6647.tar.bz2
meta-impy-6a5aab98892df74f60743f5b789959c9593d6647.tar.xz
Merged SL 1.23.4 into Imprudence.
Conflicts: linden/doc/contributions.txt linden/indra/CMakeLists.txt linden/indra/cmake/APR.cmake linden/indra/cmake/CopyWinLibs.cmake linden/indra/cmake/OPENAL.cmake linden/indra/develop.py linden/indra/llaudio/audioengine.cpp linden/indra/llcommon/indra_constants.h linden/indra/llcommon/llversionviewer.h linden/indra/llcrashlogger/llcrashlogger.cpp linden/indra/llmedia/llmediaimplgstreamer.cpp linden/indra/llmedia/llmediaimplgstreamer.h linden/indra/llmedia/llmediaimplgstreamer_syms.cpp linden/indra/llmedia/llmediaimplgstreamer_syms.h linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc linden/indra/llmedia/llmediamanager.cpp linden/indra/llmessage/llassetstorage.cpp linden/indra/llui/lltexteditor.cpp linden/indra/llvfs/lldir.cpp linden/indra/newview/CMakeLists.txt linden/indra/newview/English.lproj/InfoPlist.strings linden/indra/newview/Info-Imprudence.plist linden/indra/newview/app_settings/logcontrol.xml linden/indra/newview/app_settings/settings.xml linden/indra/newview/installers/windows/installer_template.nsi linden/indra/newview/llagent.cpp linden/indra/newview/llappviewer.cpp linden/indra/newview/llcallingcard.cpp linden/indra/newview/llfilepicker.cpp linden/indra/newview/llfloateractivespeakers.cpp linden/indra/newview/llfloateravatarpicker.cpp linden/indra/newview/llfloaterbulkpermission.cpp linden/indra/newview/llfloaterbulkpermission.h linden/indra/newview/llfloaterchat.cpp linden/indra/newview/llfloatergodtools.cpp linden/indra/newview/llfloaterhtmlhelp.cpp linden/indra/newview/llfloatertools.cpp linden/indra/newview/llfloatertools.h linden/indra/newview/llfloatertopobjects.cpp linden/indra/newview/llinventorybridge.cpp linden/indra/newview/llinventoryview.cpp linden/indra/newview/llnetmap.cpp linden/indra/newview/llnetmap.h linden/indra/newview/llpanelland.cpp linden/indra/newview/llpanellogin.cpp linden/indra/newview/llpanelobject.cpp linden/indra/newview/llprefsim.cpp linden/indra/newview/lltexturecache.cpp linden/indra/newview/lltoolbrush.cpp linden/indra/newview/llvieweraudio.cpp linden/indra/newview/llviewermenu.cpp linden/indra/newview/llviewermessage.cpp linden/indra/newview/llviewerparcelmedia.cpp linden/indra/newview/llvoavatar.cpp linden/indra/newview/llwebbrowserctrl.cpp linden/indra/newview/llworldmapview.cpp linden/indra/newview/pipeline.cpp linden/indra/newview/res/viewerRes.rc linden/indra/newview/skins/default/colors_base.xml linden/indra/newview/skins/default/xui/de/floater_active_speakers.xml linden/indra/newview/skins/default/xui/de/floater_instant_message_ad_hoc.xml linden/indra/newview/skins/default/xui/de/floater_instant_message_group.xml linden/indra/newview/skins/default/xui/de/floater_joystick.xml linden/indra/newview/skins/default/xui/de/floater_mute_object.xml linden/indra/newview/skins/default/xui/de/floater_sim_release_message.xml linden/indra/newview/skins/default/xui/de/panel_media_controls.xml linden/indra/newview/skins/default/xui/de/panel_preferences_voice.xml linden/indra/newview/skins/default/xui/de/strings.xml linden/indra/newview/skins/default/xui/de/teleport_strings.xml linden/indra/newview/skins/default/xui/en-us/alerts.xml linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml linden/indra/newview/skins/default/xui/en-us/floater_beacons.xml linden/indra/newview/skins/default/xui/en-us/floater_bulk_perms.xml linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml linden/indra/newview/skins/default/xui/en-us/floater_chatterbox.xml linden/indra/newview/skins/default/xui/en-us/floater_inventory_view_finder.xml linden/indra/newview/skins/default/xui/en-us/floater_media_browser.xml linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml linden/indra/newview/skins/default/xui/en-us/floater_tools.xml linden/indra/newview/skins/default/xui/en-us/menu_login.xml linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml linden/indra/newview/skins/default/xui/en-us/notify.xml linden/indra/newview/skins/default/xui/en-us/panel_bars.xml linden/indra/newview/skins/default/xui/en-us/panel_groups.xml linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml linden/indra/newview/skins/default/xui/en-us/panel_mini_map.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml linden/indra/newview/skins/default/xui/en-us/strings.xml linden/indra/newview/skins/default/xui/es/alerts.xml linden/indra/newview/skins/default/xui/es/floater_about.xml linden/indra/newview/skins/default/xui/es/floater_about_land.xml linden/indra/newview/skins/default/xui/es/floater_animation_preview.xml linden/indra/newview/skins/default/xui/es/floater_auction.xml linden/indra/newview/skins/default/xui/es/floater_avatar_picker.xml linden/indra/newview/skins/default/xui/es/floater_avatar_textures.xml linden/indra/newview/skins/default/xui/es/floater_build_options.xml linden/indra/newview/skins/default/xui/es/floater_bumps.xml linden/indra/newview/skins/default/xui/es/floater_buy_contents.xml linden/indra/newview/skins/default/xui/es/floater_buy_currency.xml linden/indra/newview/skins/default/xui/es/floater_buy_land.xml linden/indra/newview/skins/default/xui/es/floater_buy_object.xml linden/indra/newview/skins/default/xui/es/floater_chat_history.xml linden/indra/newview/skins/default/xui/es/floater_choose_group.xml linden/indra/newview/skins/default/xui/es/floater_clothing.xml linden/indra/newview/skins/default/xui/es/floater_color_picker.xml linden/indra/newview/skins/default/xui/es/floater_critical.xml linden/indra/newview/skins/default/xui/es/floater_customize.xml linden/indra/newview/skins/default/xui/es/floater_directory.xml linden/indra/newview/skins/default/xui/es/floater_gesture.xml linden/indra/newview/skins/default/xui/es/floater_group_info.xml linden/indra/newview/skins/default/xui/es/floater_html.xml linden/indra/newview/skins/default/xui/es/floater_im.xml linden/indra/newview/skins/default/xui/es/floater_image_preview.xml linden/indra/newview/skins/default/xui/es/floater_import.xml linden/indra/newview/skins/default/xui/es/floater_instant_message.xml linden/indra/newview/skins/default/xui/es/floater_inventory.xml linden/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml linden/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml linden/indra/newview/skins/default/xui/es/floater_land_holdings.xml linden/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml linden/indra/newview/skins/default/xui/es/floater_moveview.xml linden/indra/newview/skins/default/xui/es/floater_mute.xml linden/indra/newview/skins/default/xui/es/floater_name_description.xml linden/indra/newview/skins/default/xui/es/floater_new_im.xml linden/indra/newview/skins/default/xui/es/floater_new_outfit_dialog.xml linden/indra/newview/skins/default/xui/es/floater_openobject.xml linden/indra/newview/skins/default/xui/es/floater_pay.xml linden/indra/newview/skins/default/xui/es/floater_pay_object.xml linden/indra/newview/skins/default/xui/es/floater_postcard.xml linden/indra/newview/skins/default/xui/es/floater_preferences.xml linden/indra/newview/skins/default/xui/es/floater_preview_animation.xml linden/indra/newview/skins/default/xui/es/floater_preview_embedded_texture.xml linden/indra/newview/skins/default/xui/es/floater_preview_gesture.xml linden/indra/newview/skins/default/xui/es/floater_preview_notecard.xml linden/indra/newview/skins/default/xui/es/floater_preview_notecard_keep_discard.xml linden/indra/newview/skins/default/xui/es/floater_preview_sound.xml linden/indra/newview/skins/default/xui/es/floater_preview_texture.xml linden/indra/newview/skins/default/xui/es/floater_preview_texture_keep_discard.xml linden/indra/newview/skins/default/xui/es/floater_price_for_listing.xml linden/indra/newview/skins/default/xui/es/floater_profile.xml linden/indra/newview/skins/default/xui/es/floater_report_abuse.xml linden/indra/newview/skins/default/xui/es/floater_script_debug.xml linden/indra/newview/skins/default/xui/es/floater_script_ed_panel.xml linden/indra/newview/skins/default/xui/es/floater_script_preview.xml linden/indra/newview/skins/default/xui/es/floater_script_queue.xml linden/indra/newview/skins/default/xui/es/floater_script_search.xml linden/indra/newview/skins/default/xui/es/floater_sell_land.xml linden/indra/newview/skins/default/xui/es/floater_settings_debug.xml linden/indra/newview/skins/default/xui/es/floater_snapshot.xml linden/indra/newview/skins/default/xui/es/floater_sound_preview.xml linden/indra/newview/skins/default/xui/es/floater_telehub.xml linden/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml linden/indra/newview/skins/default/xui/es/floater_tools.xml linden/indra/newview/skins/default/xui/es/floater_top_objects.xml linden/indra/newview/skins/default/xui/es/floater_tos.xml linden/indra/newview/skins/default/xui/es/floater_wearable_save_as.xml linden/indra/newview/skins/default/xui/es/floater_world_map.xml linden/indra/newview/skins/default/xui/es/menu_inventory.xml linden/indra/newview/skins/default/xui/es/menu_pie_attachment.xml linden/indra/newview/skins/default/xui/es/menu_pie_avatar.xml linden/indra/newview/skins/default/xui/es/menu_pie_land.xml linden/indra/newview/skins/default/xui/es/menu_pie_object.xml linden/indra/newview/skins/default/xui/es/menu_pie_self.xml linden/indra/newview/skins/default/xui/es/menu_viewer.xml linden/indra/newview/skins/default/xui/es/notify.xml linden/indra/newview/skins/default/xui/es/panel_avatar.xml linden/indra/newview/skins/default/xui/es/panel_avatar_classified.xml linden/indra/newview/skins/default/xui/es/panel_avatar_pick.xml linden/indra/newview/skins/default/xui/es/panel_chat_bar.xml linden/indra/newview/skins/default/xui/es/panel_classified.xml linden/indra/newview/skins/default/xui/es/panel_event.xml linden/indra/newview/skins/default/xui/es/panel_group.xml linden/indra/newview/skins/default/xui/es/panel_group_finder.xml linden/indra/newview/skins/default/xui/es/panel_group_general.xml linden/indra/newview/skins/default/xui/es/panel_group_invite.xml linden/indra/newview/skins/default/xui/es/panel_group_land_money.xml linden/indra/newview/skins/default/xui/es/panel_group_notices.xml linden/indra/newview/skins/default/xui/es/panel_group_roles.xml linden/indra/newview/skins/default/xui/es/panel_group_voting.xml linden/indra/newview/skins/default/xui/es/panel_land_covenant.xml linden/indra/newview/skins/default/xui/es/panel_login.xml linden/indra/newview/skins/default/xui/es/panel_overlaybar.xml linden/indra/newview/skins/default/xui/es/panel_place.xml linden/indra/newview/skins/default/xui/es/panel_place_small.xml linden/indra/newview/skins/default/xui/es/panel_preferences_audio.xml linden/indra/newview/skins/default/xui/es/panel_preferences_chat.xml linden/indra/newview/skins/default/xui/es/panel_preferences_general.xml linden/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml linden/indra/newview/skins/default/xui/es/panel_preferences_im.xml linden/indra/newview/skins/default/xui/es/panel_preferences_input.xml linden/indra/newview/skins/default/xui/es/panel_preferences_network.xml linden/indra/newview/skins/default/xui/es/panel_preferences_popups.xml linden/indra/newview/skins/default/xui/es/panel_region_covenant.xml linden/indra/newview/skins/default/xui/es/panel_region_debug.xml linden/indra/newview/skins/default/xui/es/panel_region_estate.xml linden/indra/newview/skins/default/xui/es/panel_region_general.xml linden/indra/newview/skins/default/xui/es/panel_region_terrain.xml linden/indra/newview/skins/default/xui/es/panel_region_texture.xml linden/indra/newview/skins/default/xui/es/panel_scrolling_param.xml linden/indra/newview/skins/default/xui/es/panel_status_bar.xml linden/indra/newview/skins/default/xui/es/panel_toolbar.xml linden/indra/newview/skins/default/xui/es/panel_top_pick.xml linden/indra/newview/skins/default/xui/fr/alerts.xml linden/indra/newview/skins/default/xui/fr/floater_about.xml linden/indra/newview/skins/default/xui/fr/floater_about_land.xml linden/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml linden/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml linden/indra/newview/skins/default/xui/fr/floater_beacons.xml linden/indra/newview/skins/default/xui/fr/floater_buy_contents.xml linden/indra/newview/skins/default/xui/fr/floater_buy_currency.xml linden/indra/newview/skins/default/xui/fr/floater_buy_land.xml linden/indra/newview/skins/default/xui/fr/floater_chat_history.xml linden/indra/newview/skins/default/xui/fr/floater_clothing.xml linden/indra/newview/skins/default/xui/fr/floater_customize.xml linden/indra/newview/skins/default/xui/fr/floater_directory.xml linden/indra/newview/skins/default/xui/fr/floater_god_tools.xml linden/indra/newview/skins/default/xui/fr/floater_group_info.xml linden/indra/newview/skins/default/xui/fr/floater_html.xml linden/indra/newview/skins/default/xui/fr/floater_im.xml linden/indra/newview/skins/default/xui/fr/floater_instant_message.xml linden/indra/newview/skins/default/xui/fr/floater_instant_message_group.xml linden/indra/newview/skins/default/xui/fr/floater_inventory.xml linden/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml linden/indra/newview/skins/default/xui/fr/floater_joystick.xml linden/indra/newview/skins/default/xui/fr/floater_land_holdings.xml linden/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml linden/indra/newview/skins/default/xui/fr/floater_media_browser.xml linden/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml linden/indra/newview/skins/default/xui/fr/floater_name_description.xml linden/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml linden/indra/newview/skins/default/xui/fr/floater_profile.xml linden/indra/newview/skins/default/xui/fr/floater_report_abuse.xml linden/indra/newview/skins/default/xui/fr/floater_script_search.xml linden/indra/newview/skins/default/xui/fr/floater_sell_land.xml linden/indra/newview/skins/default/xui/fr/floater_snapshot.xml linden/indra/newview/skins/default/xui/fr/floater_sound_preview.xml linden/indra/newview/skins/default/xui/fr/floater_tools.xml linden/indra/newview/skins/default/xui/fr/floater_top_objects.xml linden/indra/newview/skins/default/xui/fr/floater_world_map.xml linden/indra/newview/skins/default/xui/fr/menu_inventory.xml linden/indra/newview/skins/default/xui/fr/menu_login.xml linden/indra/newview/skins/default/xui/fr/menu_pie_attachment.xml linden/indra/newview/skins/default/xui/fr/menu_pie_avatar.xml linden/indra/newview/skins/default/xui/fr/menu_pie_object.xml linden/indra/newview/skins/default/xui/fr/menu_viewer.xml linden/indra/newview/skins/default/xui/fr/notify.xml linden/indra/newview/skins/default/xui/fr/panel_audio.xml linden/indra/newview/skins/default/xui/fr/panel_avatar.xml linden/indra/newview/skins/default/xui/fr/panel_avatar_classified.xml linden/indra/newview/skins/default/xui/fr/panel_classified.xml linden/indra/newview/skins/default/xui/fr/panel_event.xml linden/indra/newview/skins/default/xui/fr/panel_friends.xml linden/indra/newview/skins/default/xui/fr/panel_group_general.xml linden/indra/newview/skins/default/xui/fr/panel_group_invite.xml linden/indra/newview/skins/default/xui/fr/panel_group_land_money.xml linden/indra/newview/skins/default/xui/fr/panel_group_roles.xml linden/indra/newview/skins/default/xui/fr/panel_login.xml linden/indra/newview/skins/default/xui/fr/panel_media_controls.xml linden/indra/newview/skins/default/xui/fr/panel_media_remote_expanded.xml linden/indra/newview/skins/default/xui/fr/panel_overlaybar.xml linden/indra/newview/skins/default/xui/fr/panel_place.xml linden/indra/newview/skins/default/xui/fr/panel_place_small.xml linden/indra/newview/skins/default/xui/fr/panel_preferences_audio.xml linden/indra/newview/skins/default/xui/fr/panel_preferences_general.xml linden/indra/newview/skins/default/xui/fr/panel_preferences_im.xml linden/indra/newview/skins/default/xui/fr/panel_preferences_input.xml linden/indra/newview/skins/default/xui/fr/panel_preferences_network.xml linden/indra/newview/skins/default/xui/fr/panel_preferences_voice.xml linden/indra/newview/skins/default/xui/fr/panel_region_covenant.xml linden/indra/newview/skins/default/xui/fr/panel_region_debug.xml linden/indra/newview/skins/default/xui/fr/panel_region_general.xml linden/indra/newview/skins/default/xui/fr/panel_voice_controls.xml linden/indra/newview/skins/default/xui/fr/role_actions.xml linden/indra/newview/skins/default/xui/fr/strings.xml linden/indra/newview/skins/default/xui/fr/teleport_strings.xml linden/indra/newview/skins/default/xui/ja/floater_active_speakers.xml linden/indra/newview/skins/default/xui/ja/floater_html.xml linden/indra/newview/skins/default/xui/ja/floater_instant_message_ad_hoc.xml linden/indra/newview/skins/default/xui/ja/floater_instant_message_group.xml linden/indra/newview/skins/default/xui/ja/floater_joystick.xml linden/indra/newview/skins/default/xui/ja/floater_media_browser.xml linden/indra/newview/skins/default/xui/ja/floater_windlight_options.xml linden/indra/newview/skins/default/xui/ja/menu_login.xml linden/indra/newview/skins/default/xui/ja/panel_friends.xml linden/indra/newview/skins/default/xui/ja/panel_media_controls.xml linden/indra/newview/skins/default/xui/ja/panel_media_remote_expanded.xml linden/indra/newview/skins/default/xui/ja/panel_preferences_voice.xml linden/indra/newview/skins/default/xui/ja/panel_speaker_controls.xml linden/indra/newview/skins/default/xui/ja/strings.xml linden/indra/newview/skins/default/xui/ja/teleport_strings.xml linden/indra/newview/skins/default/xui/ko/panel_media_controls.xml linden/indra/newview/skins/default/xui/pt/alerts.xml linden/indra/newview/skins/default/xui/pt/floater_about.xml linden/indra/newview/skins/default/xui/pt/floater_about_land.xml linden/indra/newview/skins/default/xui/pt/floater_active_speakers.xml linden/indra/newview/skins/default/xui/pt/floater_animation_preview.xml linden/indra/newview/skins/default/xui/pt/floater_auction.xml linden/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml linden/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml linden/indra/newview/skins/default/xui/pt/floater_beacons.xml linden/indra/newview/skins/default/xui/pt/floater_build_options.xml linden/indra/newview/skins/default/xui/pt/floater_bumps.xml linden/indra/newview/skins/default/xui/pt/floater_buy_contents.xml linden/indra/newview/skins/default/xui/pt/floater_buy_currency.xml linden/indra/newview/skins/default/xui/pt/floater_buy_land.xml linden/indra/newview/skins/default/xui/pt/floater_buy_object.xml linden/indra/newview/skins/default/xui/pt/floater_chat_history.xml linden/indra/newview/skins/default/xui/pt/floater_clothing.xml linden/indra/newview/skins/default/xui/pt/floater_color_picker.xml linden/indra/newview/skins/default/xui/pt/floater_critical.xml linden/indra/newview/skins/default/xui/pt/floater_customize.xml linden/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml linden/indra/newview/skins/default/xui/pt/floater_directory.xml linden/indra/newview/skins/default/xui/pt/floater_env_settings.xml linden/indra/newview/skins/default/xui/pt/floater_gesture.xml linden/indra/newview/skins/default/xui/pt/floater_god_tools.xml linden/indra/newview/skins/default/xui/pt/floater_group_info.xml linden/indra/newview/skins/default/xui/pt/floater_im.xml linden/indra/newview/skins/default/xui/pt/floater_image_preview.xml linden/indra/newview/skins/default/xui/pt/floater_inspect.xml linden/indra/newview/skins/default/xui/pt/floater_instant_message.xml linden/indra/newview/skins/default/xui/pt/floater_instant_message_ad_hoc.xml linden/indra/newview/skins/default/xui/pt/floater_instant_message_group.xml linden/indra/newview/skins/default/xui/pt/floater_inventory.xml linden/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml linden/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml linden/indra/newview/skins/default/xui/pt/floater_joystick.xml linden/indra/newview/skins/default/xui/pt/floater_lagmeter.xml linden/indra/newview/skins/default/xui/pt/floater_land_holdings.xml linden/indra/newview/skins/default/xui/pt/floater_landmark_ctrl.xml linden/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml linden/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml linden/indra/newview/skins/default/xui/pt/floater_media_browser.xml linden/indra/newview/skins/default/xui/pt/floater_moveview.xml linden/indra/newview/skins/default/xui/pt/floater_mute.xml linden/indra/newview/skins/default/xui/pt/floater_mute_object.xml linden/indra/newview/skins/default/xui/pt/floater_name_description.xml linden/indra/newview/skins/default/xui/pt/floater_new_outfit_dialog.xml linden/indra/newview/skins/default/xui/pt/floater_openobject.xml linden/indra/newview/skins/default/xui/pt/floater_pay.xml linden/indra/newview/skins/default/xui/pt/floater_postcard.xml linden/indra/newview/skins/default/xui/pt/floater_preferences.xml linden/indra/newview/skins/default/xui/pt/floater_preview_animation.xml linden/indra/newview/skins/default/xui/pt/floater_preview_classified.xml linden/indra/newview/skins/default/xui/pt/floater_preview_event.xml linden/indra/newview/skins/default/xui/pt/floater_preview_gesture.xml linden/indra/newview/skins/default/xui/pt/floater_preview_notecard_keep_discard.xml linden/indra/newview/skins/default/xui/pt/floater_preview_sound.xml linden/indra/newview/skins/default/xui/pt/floater_preview_url.xml linden/indra/newview/skins/default/xui/pt/floater_price_for_listing.xml linden/indra/newview/skins/default/xui/pt/floater_profile.xml linden/indra/newview/skins/default/xui/pt/floater_report_abuse.xml linden/indra/newview/skins/default/xui/pt/floater_script_debug.xml linden/indra/newview/skins/default/xui/pt/floater_script_queue.xml linden/indra/newview/skins/default/xui/pt/floater_script_search.xml linden/indra/newview/skins/default/xui/pt/floater_sell_land.xml linden/indra/newview/skins/default/xui/pt/floater_settings_debug.xml linden/indra/newview/skins/default/xui/pt/floater_sim_release_message.xml linden/indra/newview/skins/default/xui/pt/floater_snapshot.xml linden/indra/newview/skins/default/xui/pt/floater_sound_preview.xml linden/indra/newview/skins/default/xui/pt/floater_telehub.xml linden/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml linden/indra/newview/skins/default/xui/pt/floater_tools.xml linden/indra/newview/skins/default/xui/pt/floater_top_objects.xml linden/indra/newview/skins/default/xui/pt/floater_tos.xml linden/indra/newview/skins/default/xui/pt/floater_url_entry.xml linden/indra/newview/skins/default/xui/pt/floater_water.xml linden/indra/newview/skins/default/xui/pt/floater_wearable_save_as.xml linden/indra/newview/skins/default/xui/pt/floater_windlight_options.xml linden/indra/newview/skins/default/xui/pt/floater_world_map.xml linden/indra/newview/skins/default/xui/pt/menu_inventory.xml linden/indra/newview/skins/default/xui/pt/menu_pie_attachment.xml linden/indra/newview/skins/default/xui/pt/menu_pie_avatar.xml linden/indra/newview/skins/default/xui/pt/menu_pie_land.xml linden/indra/newview/skins/default/xui/pt/menu_pie_object.xml linden/indra/newview/skins/default/xui/pt/menu_viewer.xml linden/indra/newview/skins/default/xui/pt/notify.xml linden/indra/newview/skins/default/xui/pt/panel_account_details.xml linden/indra/newview/skins/default/xui/pt/panel_account_planning.xml linden/indra/newview/skins/default/xui/pt/panel_account_transactions.xml linden/indra/newview/skins/default/xui/pt/panel_audio_device.xml linden/indra/newview/skins/default/xui/pt/panel_avatar.xml linden/indra/newview/skins/default/xui/pt/panel_avatar_classified.xml linden/indra/newview/skins/default/xui/pt/panel_avatar_pick.xml linden/indra/newview/skins/default/xui/pt/panel_chat_bar.xml linden/indra/newview/skins/default/xui/pt/panel_classified.xml linden/indra/newview/skins/default/xui/pt/panel_event.xml linden/indra/newview/skins/default/xui/pt/panel_friends.xml linden/indra/newview/skins/default/xui/pt/panel_group.xml linden/indra/newview/skins/default/xui/pt/panel_group_finder.xml linden/indra/newview/skins/default/xui/pt/panel_group_general.xml linden/indra/newview/skins/default/xui/pt/panel_group_invite.xml linden/indra/newview/skins/default/xui/pt/panel_group_land_money.xml linden/indra/newview/skins/default/xui/pt/panel_group_notices.xml linden/indra/newview/skins/default/xui/pt/panel_group_roles.xml linden/indra/newview/skins/default/xui/pt/panel_group_voting.xml linden/indra/newview/skins/default/xui/pt/panel_land_covenant.xml linden/indra/newview/skins/default/xui/pt/panel_login.xml linden/indra/newview/skins/default/xui/pt/panel_overlaybar.xml linden/indra/newview/skins/default/xui/pt/panel_place.xml linden/indra/newview/skins/default/xui/pt/panel_place_small.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_audio.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_general.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_im.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_input.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_network.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_popups.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_voice.xml linden/indra/newview/skins/default/xui/pt/panel_preferences_web.xml linden/indra/newview/skins/default/xui/pt/panel_region_covenant.xml linden/indra/newview/skins/default/xui/pt/panel_region_debug.xml linden/indra/newview/skins/default/xui/pt/panel_region_estate.xml linden/indra/newview/skins/default/xui/pt/panel_region_general.xml linden/indra/newview/skins/default/xui/pt/panel_region_terrain.xml linden/indra/newview/skins/default/xui/pt/panel_region_texture.xml linden/indra/newview/skins/default/xui/pt/panel_scrolling_param.xml linden/indra/newview/skins/default/xui/pt/panel_speaker_controls.xml linden/indra/newview/skins/default/xui/pt/panel_status_bar.xml linden/indra/newview/skins/default/xui/pt/panel_toolbar.xml linden/indra/newview/skins/default/xui/pt/panel_top_pick.xml linden/indra/newview/skins/default/xui/pt/panel_voice_controls.xml linden/indra/newview/skins/default/xui/pt/panel_voice_enable.xml linden/indra/newview/skins/default/xui/pt/panel_voice_options.xml linden/indra/newview/skins/default/xui/pt/strings.xml linden/indra/newview/skins/default/xui/pt/teleport_strings.xml linden/indra/newview/skins/default/xui/zh/floater_env_settings.xml linden/indra/newview/skins/default/xui/zh/floater_instant_message_ad_hoc.xml linden/indra/newview/skins/default/xui/zh/floater_lagmeter.xml linden/indra/newview/skins/default/xui/zh/floater_landmark_ctrl.xml linden/indra/newview/skins/default/xui/zh/floater_post_process.xml linden/indra/newview/skins/default/xui/zh/floater_settings_debug.xml linden/indra/newview/skins/default/xui/zh/floater_windlight_options.xml linden/indra/newview/skins/default/xui/zh/menu_pie_attachment.xml linden/indra/newview/skins/default/xui/zh/menu_pie_avatar.xml linden/indra/newview/skins/default/xui/zh/menu_pie_land.xml linden/indra/newview/skins/default/xui/zh/menu_pie_object.xml linden/indra/newview/skins/default/xui/zh/menu_viewer.xml linden/indra/newview/skins/default/xui/zh/panel_avatar.xml linden/indra/newview/skins/default/xui/zh/panel_friends.xml linden/indra/newview/skins/default/xui/zh/panel_group_general.xml linden/indra/newview/skins/default/xui/zh/panel_group_invite.xml linden/indra/newview/skins/default/xui/zh/panel_group_land_money.xml linden/indra/newview/skins/default/xui/zh/panel_group_notices.xml linden/indra/newview/skins/default/xui/zh/panel_group_roles.xml linden/indra/newview/skins/default/xui/zh/panel_preferences_audio.xml linden/indra/newview/skins/default/xui/zh/panel_preferences_im.xml linden/indra/newview/skins/default/xui/zh/panel_region_covenant.xml linden/indra/newview/skins/default/xui/zh/panel_speaker_controls.xml linden/indra/newview/skins/default/xui/zh/panel_voice_options.xml linden/indra/newview/skins/default/xui/zh/strings.xml linden/indra/newview/skins/silver/colors_base.xml linden/indra/newview/skins/silver/xui/en-us/floater_about_land.xml linden/indra/newview/skins/silver/xui/en-us/floater_directory.xml linden/indra/newview/skins/silver/xui/en-us/floater_tools.xml linden/indra/newview/skins/silver/xui/en-us/panel_media_controls.xml linden/indra/newview/viewer_manifest.py linden/install.xml
Diffstat (limited to 'linden/indra/llmath')
-rw-r--r--linden/indra/llmath/camera.h3
-rw-r--r--linden/indra/llmath/coordframe.h3
-rw-r--r--linden/indra/llmath/llbboxlocal.cpp3
-rw-r--r--linden/indra/llmath/llbboxlocal.h3
-rw-r--r--linden/indra/llmath/llcamera.cpp155
-rw-r--r--linden/indra/llmath/llcamera.h25
-rw-r--r--linden/indra/llmath/llcoord.h3
-rw-r--r--linden/indra/llmath/llcoordframe.cpp3
-rw-r--r--linden/indra/llmath/llcoordframe.h3
-rw-r--r--linden/indra/llmath/llinterp.h3
-rw-r--r--linden/indra/llmath/llline.cpp27
-rw-r--r--linden/indra/llmath/llline.h25
-rw-r--r--linden/indra/llmath/llmath.h81
-rw-r--r--linden/indra/llmath/llmodularmath.h3
-rw-r--r--linden/indra/llmath/lloctree.h13
-rw-r--r--linden/indra/llmath/llperlin.cpp3
-rw-r--r--linden/indra/llmath/llperlin.h3
-rw-r--r--linden/indra/llmath/llplane.h3
-rw-r--r--linden/indra/llmath/llquantize.h3
-rw-r--r--linden/indra/llmath/llquaternion.cpp3
-rw-r--r--linden/indra/llmath/llquaternion.h3
-rw-r--r--linden/indra/llmath/llrect.cpp3
-rw-r--r--linden/indra/llmath/llrect.h8
-rw-r--r--linden/indra/llmath/llsdutil_math.cpp3
-rw-r--r--linden/indra/llmath/llsphere.cpp27
-rw-r--r--linden/indra/llmath/llsphere.h27
-rw-r--r--linden/indra/llmath/lltreenode.h3
-rw-r--r--linden/indra/llmath/llv4math.h3
-rw-r--r--linden/indra/llmath/llv4matrix3.h3
-rw-r--r--linden/indra/llmath/llv4matrix4.h3
-rw-r--r--linden/indra/llmath/llv4vector3.h3
-rw-r--r--linden/indra/llmath/llvolume.cpp87
-rw-r--r--linden/indra/llmath/llvolume.h5
-rw-r--r--linden/indra/llmath/llvolumemgr.cpp3
-rw-r--r--linden/indra/llmath/llvolumemgr.h3
-rw-r--r--linden/indra/llmath/m3math.cpp3
-rw-r--r--linden/indra/llmath/m3math.h3
-rw-r--r--linden/indra/llmath/m4math.cpp3
-rw-r--r--linden/indra/llmath/m4math.h3
-rw-r--r--linden/indra/llmath/raytrace.cpp3
-rw-r--r--linden/indra/llmath/raytrace.h3
-rw-r--r--linden/indra/llmath/v2math.cpp3
-rw-r--r--linden/indra/llmath/v2math.h7
-rw-r--r--linden/indra/llmath/v3color.cpp3
-rw-r--r--linden/indra/llmath/v3color.h11
-rw-r--r--linden/indra/llmath/v3dmath.cpp3
-rw-r--r--linden/indra/llmath/v3dmath.h3
-rw-r--r--linden/indra/llmath/v3math.cpp4
-rw-r--r--linden/indra/llmath/v3math.h7
-rw-r--r--linden/indra/llmath/v4color.cpp3
-rw-r--r--linden/indra/llmath/v4color.h3
-rw-r--r--linden/indra/llmath/v4coloru.cpp3
-rw-r--r--linden/indra/llmath/v4coloru.h3
-rw-r--r--linden/indra/llmath/v4math.cpp3
-rw-r--r--linden/indra/llmath/v4math.h3
-rw-r--r--linden/indra/llmath/xform.cpp3
-rw-r--r--linden/indra/llmath/xform.h3
57 files changed, 414 insertions, 221 deletions
diff --git a/linden/indra/llmath/camera.h b/linden/indra/llmath/camera.h
index 19df760..ce41f87 100644
--- a/linden/indra/llmath/camera.h
+++ b/linden/indra/llmath/camera.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/coordframe.h b/linden/indra/llmath/coordframe.h
index 47cbad5..b8a1c14 100644
--- a/linden/indra/llmath/coordframe.h
+++ b/linden/indra/llmath/coordframe.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llbboxlocal.cpp b/linden/indra/llmath/llbboxlocal.cpp
index b348edd..3d0dbb0 100644
--- a/linden/indra/llmath/llbboxlocal.cpp
+++ b/linden/indra/llmath/llbboxlocal.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llbboxlocal.h b/linden/indra/llmath/llbboxlocal.h
index 6406ee3..d69028e 100644
--- a/linden/indra/llmath/llbboxlocal.h
+++ b/linden/indra/llmath/llbboxlocal.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llcamera.cpp b/linden/indra/llmath/llcamera.cpp
index cb9fae6..0f343bc 100644
--- a/linden/indra/llmath/llcamera.cpp
+++ b/linden/indra/llmath/llcamera.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -50,33 +51,38 @@ LLCamera::LLCamera() :
50} 51}
51 52
52 53
53LLCamera::LLCamera(F32 z_field_of_view, F32 aspect_ratio, S32 view_height_in_pixels, F32 near_plane, F32 far_plane) : 54LLCamera::LLCamera(F32 vertical_fov_rads, F32 aspect_ratio, S32 view_height_in_pixels, F32 near_plane, F32 far_plane) :
54 LLCoordFrame(), 55 LLCoordFrame(),
55 mView(z_field_of_view),
56 mAspect(aspect_ratio),
57 mViewHeightInPixels(view_height_in_pixels), 56 mViewHeightInPixels(view_height_in_pixels),
58 mNearPlane(near_plane),
59 mFarPlane(far_plane),
60 mFixedDistance(-1.f), 57 mFixedDistance(-1.f),
61 mPlaneCount(6) 58 mPlaneCount(6)
62{ 59{
63 if (mView < MIN_FIELD_OF_VIEW) { mView = MIN_FIELD_OF_VIEW; } 60 mAspect = llclamp(aspect_ratio, MIN_ASPECT_RATIO, MAX_ASPECT_RATIO);
64 else if (mView > MAX_FIELD_OF_VIEW) { mView = MAX_FIELD_OF_VIEW; } 61 mNearPlane = llclamp(near_plane, MIN_NEAR_PLANE, MAX_NEAR_PLANE);
62 if(far_plane < 0) far_plane = DEFAULT_FAR_PLANE;
63 mFarPlane = llclamp(far_plane, MIN_FAR_PLANE, MAX_FAR_PLANE);
65 64
66 if (mAspect < MIN_ASPECT_RATIO) { mAspect = MIN_ASPECT_RATIO; } 65 setView(vertical_fov_rads);
67 else if (mAspect > MAX_ASPECT_RATIO) { mAspect = MAX_ASPECT_RATIO; } 66}
68
69 if (mNearPlane < MIN_NEAR_PLANE) { mNearPlane = MIN_NEAR_PLANE; }
70 else if (mNearPlane > MAX_NEAR_PLANE) { mNearPlane = MAX_NEAR_PLANE; }
71 67
72 if (mFarPlane < 0) { mFarPlane = DEFAULT_FAR_PLANE; }
73 else if (mFarPlane < MIN_FAR_PLANE) { mFarPlane = MIN_FAR_PLANE; }
74 else if (mFarPlane > MAX_FAR_PLANE) { mFarPlane = MAX_FAR_PLANE; }
75 68
76 calculateFrustumPlanes(); 69// ---------------- LLCamera::getFoo() member functions ----------------
77}
78 70
71F32 LLCamera::getMinView() const
72{
73 // minimum vertical fov needs to be constrained in narrow windows.
74 return mAspect > 1
75 ? MIN_FIELD_OF_VIEW // wide views
76 : MIN_FIELD_OF_VIEW * 1/mAspect; // clamps minimum width in narrow views
77}
79 78
79F32 LLCamera::getMaxView() const
80{
81 // maximum vertical fov needs to be constrained in wide windows.
82 return mAspect > 1
83 ? MAX_FIELD_OF_VIEW / mAspect // clamps maximum width in wide views
84 : MAX_FIELD_OF_VIEW; // narrow views
85}
80 86
81// ---------------- LLCamera::setFoo() member functions ---------------- 87// ---------------- LLCamera::setFoo() member functions ----------------
82 88
@@ -92,11 +98,9 @@ void LLCamera::disableUserClipPlane()
92 mPlaneCount = 6; 98 mPlaneCount = 6;
93} 99}
94 100
95void LLCamera::setView(F32 field_of_view) 101void LLCamera::setView(F32 vertical_fov_rads)
96{ 102{
97 mView = field_of_view; 103 mView = llclamp(vertical_fov_rads, MIN_FIELD_OF_VIEW, MAX_FIELD_OF_VIEW);
98 if (mView < MIN_FIELD_OF_VIEW) { mView = MIN_FIELD_OF_VIEW; }
99 else if (mView > MAX_FIELD_OF_VIEW) { mView = MAX_FIELD_OF_VIEW; }
100 calculateFrustumPlanes(); 104 calculateFrustumPlanes();
101} 105}
102 106
@@ -110,27 +114,21 @@ void LLCamera::setViewHeightInPixels(S32 height)
110 114
111void LLCamera::setAspect(F32 aspect_ratio) 115void LLCamera::setAspect(F32 aspect_ratio)
112{ 116{
113 mAspect = aspect_ratio; 117 mAspect = llclamp(aspect_ratio, MIN_ASPECT_RATIO, MAX_ASPECT_RATIO);
114 if (mAspect < MIN_ASPECT_RATIO) { mAspect = MIN_ASPECT_RATIO; }
115 else if (mAspect > MAX_ASPECT_RATIO) { mAspect = MAX_ASPECT_RATIO; }
116 calculateFrustumPlanes(); 118 calculateFrustumPlanes();
117} 119}
118 120
119 121
120void LLCamera::setNear(F32 near_plane) 122void LLCamera::setNear(F32 near_plane)
121{ 123{
122 mNearPlane = near_plane; 124 mNearPlane = llclamp(near_plane, MIN_NEAR_PLANE, MAX_NEAR_PLANE);
123 if (mNearPlane < MIN_NEAR_PLANE) { mNearPlane = MIN_NEAR_PLANE; }
124 else if (mNearPlane > MAX_NEAR_PLANE) { mNearPlane = MAX_NEAR_PLANE; }
125 calculateFrustumPlanes(); 125 calculateFrustumPlanes();
126} 126}
127 127
128 128
129void LLCamera::setFar(F32 far_plane) 129void LLCamera::setFar(F32 far_plane)
130{ 130{
131 mFarPlane = far_plane; 131 mFarPlane = llclamp(far_plane, MIN_FAR_PLANE, MAX_FAR_PLANE);
132 if (mFarPlane < MIN_FAR_PLANE) { mFarPlane = MIN_FAR_PLANE; }
133 else if (mFarPlane > MAX_FAR_PLANE) { mFarPlane = MAX_FAR_PLANE; }
134 calculateFrustumPlanes(); 132 calculateFrustumPlanes();
135} 133}
136 134
@@ -180,28 +178,95 @@ S32 LLCamera::AABBInFrustum(const LLVector3 &center, const LLVector3& radius)
180 U8 mask = 0; 178 U8 mask = 0;
181 S32 result = 2; 179 S32 result = 2;
182 180
183 for (U32 i = 0; i < mPlaneCount; i++) 181 if (radius.magVecSquared() > mFrustumCornerDist * mFrustumCornerDist)
184 { 182 { //box is larger than frustum, check frustum quads against box planes
185 mask = mAgentPlanes[i].mask;
186 LLPlane p = mAgentPlanes[i].p;
187 LLVector3 n = LLVector3(p);
188 float d = p.mV[3];
189 LLVector3 rscale = radius.scaledVec(scaler[mask]);
190
191 LLVector3 minp = center - rscale;
192 LLVector3 maxp = center + rscale;
193 183
194 if (n * minp > -d) 184 static const LLVector3 dir[] =
195 { 185 {
196 return 0; 186 LLVector3(1, 0, 0),
187 LLVector3(-1, 0, 0),
188 LLVector3(0, 1, 0),
189 LLVector3(0, -1, 0),
190 LLVector3(0, 0, 1),
191 LLVector3(0, 0, -1)
192 };
193
194 U32 quads[] =
195 {
196 0, 1, 2, 3,
197 0, 1, 5, 4,
198 2, 3, 7, 6,
199 3, 0, 7, 4,
200 1, 2, 6, 4,
201 4, 5, 6, 7
202 };
203
204 result = 0;
205
206 BOOL total_inside = TRUE;
207 for (U32 i = 0; i < 6; i++)
208 {
209 LLVector3 p = center + radius.scaledVec(dir[i]);
210 F32 d = -p*dir[i];
211
212 for (U32 j = 0; j < 6; j++)
213 { //for each quad
214 F32 dist = mAgentFrustum[quads[j*4+0]]*dir[i] + d;
215 if (dist > 0)
216 { //at least one frustum point is outside the AABB
217 total_inside = FALSE;
218 for (U32 k = 1; k < 4; k++)
219 { //for each other point on quad
220 if ( mAgentFrustum[quads[j*4+k]]*dir[i]+d <= 0.f)
221 { //quad is straddling some plane of AABB
222 return 1;
223 }
224 }
225 }
226 else
227 {
228 for (U32 k = 1; k < 4; k++)
229 {
230 if (mAgentFrustum[quads[j*4+k]]*dir[i]+d > 0.f)
231 {
232 return 1;
233 }
234 }
235 }
236 }
197 } 237 }
198 238
199 if (n * maxp > -d) 239 if (total_inside)
200 { 240 {
201 result = 1; 241 result = 1;
202 } 242 }
203 } 243 }
244 else
245 {
246 for (U32 i = 0; i < mPlaneCount; i++)
247 {
248 mask = mAgentPlanes[i].mask;
249 LLPlane p = mAgentPlanes[i].p;
250 LLVector3 n = LLVector3(p);
251 float d = p.mV[3];
252 LLVector3 rscale = radius.scaledVec(scaler[mask]);
253
254 LLVector3 minp = center - rscale;
255 LLVector3 maxp = center + rscale;
256
257 if (n * minp > -d)
258 {
259 return 0;
260 }
261
262 if (n * maxp > -d)
263 {
264 result = 1;
265 }
266 }
267 }
204 268
269
205 return result; 270 return result;
206} 271}
207 272
diff --git a/linden/indra/llmath/llcamera.h b/linden/indra/llmath/llcamera.h
index bb9ae55..23ee115 100644
--- a/linden/indra/llmath/llcamera.h
+++ b/linden/indra/llmath/llcamera.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -42,17 +43,19 @@ const F32 DEFAULT_ASPECT_RATIO = 640.f / 480.f;
42const F32 DEFAULT_NEAR_PLANE = 0.25f; 43const F32 DEFAULT_NEAR_PLANE = 0.25f;
43const F32 DEFAULT_FAR_PLANE = 64.f; // far reaches across two horizontal, not diagonal, regions 44const F32 DEFAULT_FAR_PLANE = 64.f; // far reaches across two horizontal, not diagonal, regions
44 45
45const F32 MAX_FIELD_OF_VIEW = F_PI;
46const F32 MAX_ASPECT_RATIO = 50.0f; 46const F32 MAX_ASPECT_RATIO = 50.0f;
47const F32 MAX_NEAR_PLANE = 10.f; 47const F32 MAX_NEAR_PLANE = 10.f;
48const F32 MAX_FAR_PLANE = 100000.0f; //1000000.0f; // Max allowed. Not good Z precision though. 48const F32 MAX_FAR_PLANE = 100000.0f; //1000000.0f; // Max allowed. Not good Z precision though.
49const F32 MAX_FAR_CLIP = 512.0f; 49const F32 MAX_FAR_CLIP = 512.0f;
50 50
51const F32 MIN_FIELD_OF_VIEW = 0.1f;
52const F32 MIN_ASPECT_RATIO = 0.02f; 51const F32 MIN_ASPECT_RATIO = 0.02f;
53const F32 MIN_NEAR_PLANE = 0.1f; 52const F32 MIN_NEAR_PLANE = 0.1f;
54const F32 MIN_FAR_PLANE = 0.2f; 53const F32 MIN_FAR_PLANE = 0.2f;
55 54
55// Min/Max FOV values for square views. Call getMin/MaxView to get extremes based on current aspect ratio.
56static const F32 MIN_FIELD_OF_VIEW = 5.0f * DEG_TO_RAD;
57static const F32 MAX_FIELD_OF_VIEW = 175.f * DEG_TO_RAD;
58
56static const LLVector3 X_AXIS(1.f,0.f,0.f); 59static const LLVector3 X_AXIS(1.f,0.f,0.f);
57static const LLVector3 Y_AXIS(0.f,1.f,0.f); 60static const LLVector3 Y_AXIS(0.f,1.f,0.f);
58static const LLVector3 Z_AXIS(0.f,0.f,1.f); 61static const LLVector3 Z_AXIS(0.f,0.f,1.f);
@@ -101,7 +104,7 @@ public:
101 HORIZ_PLANE_ALL_MASK = 0x3 104 HORIZ_PLANE_ALL_MASK = 0x3
102 }; 105 };
103 106
104protected: 107private:
105 F32 mView; // angle between top and bottom frustum planes in radians. 108 F32 mView; // angle between top and bottom frustum planes in radians.
106 F32 mAspect; // width/height 109 F32 mAspect; // width/height
107 S32 mViewHeightInPixels; // for ViewHeightInPixels() only 110 S32 mViewHeightInPixels; // for ViewHeightInPixels() only
@@ -117,12 +120,12 @@ protected:
117 120
118 struct frustum_plane 121 struct frustum_plane
119 { 122 {
120 frustum_plane() : mask(0) {} 123 frustum_plane() : mask(0) {}
121 LLPlane p; 124 LLPlane p;
122 U8 mask; 125 U8 mask;
123 }; 126 };
124 frustum_plane mAgentPlanes[7]; //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP 127 frustum_plane mAgentPlanes[7]; //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP
125 128
126 U32 mPlaneCount; //defaults to 6, if setUserClipPlane is called, uses user supplied clip plane in 129 U32 mPlaneCount; //defaults to 6, if setUserClipPlane is called, uses user supplied clip plane in
127 130
128 LLVector3 mWorldPlanePos; // Position of World Planes (may be offset from camera) 131 LLVector3 mWorldPlanePos; // Position of World Planes (may be offset from camera)
@@ -132,12 +135,13 @@ public:
132 135
133public: 136public:
134 LLCamera(); 137 LLCamera();
135 LLCamera(F32 z_field_of_view, F32 aspect_ratio, S32 view_height_in_pixels, F32 near_plane, F32 far_plane); 138 LLCamera(F32 vertical_fov_rads, F32 aspect_ratio, S32 view_height_in_pixels, F32 near_plane, F32 far_plane);
139 virtual ~LLCamera(){} // no-op virtual destructor
136 140
137 void setUserClipPlane(LLPlane plane); 141 void setUserClipPlane(LLPlane plane);
138 void disableUserClipPlane(); 142 void disableUserClipPlane();
139 U8 calcPlaneMask(const LLPlane& plane); 143 U8 calcPlaneMask(const LLPlane& plane);
140 void setView(F32 new_view); 144 virtual void setView(F32 vertical_fov_rads);
141 void setViewHeightInPixels(S32 height); 145 void setViewHeightInPixels(S32 height);
142 void setAspect(F32 new_aspect); 146 void setAspect(F32 new_aspect);
143 void setNear(F32 new_near); 147 void setNear(F32 new_near);
@@ -148,6 +152,11 @@ public:
148 F32 getAspect() const { return mAspect; } // width / height 152 F32 getAspect() const { return mAspect; } // width / height
149 F32 getNear() const { return mNearPlane; } // meters 153 F32 getNear() const { return mNearPlane; } // meters
150 F32 getFar() const { return mFarPlane; } // meters 154 F32 getFar() const { return mFarPlane; } // meters
155
156 // The values returned by the min/max view getters depend upon the aspect ratio
157 // at the time they are called and therefore should not be cached.
158 F32 getMinView() const;
159 F32 getMaxView() const;
151 160
152 F32 getYaw() const 161 F32 getYaw() const
153 { 162 {
diff --git a/linden/indra/llmath/llcoord.h b/linden/indra/llmath/llcoord.h
index dbe6678..9d46a8b 100644
--- a/linden/indra/llmath/llcoord.h
+++ b/linden/indra/llmath/llcoord.h
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llcoordframe.cpp b/linden/indra/llmath/llcoordframe.cpp
index f1707c9..673a8f2 100644
--- a/linden/indra/llmath/llcoordframe.cpp
+++ b/linden/indra/llmath/llcoordframe.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llcoordframe.h b/linden/indra/llmath/llcoordframe.h
index 0ce56bf..89b5d8b 100644
--- a/linden/indra/llmath/llcoordframe.h
+++ b/linden/indra/llmath/llcoordframe.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llinterp.h b/linden/indra/llmath/llinterp.h
index 7438317..8beeef4 100644
--- a/linden/indra/llmath/llinterp.h
+++ b/linden/indra/llmath/llinterp.h
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llline.cpp b/linden/indra/llmath/llline.cpp
index 147918c..b198573 100644
--- a/linden/indra/llmath/llline.cpp
+++ b/linden/indra/llmath/llline.cpp
@@ -3,16 +3,27 @@
3 * @author Andrew Meadows 3 * @author Andrew Meadows
4 * @brief Simple line class that can compute nearest approach between two lines 4 * @brief Simple line class that can compute nearest approach between two lines
5 * 5 *
6 * $LicenseInfo:firstyear=2001&license=internal$ 6 * $LicenseInfo:firstyear=2006&license=viewergpl$
7 * 7 *
8 * Copyright (c) 2001-2009, Linden Research, Inc. 8 * Copyright (c) 2006-2009, Linden Research, Inc.
9 * 9 *
10 * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of 10 * Second Life Viewer Source Code
11 * this source code is governed by the Linden Lab Source Code Disclosure 11 * The source code in this file ("Source Code") is provided by Linden Lab
12 * Agreement ("Agreement") previously entered between you and Linden 12 * to you under the terms of the GNU General Public License, version 2.0
13 * Lab. By accessing, using, copying, modifying or distributing this 13 * ("GPL"), unless you have obtained a separate licensing agreement
14 * software, you acknowledge that you have been informed of your 14 * ("Other License"), formally executed by you and Linden Lab. Terms of
15 * obligations under the Agreement and agree to abide by those obligations. 15 * the GPL can be found in doc/GPL-license.txt in this distribution, or
16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
17 *
18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at
22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
23 *
24 * By copying, modifying or distributing this software, you acknowledge
25 * that you have read and understood your obligations described above,
26 * and agree to abide by those obligations.
16 * 27 *
17 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
18 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
diff --git a/linden/indra/llmath/llline.h b/linden/indra/llmath/llline.h
index e7827d5..9ab41b1 100644
--- a/linden/indra/llmath/llline.h
+++ b/linden/indra/llmath/llline.h
@@ -4,16 +4,27 @@
4 * @author Andrew Meadows 4 * @author Andrew Meadows
5 * @brief Simple line for computing nearest approach between two infinite lines 5 * @brief Simple line for computing nearest approach between two infinite lines
6 * 6 *
7 * $LicenseInfo:firstyear=2006&license=internal$ 7 * $LicenseInfo:firstyear=2006&license=viewergpl$
8 * 8 *
9 * Copyright (c) 2006-2009, Linden Research, Inc. 9 * Copyright (c) 2006-2009, Linden Research, Inc.
10 * 10 *
11 * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of 11 * Second Life Viewer Source Code
12 * this source code is governed by the Linden Lab Source Code Disclosure 12 * The source code in this file ("Source Code") is provided by Linden Lab
13 * Agreement ("Agreement") previously entered between you and Linden 13 * to you under the terms of the GNU General Public License, version 2.0
14 * Lab. By accessing, using, copying, modifying or distributing this 14 * ("GPL"), unless you have obtained a separate licensing agreement
15 * software, you acknowledge that you have been informed of your 15 * ("Other License"), formally executed by you and Linden Lab. Terms of
16 * obligations under the Agreement and agree to abide by those obligations. 16 * the GPL can be found in doc/GPL-license.txt in this distribution, or
17 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
18 *
19 * There are special exceptions to the terms and conditions of the GPL as
20 * it is applied to this Source Code. View the full text of the exception
21 * in the file doc/FLOSS-exception.txt in this software distribution, or
22 * online at
23 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
24 *
25 * By copying, modifying or distributing this software, you acknowledge
26 * that you have read and understood your obligations described above,
27 * and agree to abide by those obligations.
17 * 28 *
18 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 29 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
19 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 30 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
diff --git a/linden/indra/llmath/llmath.h b/linden/indra/llmath/llmath.h
index b2d4d26..66451b1 100644
--- a/linden/indra/llmath/llmath.h
+++ b/linden/indra/llmath/llmath.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -37,6 +38,10 @@
37#include "lldefs.h" 38#include "lldefs.h"
38#include "llstl.h" // *TODO: Remove when LLString is gone 39#include "llstl.h" // *TODO: Remove when LLString is gone
39#include "llstring.h" // *TODO: Remove when LLString is gone 40#include "llstring.h" // *TODO: Remove when LLString is gone
41// lltut.h uses is_approx_equal_fraction(). This was moved to its own header
42// file in llcommon so we can use lltut.h for llcommon tests without making
43// llcommon depend on llmath.
44#include "is_approx_equal_fraction.h"
40 45
41// work around for Windows & older gcc non-standard function names. 46// work around for Windows & older gcc non-standard function names.
42#if LL_WINDOWS 47#if LL_WINDOWS
@@ -85,6 +90,8 @@ const F32 GRAVITY = -9.8f;
85const F32 F_PI = 3.1415926535897932384626433832795f; 90const F32 F_PI = 3.1415926535897932384626433832795f;
86const F32 F_TWO_PI = 6.283185307179586476925286766559f; 91const F32 F_TWO_PI = 6.283185307179586476925286766559f;
87const F32 F_PI_BY_TWO = 1.5707963267948966192313216916398f; 92const F32 F_PI_BY_TWO = 1.5707963267948966192313216916398f;
93const F32 F_SQRT_TWO_PI = 2.506628274631000502415765284811f;
94const F32 F_E = 2.71828182845904523536f;
88const F32 F_SQRT2 = 1.4142135623730950488016887242097f; 95const F32 F_SQRT2 = 1.4142135623730950488016887242097f;
89const F32 F_SQRT3 = 1.73205080756888288657986402541f; 96const F32 F_SQRT3 = 1.73205080756888288657986402541f;
90const F32 OO_SQRT2 = 0.7071067811865475244008443621049f; 97const F32 OO_SQRT2 = 0.7071067811865475244008443621049f;
@@ -103,6 +110,30 @@ const F32 FP_MAG_THRESHOLD = 0.0000001f;
103// TODO: Replace with logic like is_approx_equal 110// TODO: Replace with logic like is_approx_equal
104inline BOOL is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < F_APPROXIMATELY_ZERO); } 111inline BOOL is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < F_APPROXIMATELY_ZERO); }
105 112
113// These functions work by interpreting sign+exp+mantissa as an unsigned
114// integer.
115// For example:
116// x = <sign>1 <exponent>00000010 <mantissa>00000000000000000000000
117// y = <sign>1 <exponent>00000001 <mantissa>11111111111111111111111
118//
119// interpreted as ints =
120// x = 10000001000000000000000000000000
121// y = 10000000111111111111111111111111
122// which is clearly a different of 1 in the least significant bit
123// Values with the same exponent can be trivially shown to work.
124//
125// WARNING: Denormals of opposite sign do not work
126// x = <sign>1 <exponent>00000000 <mantissa>00000000000000000000001
127// y = <sign>0 <exponent>00000000 <mantissa>00000000000000000000001
128// Although these values differ by 2 in the LSB, the sign bit makes
129// the int comparison fail.
130//
131// WARNING: NaNs can compare equal
132// There is no special treatment of exceptional values like NaNs
133//
134// WARNING: Infinity is comparable with F32_MAX and negative
135// infinity is comparable with F32_MIN
136
106inline BOOL is_approx_equal(F32 x, F32 y) 137inline BOOL is_approx_equal(F32 x, F32 y)
107{ 138{
108 const S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02; 139 const S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
@@ -115,48 +146,6 @@ inline BOOL is_approx_equal(F64 x, F64 y)
115 return (std::abs((S32) ((U64&)x - (U64&)y) ) < COMPARE_MANTISSA_UP_TO_BIT); 146 return (std::abs((S32) ((U64&)x - (U64&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
116} 147}
117 148
118inline BOOL is_approx_equal_fraction(F32 x, F32 y, U32 frac_bits)
119{
120 BOOL ret = TRUE;
121 F32 diff = (F32) fabs(x - y);
122
123 S32 diffInt = (S32) diff;
124 S32 diffFracTolerance = (S32) ((diff - (F32) diffInt) * (1 << frac_bits));
125
126 // if integer portion is not equal, not enough bits were used for packing
127 // so error out since either the use case is not correct OR there is
128 // an issue with pack/unpack. should fail in either case.
129 // for decimal portion, make sure that the delta is no more than 1
130 // based on the number of bits used for packing decimal portion.
131 if (diffInt != 0 || diffFracTolerance > 1)
132 {
133 ret = FALSE;
134 }
135
136 return ret;
137}
138
139inline BOOL is_approx_equal_fraction(F64 x, F64 y, U32 frac_bits)
140{
141 BOOL ret = TRUE;
142 F64 diff = (F64) fabs(x - y);
143
144 S32 diffInt = (S32) diff;
145 S32 diffFracTolerance = (S32) ((diff - (F64) diffInt) * (1 << frac_bits));
146
147 // if integer portion is not equal, not enough bits were used for packing
148 // so error out since either the use case is not correct OR there is
149 // an issue with pack/unpack. should fail in either case.
150 // for decimal portion, make sure that the delta is no more than 1
151 // based on the number of bits used for packing decimal portion.
152 if (diffInt != 0 || diffFracTolerance > 1)
153 {
154 ret = FALSE;
155 }
156
157 return ret;
158}
159
160inline S32 llabs(const S32 a) 149inline S32 llabs(const S32 a)
161{ 150{
162 return S32(std::labs(a)); 151 return S32(std::labs(a));
@@ -523,4 +512,10 @@ inline U32 get_next_power_two(U32 val, U32 max_power_two)
523 return val; 512 return val;
524} 513}
525 514
515//get the gaussian value given the linear distance from axis x and guassian value o
516inline F32 llgaussian(F32 x, F32 o)
517{
518 return 1.f/(F_SQRT_TWO_PI*o)*powf(F_E, -(x*x)/(2*o*o));
519}
520
526#endif 521#endif
diff --git a/linden/indra/llmath/llmodularmath.h b/linden/indra/llmath/llmodularmath.h
index 67083ea..6009529 100644
--- a/linden/indra/llmath/llmodularmath.h
+++ b/linden/indra/llmath/llmodularmath.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/lloctree.h b/linden/indra/llmath/lloctree.h
index 3c94aa3..bced84c 100644
--- a/linden/indra/llmath/lloctree.h
+++ b/linden/indra/llmath/lloctree.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -330,6 +331,16 @@ public:
330 //push center in direction of data 331 //push center in direction of data
331 LLOctreeNode<T>::pushCenter(center, size, data); 332 LLOctreeNode<T>::pushCenter(center, size, data);
332 333
334 // handle case where floating point number gets too small
335 if( llabs(center.mdV[0] - getCenter().mdV[0]) < F_APPROXIMATELY_ZERO &&
336 llabs(center.mdV[1] - getCenter().mdV[1]) < F_APPROXIMATELY_ZERO &&
337 llabs(center.mdV[2] - getCenter().mdV[2]) < F_APPROXIMATELY_ZERO)
338 {
339 mData.insert(data);
340 BaseType::insert(data);
341 return true;
342 }
343
333#if LL_OCTREE_PARANOIA_CHECK 344#if LL_OCTREE_PARANOIA_CHECK
334 if (getChildCount() == 8) 345 if (getChildCount() == 8)
335 { 346 {
diff --git a/linden/indra/llmath/llperlin.cpp b/linden/indra/llmath/llperlin.cpp
index 2c3ed90..9293d97 100644
--- a/linden/indra/llmath/llperlin.cpp
+++ b/linden/indra/llmath/llperlin.cpp
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llperlin.h b/linden/indra/llmath/llperlin.h
index d6cf823..e8815ec 100644
--- a/linden/indra/llmath/llperlin.h
+++ b/linden/indra/llmath/llperlin.h
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llplane.h b/linden/indra/llmath/llplane.h
index 558cc37..89c6a14 100644
--- a/linden/indra/llmath/llplane.h
+++ b/linden/indra/llmath/llplane.h
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llquantize.h b/linden/indra/llmath/llquantize.h
index 25be9c0..2192427 100644
--- a/linden/indra/llmath/llquantize.h
+++ b/linden/indra/llmath/llquantize.h
@@ -18,7 +18,8 @@
18 * There are special exceptions to the terms and conditions of the GPL as 18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception 19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or 20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 21 * online at
22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 * 23 *
23 * By copying, modifying or distributing this software, you acknowledge 24 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above, 25 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llquaternion.cpp b/linden/indra/llmath/llquaternion.cpp
index 485d0cd..cfd6183 100644
--- a/linden/indra/llmath/llquaternion.cpp
+++ b/linden/indra/llmath/llquaternion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llquaternion.h b/linden/indra/llmath/llquaternion.h
index 2289bc8..5db9c5b 100644
--- a/linden/indra/llmath/llquaternion.h
+++ b/linden/indra/llmath/llquaternion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llrect.cpp b/linden/indra/llmath/llrect.cpp
index 025d476..cba76dd 100644
--- a/linden/indra/llmath/llrect.cpp
+++ b/linden/indra/llmath/llrect.cpp
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llrect.h b/linden/indra/llmath/llrect.h
index a9faa19..9eb58db 100644
--- a/linden/indra/llmath/llrect.h
+++ b/linden/indra/llmath/llrect.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -223,6 +224,11 @@ public:
223 return *this; 224 return *this;
224 } 225 }
225 226
227 bool isValid() const
228 {
229 return mLeft <= mRight && mBottom <= mTop;
230 }
231
226 bool isNull() const 232 bool isNull() const
227 { 233 {
228 return mLeft == mRight || mBottom == mTop; 234 return mLeft == mRight || mBottom == mTop;
diff --git a/linden/indra/llmath/llsdutil_math.cpp b/linden/indra/llmath/llsdutil_math.cpp
index c17c682..073cb2e 100644
--- a/linden/indra/llmath/llsdutil_math.cpp
+++ b/linden/indra/llmath/llsdutil_math.cpp
@@ -19,7 +19,8 @@
19 * There are special exceptions to the terms and conditions of the GPL as 19 * There are special exceptions to the terms and conditions of the GPL as
20 * it is applied to this Source Code. View the full text of the exception 20 * it is applied to this Source Code. View the full text of the exception
21 * in the file doc/FLOSS-exception.txt in this software distribution, or 21 * in the file doc/FLOSS-exception.txt in this software distribution, or
22 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 22 * online at
23 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
23 * 24 *
24 * By copying, modifying or distributing this software, you acknowledge 25 * By copying, modifying or distributing this software, you acknowledge
25 * that you have read and understood your obligations described above, 26 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llsphere.cpp b/linden/indra/llmath/llsphere.cpp
index 2923ffe..b260c13 100644
--- a/linden/indra/llmath/llsphere.cpp
+++ b/linden/indra/llmath/llsphere.cpp
@@ -3,16 +3,27 @@
3 * @author Andrew Meadows 3 * @author Andrew Meadows
4 * @brief Simple line class that can compute nearest approach between two lines 4 * @brief Simple line class that can compute nearest approach between two lines
5 * 5 *
6 * $LicenseInfo:firstyear=2006&license=internal$ 6 * $LicenseInfo:firstyear=2007&license=viewergpl$
7 * 7 *
8 * Copyright (c) 2006-2009, Linden Research, Inc. 8 * Copyright (c) 2007-2009, Linden Research, Inc.
9 * 9 *
10 * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of 10 * Second Life Viewer Source Code
11 * this source code is governed by the Linden Lab Source Code Disclosure 11 * The source code in this file ("Source Code") is provided by Linden Lab
12 * Agreement ("Agreement") previously entered between you and Linden 12 * to you under the terms of the GNU General Public License, version 2.0
13 * Lab. By accessing, using, copying, modifying or distributing this 13 * ("GPL"), unless you have obtained a separate licensing agreement
14 * software, you acknowledge that you have been informed of your 14 * ("Other License"), formally executed by you and Linden Lab. Terms of
15 * obligations under the Agreement and agree to abide by those obligations. 15 * the GPL can be found in doc/GPL-license.txt in this distribution, or
16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
17 *
18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at
22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
23 *
24 * By copying, modifying or distributing this software, you acknowledge
25 * that you have read and understood your obligations described above,
26 * and agree to abide by those obligations.
16 * 27 *
17 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
18 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
diff --git a/linden/indra/llmath/llsphere.h b/linden/indra/llmath/llsphere.h
index 2f905e6..58df07a 100644
--- a/linden/indra/llmath/llsphere.h
+++ b/linden/indra/llmath/llsphere.h
@@ -4,16 +4,27 @@
4 * @author Andrew Meadows 4 * @author Andrew Meadows
5 * @brief Simple sphere implementation for basic geometric operations 5 * @brief Simple sphere implementation for basic geometric operations
6 * 6 *
7 * $LicenseInfo:firstyear=2001&license=internal$ 7 * $LicenseInfo:firstyear=2007&license=viewergpl$
8 * 8 *
9 * Copyright (c) 2001-2009, Linden Research, Inc. 9 * Copyright (c) 2007-2009, Linden Research, Inc.
10 * 10 *
11 * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of 11 * Second Life Viewer Source Code
12 * this source code is governed by the Linden Lab Source Code Disclosure 12 * The source code in this file ("Source Code") is provided by Linden Lab
13 * Agreement ("Agreement") previously entered between you and Linden 13 * to you under the terms of the GNU General Public License, version 2.0
14 * Lab. By accessing, using, copying, modifying or distributing this 14 * ("GPL"), unless you have obtained a separate licensing agreement
15 * software, you acknowledge that you have been informed of your 15 * ("Other License"), formally executed by you and Linden Lab. Terms of
16 * obligations under the Agreement and agree to abide by those obligations. 16 * the GPL can be found in doc/GPL-license.txt in this distribution, or
17 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
18 *
19 * There are special exceptions to the terms and conditions of the GPL as
20 * it is applied to this Source Code. View the full text of the exception
21 * in the file doc/FLOSS-exception.txt in this software distribution, or
22 * online at
23 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
24 *
25 * By copying, modifying or distributing this software, you acknowledge
26 * that you have read and understood your obligations described above,
27 * and agree to abide by those obligations.
17 * 28 *
18 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 29 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
19 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 30 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
diff --git a/linden/indra/llmath/lltreenode.h b/linden/indra/llmath/lltreenode.h
index 6f5e701..ee98362 100644
--- a/linden/indra/llmath/lltreenode.h
+++ b/linden/indra/llmath/lltreenode.h
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llv4math.h b/linden/indra/llmath/llv4math.h
index 9c1737e..5b180b3 100644
--- a/linden/indra/llmath/llv4math.h
+++ b/linden/indra/llmath/llv4math.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llv4matrix3.h b/linden/indra/llmath/llv4matrix3.h
index 619c966..ed503e9 100644
--- a/linden/indra/llmath/llv4matrix3.h
+++ b/linden/indra/llmath/llv4matrix3.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llv4matrix4.h b/linden/indra/llmath/llv4matrix4.h
index 662d379..959fa34 100644
--- a/linden/indra/llmath/llv4matrix4.h
+++ b/linden/indra/llmath/llv4matrix4.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llv4vector3.h b/linden/indra/llmath/llv4vector3.h
index e45ba50..a41de47 100644
--- a/linden/indra/llmath/llv4vector3.h
+++ b/linden/indra/llmath/llv4vector3.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp
index 5603a9c..1250f53 100644
--- a/linden/indra/llmath/llvolume.cpp
+++ b/linden/indra/llmath/llvolume.cpp
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
@@ -1972,34 +1973,29 @@ inline LLVector3 sculpt_xy_to_vector(U32 x, U32 y, U16 sculpt_width, U16 sculpt_
1972} 1973}
1973 1974
1974 1975
1975F32 LLVolume::sculptGetSurfaceArea(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data) 1976F32 LLVolume::sculptGetSurfaceArea()
1976{ 1977{
1977 // test to see if image has enough variation to create non-degenerate geometry 1978 // test to see if image has enough variation to create non-degenerate geometry
1978 1979
1980 F32 area = 0;
1981
1979 S32 sizeS = mPathp->mPath.size(); 1982 S32 sizeS = mPathp->mPath.size();
1980 S32 sizeT = mProfilep->mProfile.size(); 1983 S32 sizeT = mProfilep->mProfile.size();
1981 1984
1982 F32 area = 0; 1985 for (S32 s = 0; s < sizeS-1; s++)
1983
1984 if ((sculpt_width != 0) &&
1985 (sculpt_height != 0) &&
1986 (sculpt_components != 0) &&
1987 (sculpt_data != NULL))
1988 { 1986 {
1989 for (S32 s = 0; s < sizeS - 1; s++) 1987 for (S32 t = 0; t < sizeT-1; t++)
1990 { 1988 {
1991 for (S32 t = 0; t < sizeT - 1; t++) 1989 // get four corners of quad
1992 { 1990 LLVector3 p1 = mMesh[(s )*sizeT + (t )].mPos;
1993 // convert image data to vectors 1991 LLVector3 p2 = mMesh[(s+1)*sizeT + (t )].mPos;
1994 LLVector3 p1 = sculpt_st_to_vector(s, t, sizeS, sizeT, sculpt_width, sculpt_height, sculpt_components, sculpt_data); 1992 LLVector3 p3 = mMesh[(s )*sizeT + (t+1)].mPos;
1995 LLVector3 p2 = sculpt_st_to_vector(s+1, t, sizeS, sizeT, sculpt_width, sculpt_height, sculpt_components, sculpt_data); 1993 LLVector3 p4 = mMesh[(s+1)*sizeT + (t+1)].mPos;
1996 LLVector3 p3 = sculpt_st_to_vector(s, t+1, sizeS, sizeT, sculpt_width, sculpt_height, sculpt_components, sculpt_data); 1994
1997 1995 // compute the area of the quad by taking the length of the cross product of the two triangles
1998 // compute the area of the parallelogram by taking the length of the cross product: 1996 LLVector3 cross1 = (p1 - p2) % (p1 - p3);
1999 // (parallegram is an approximation of two triangles) 1997 LLVector3 cross2 = (p4 - p2) % (p4 - p3);
2000 LLVector3 cross = (p1 - p2) % (p1 - p3); 1998 area += (cross1.magVec() + cross2.magVec()) / 2.0;
2001 area += cross.magVec();
2002 }
2003 } 1999 }
2004 } 2000 }
2005 2001
@@ -2163,7 +2159,21 @@ S32 sculpt_sides(F32 detail)
2163// determine the number of vertices in both s and t direction for this sculpt 2159// determine the number of vertices in both s and t direction for this sculpt
2164void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32& s, S32& t) 2160void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32& s, S32& t)
2165{ 2161{
2166 S32 vertices = sculpt_sides(detail); 2162 // this code has the following properties:
2163 // 1) the aspect ratio of the mesh is as close as possible to the ratio of the map
2164 // while still using all available verts
2165 // 2) the mesh cannot have more verts than is allowed by LOD
2166 // 3) the mesh cannot have more verts than is allowed by the map
2167
2168 S32 max_vertices_lod = (S32)pow((double)sculpt_sides(detail), 2.0);
2169 S32 max_vertices_map = width * height / 4;
2170
2171 S32 vertices;
2172 if (max_vertices_map > 0)
2173 vertices = llmin(max_vertices_lod, max_vertices_map);
2174 else
2175 vertices = max_vertices_lod;
2176
2167 2177
2168 F32 ratio; 2178 F32 ratio;
2169 if ((width == 0) || (height == 0)) 2179 if ((width == 0) || (height == 0))
@@ -2172,13 +2182,13 @@ void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32
2172 ratio = (F32) width / (F32) height; 2182 ratio = (F32) width / (F32) height;
2173 2183
2174 2184
2175 s = (S32)(vertices / fsqrtf(ratio)); 2185 s = (S32)fsqrtf(((F32)vertices / ratio));
2176 2186
2177 s = llmax(s, 3); // no degenerate sizes, please 2187 s = llmax(s, 4); // no degenerate sizes, please
2178 t = vertices * vertices / s; 2188 t = vertices / s;
2179 2189
2180 t = llmax(t, 3); // no degenerate sizes, please 2190 t = llmax(t, 4); // no degenerate sizes, please
2181 s = vertices * vertices / t; 2191 s = vertices / t;
2182} 2192}
2183 2193
2184// sculpt replaces generate() for sculpted surfaces 2194// sculpt replaces generate() for sculpted surfaces
@@ -2215,20 +2225,25 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
2215 sNumMeshPoints -= mMesh.size(); 2225 sNumMeshPoints -= mMesh.size();
2216 mMesh.resize(sizeS * sizeT); 2226 mMesh.resize(sizeS * sizeT);
2217 sNumMeshPoints += mMesh.size(); 2227 sNumMeshPoints += mMesh.size();
2218
2219 if (!data_is_empty && sculptGetSurfaceArea(sculpt_width, sculpt_height, sculpt_components, sculpt_data) < SCULPT_MIN_AREA)
2220 data_is_empty = TRUE;
2221 2228
2222 //generate vertex positions 2229 //generate vertex positions
2223 if (data_is_empty) // if empty, make a placeholder mesh 2230 if (!data_is_empty)
2224 {
2225 sculptGeneratePlaceholder();
2226 }
2227 else
2228 { 2231 {
2229 sculptGenerateMapVertices(sculpt_width, sculpt_height, sculpt_components, sculpt_data, sculpt_type); 2232 sculptGenerateMapVertices(sculpt_width, sculpt_height, sculpt_components, sculpt_data, sculpt_type);
2233
2234 if (sculptGetSurfaceArea() < SCULPT_MIN_AREA)
2235 {
2236 data_is_empty = TRUE;
2237 }
2230 } 2238 }
2231 2239
2240 if (data_is_empty)
2241 {
2242 sculptGeneratePlaceholder();
2243 }
2244
2245
2246
2232 for (S32 i = 0; i < (S32)mProfilep->mFaces.size(); i++) 2247 for (S32 i = 0; i < (S32)mProfilep->mFaces.size(); i++)
2233 { 2248 {
2234 mFaceMask |= mProfilep->mFaces[i].mFaceID; 2249 mFaceMask |= mProfilep->mFaces[i].mFaceID;
diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h
index 48c48e4..e55fe52 100644
--- a/linden/indra/llmath/llvolume.h
+++ b/linden/indra/llmath/llvolume.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -942,8 +943,8 @@ public:
942 943
943 void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level); 944 void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level);
944private: 945private:
945 F32 sculptGetSurfaceArea(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data);
946 void sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, U8 sculpt_type); 946 void sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, U8 sculpt_type);
947 F32 sculptGetSurfaceArea();
947 void sculptGeneratePlaceholder(); 948 void sculptGeneratePlaceholder();
948 void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t); 949 void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t);
949 950
diff --git a/linden/indra/llmath/llvolumemgr.cpp b/linden/indra/llmath/llvolumemgr.cpp
index edd7513..53641fc 100644
--- a/linden/indra/llmath/llvolumemgr.cpp
+++ b/linden/indra/llmath/llvolumemgr.cpp
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/llvolumemgr.h b/linden/indra/llmath/llvolumemgr.h
index 0348373..e10ad94 100644
--- a/linden/indra/llmath/llvolumemgr.h
+++ b/linden/indra/llmath/llvolumemgr.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/m3math.cpp b/linden/indra/llmath/m3math.cpp
index 578a4c6..1b878c8 100644
--- a/linden/indra/llmath/m3math.cpp
+++ b/linden/indra/llmath/m3math.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/m3math.h b/linden/indra/llmath/m3math.h
index 76ee1ea..3ac963e 100644
--- a/linden/indra/llmath/m3math.h
+++ b/linden/indra/llmath/m3math.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/m4math.cpp b/linden/indra/llmath/m4math.cpp
index dc6b0b5..59a0bc2 100644
--- a/linden/indra/llmath/m4math.cpp
+++ b/linden/indra/llmath/m4math.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/m4math.h b/linden/indra/llmath/m4math.h
index 1d30489..58c9c09 100644
--- a/linden/indra/llmath/m4math.h
+++ b/linden/indra/llmath/m4math.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/raytrace.cpp b/linden/indra/llmath/raytrace.cpp
index 0116502..a5eb0d2 100644
--- a/linden/indra/llmath/raytrace.cpp
+++ b/linden/indra/llmath/raytrace.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/raytrace.h b/linden/indra/llmath/raytrace.h
index 757181f..b433e17 100644
--- a/linden/indra/llmath/raytrace.h
+++ b/linden/indra/llmath/raytrace.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v2math.cpp b/linden/indra/llmath/v2math.cpp
index ee60143..555e1f9 100644
--- a/linden/indra/llmath/v2math.cpp
+++ b/linden/indra/llmath/v2math.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v2math.h b/linden/indra/llmath/v2math.h
index 6016c04..9fef885 100644
--- a/linden/indra/llmath/v2math.h
+++ b/linden/indra/llmath/v2math.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -115,8 +116,8 @@ class LLVector2
115F32 angle_between(const LLVector2 &a, const LLVector2 &b); // Returns angle (radians) between a and b 116F32 angle_between(const LLVector2 &a, const LLVector2 &b); // Returns angle (radians) between a and b
116BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel 117BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
117F32 dist_vec(const LLVector2 &a, const LLVector2 &b); // Returns distance between a and b 118F32 dist_vec(const LLVector2 &a, const LLVector2 &b); // Returns distance between a and b
118F32 dist_vec_squared(const LLVector2 &a, const LLVector2 &b);// Returns distance sqaured between a and b 119F32 dist_vec_squared(const LLVector2 &a, const LLVector2 &b);// Returns distance squared between a and b
119F32 dist_vec_squared2D(const LLVector2 &a, const LLVector2 &b);// Returns distance sqaured between a and b ignoring Z component 120F32 dist_vec_squared2D(const LLVector2 &a, const LLVector2 &b);// Returns distance squared between a and b ignoring Z component
120LLVector2 lerp(const LLVector2 &a, const LLVector2 &b, F32 u); // Returns a vector that is a linear interpolation between a and b 121LLVector2 lerp(const LLVector2 &a, const LLVector2 &b, F32 u); // Returns a vector that is a linear interpolation between a and b
121 122
122// Constructors 123// Constructors
diff --git a/linden/indra/llmath/v3color.cpp b/linden/indra/llmath/v3color.cpp
index b55b883..fa7b61c 100644
--- a/linden/indra/llmath/v3color.cpp
+++ b/linden/indra/llmath/v3color.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v3color.h b/linden/indra/llmath/v3color.h
index d530187..179687a 100644
--- a/linden/indra/llmath/v3color.h
+++ b/linden/indra/llmath/v3color.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -56,7 +57,7 @@ public:
56 LLColor3(); // Initializes LLColor3 to (0, 0, 0) 57 LLColor3(); // Initializes LLColor3 to (0, 0, 0)
57 LLColor3(F32 r, F32 g, F32 b); // Initializes LLColor3 to (r, g, b) 58 LLColor3(F32 r, F32 g, F32 b); // Initializes LLColor3 to (r, g, b)
58 LLColor3(const F32 *vec); // Initializes LLColor3 to (vec[0]. vec[1], vec[2]) 59 LLColor3(const F32 *vec); // Initializes LLColor3 to (vec[0]. vec[1], vec[2])
59 LLColor3(char *color_string); // html format color ie "#FFDDEE" 60 LLColor3(const char *color_string); // html format color ie "#FFDDEE"
60 explicit LLColor3(const LLColor4& color4); // "explicit" to avoid automatic conversion 61 explicit LLColor3(const LLColor4& color4); // "explicit" to avoid automatic conversion
61 explicit LLColor3(const LLVector4& vector4); // "explicit" to avoid automatic conversion 62 explicit LLColor3(const LLVector4& vector4); // "explicit" to avoid automatic conversion
62 LLColor3(const LLSD& sd); 63 LLColor3(const LLSD& sd);
@@ -160,7 +161,7 @@ void LLColor3::clamp()
160 161
161// Non-member functions 162// Non-member functions
162F32 distVec(const LLColor3 &a, const LLColor3 &b); // Returns distance between a and b 163F32 distVec(const LLColor3 &a, const LLColor3 &b); // Returns distance between a and b
163F32 distVec_squared(const LLColor3 &a, const LLColor3 &b);// Returns distance sqaured between a and b 164F32 distVec_squared(const LLColor3 &a, const LLColor3 &b);// Returns distance squared between a and b
164 165
165inline LLColor3::LLColor3(void) 166inline LLColor3::LLColor3(void)
166{ 167{
@@ -188,7 +189,7 @@ inline LLColor3::LLColor3(const F32 *vec)
188# pragma warning( disable : 4996 ) // strncpy teh sux0r 189# pragma warning( disable : 4996 ) // strncpy teh sux0r
189#endif 190#endif
190 191
191inline LLColor3::LLColor3(char* color_string) // takes a string of format "RRGGBB" where RR is hex 00..FF 192inline LLColor3::LLColor3(const char* color_string) // takes a string of format "RRGGBB" where RR is hex 00..FF
192{ 193{
193 if (strlen(color_string) < 6) /* Flawfinder: ignore */ 194 if (strlen(color_string) < 6) /* Flawfinder: ignore */
194 { 195 {
@@ -198,7 +199,7 @@ inline LLColor3::LLColor3(char* color_string) // takes a string of format "RRGGB
198 return; 199 return;
199 } 200 }
200 201
201 static char tempstr[7]; /* Flawfinder: ignore */ 202 char tempstr[7];
202 strncpy(tempstr,color_string,6); /* Flawfinder: ignore */ 203 strncpy(tempstr,color_string,6); /* Flawfinder: ignore */
203 tempstr[6] = '\0'; 204 tempstr[6] = '\0';
204 mV[VZ] = (F32)strtol(&tempstr[4],NULL,16)/255.f; 205 mV[VZ] = (F32)strtol(&tempstr[4],NULL,16)/255.f;
diff --git a/linden/indra/llmath/v3dmath.cpp b/linden/indra/llmath/v3dmath.cpp
index bd42830..2bcbf63 100644
--- a/linden/indra/llmath/v3dmath.cpp
+++ b/linden/indra/llmath/v3dmath.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v3dmath.h b/linden/indra/llmath/v3dmath.h
index 078fde8..a99bf5b 100644
--- a/linden/indra/llmath/v3dmath.h
+++ b/linden/indra/llmath/v3dmath.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v3math.cpp b/linden/indra/llmath/v3math.cpp
index b97b410..d403179 100644
--- a/linden/indra/llmath/v3math.cpp
+++ b/linden/indra/llmath/v3math.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -133,6 +134,7 @@ BOOL LLVector3::clampLength( F32 length_limit )
133 mV[0] *= length_limit; 134 mV[0] *= length_limit;
134 mV[1] *= length_limit; 135 mV[1] *= length_limit;
135 mV[2] *= length_limit; 136 mV[2] *= length_limit;
137 changed = TRUE;
136 } 138 }
137 } 139 }
138 140
diff --git a/linden/indra/llmath/v3math.h b/linden/indra/llmath/v3math.h
index 4935443..7f96800 100644
--- a/linden/indra/llmath/v3math.h
+++ b/linden/indra/llmath/v3math.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -160,8 +161,8 @@ typedef LLVector3 LLSimLocalVec;
160F32 angle_between(const LLVector3 &a, const LLVector3 &b); // Returns angle (radians) between a and b 161F32 angle_between(const LLVector3 &a, const LLVector3 &b); // Returns angle (radians) between a and b
161BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel 162BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
162F32 dist_vec(const LLVector3 &a, const LLVector3 &b); // Returns distance between a and b 163F32 dist_vec(const LLVector3 &a, const LLVector3 &b); // Returns distance between a and b
163F32 dist_vec_squared(const LLVector3 &a, const LLVector3 &b);// Returns distance sqaured between a and b 164F32 dist_vec_squared(const LLVector3 &a, const LLVector3 &b);// Returns distance squared between a and b
164F32 dist_vec_squared2D(const LLVector3 &a, const LLVector3 &b);// Returns distance sqaured between a and b ignoring Z component 165F32 dist_vec_squared2D(const LLVector3 &a, const LLVector3 &b);// Returns distance squared between a and b ignoring Z component
165LLVector3 projected_vec(const LLVector3 &a, const LLVector3 &b); // Returns vector a projected on vector b 166LLVector3 projected_vec(const LLVector3 &a, const LLVector3 &b); // Returns vector a projected on vector b
166LLVector3 lerp(const LLVector3 &a, const LLVector3 &b, F32 u); // Returns a vector that is a linear interpolation between a and b 167LLVector3 lerp(const LLVector3 &a, const LLVector3 &b, F32 u); // Returns a vector that is a linear interpolation between a and b
167 168
diff --git a/linden/indra/llmath/v4color.cpp b/linden/indra/llmath/v4color.cpp
index 32cfd5e..0cbfce0 100644
--- a/linden/indra/llmath/v4color.cpp
+++ b/linden/indra/llmath/v4color.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v4color.h b/linden/indra/llmath/v4color.h
index 57055c5..785b47d 100644
--- a/linden/indra/llmath/v4color.h
+++ b/linden/indra/llmath/v4color.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v4coloru.cpp b/linden/indra/llmath/v4coloru.cpp
index b127a53..061b497 100644
--- a/linden/indra/llmath/v4coloru.cpp
+++ b/linden/indra/llmath/v4coloru.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v4coloru.h b/linden/indra/llmath/v4coloru.h
index f3f1c57..082d0ef 100644
--- a/linden/indra/llmath/v4coloru.h
+++ b/linden/indra/llmath/v4coloru.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v4math.cpp b/linden/indra/llmath/v4math.cpp
index a183c78..b938480 100644
--- a/linden/indra/llmath/v4math.cpp
+++ b/linden/indra/llmath/v4math.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/v4math.h b/linden/indra/llmath/v4math.h
index 6234b17..4c82e6b 100644
--- a/linden/indra/llmath/v4math.h
+++ b/linden/indra/llmath/v4math.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/xform.cpp b/linden/indra/llmath/xform.cpp
index 9917880..ce6f756 100644
--- a/linden/indra/llmath/xform.cpp
+++ b/linden/indra/llmath/xform.cpp
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llmath/xform.h b/linden/indra/llmath/xform.h
index 6f880cb..d3be28f 100644
--- a/linden/indra/llmath/xform.h
+++ b/linden/indra/llmath/xform.h
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,