Xonotic
|
Go to the source code of this file.
Macros | |
#define | ClipVelocity(in, normal, out, overbounce) (out = vec_epsilon(vec_reflect(in, normal, (overbounce) - 1), 0.1)) |
#define | cross(a, b) ((a) >< (b)) |
#define | dotproduct(a, b) ((a) * (b)) |
#define | PITCH(v) ((v).x) |
#define | pointinsidebox(point, bmins, bmaxs) boxinsidebox(point, point, bmins, bmaxs) |
#define | ROLL(v) ((v).z) |
#define | vdist(v, cmp, f) (vlen2(v) cmp ((f) ** 2)) |
Vector distance comparison, avoids sqrt() More... | |
#define | vec2(...) EVAL(OVERLOAD(vec2, __VA_ARGS__)) |
#define | vec2_1(v) (_vec2 = (v), _vec2.z = 0, _vec2) |
#define | vec2_2(x, y) (_vec2_x = (x), _vec2_y = (y), _vec2) |
#define | vec3(_x, _y, _z) (_vec3.x = (_x), _vec3.y = (_y), _vec3.z = (_z), _vec3) |
#define | VEC_NAN vec3(FLOAT_NAN, FLOAT_NAN, FLOAT_NAN); |
#define | vlen2(v) (_vlen2 = (v), dotproduct(_vlen2, _vlen2)) |
#define | vmul(a, b) |
#define | YAW(v) ((v).y) |
#define | yinvert(v) (_yinvert = (v), _yinvert.y = 1 - _yinvert.y, _yinvert) |
Functions | |
ERASEABLE float | boxesoverlap (vector m1, vector m2, vector m3, vector m4) |
requires that m2>m1 in all coordinates, and that m4>m3 More... | |
ERASEABLE float | boxinsidebox (vector smins, vector smaxs, vector bmins, vector bmaxs) |
requires the same as boxesoverlap, but is a stronger condition More... | |
ERASEABLE bool | is_all_nans (vector v) |
ERASEABLE vector | point_line_vec (vector p, vector l0, vector ldir) |
ERASEABLE vector | randompos (vector m1, vector m2) |
ERASEABLE vector | reflect (vector dir, vector norm) |
ERASEABLE vector | Rotate (vector v, float a) |
ERASEABLE vector | vec_epsilon (vector this, float eps) |
ERASEABLE vector | vec_reflect (vector vel, vector norm, float bounce) |
clip vel along the plane defined by norm (assuming 0 distance away), bounciness determined by bounce 0..1 More... | |
ERASEABLE float | vlen_maxnorm2d (vector v) |
ERASEABLE float | vlen_minnorm2d (vector v) |
Variables | |
noref vector | _vec2 |
noref vector | _vec3 |
noref vector | _vlen2 |
noref vector | _vmul_a |
noref vector | _vmul_b |
noref vector | _yinvert |
const vector | eX = '1 0 0' |
const vector | eY = '0 1 0' |
const vector | eZ = '0 0 1' |
#define ClipVelocity | ( | in, | |
normal, | |||
out, | |||
overbounce | |||
) | (out = vec_epsilon(vec_reflect(in, normal, (overbounce) - 1), 0.1)) |
Definition at line 156 of file vector.qh.
Referenced by sys_phys_simulate_simple().
#define cross | ( | a, | |
b | |||
) | ((a) >< (b)) |
Definition at line 25 of file vector.qh.
Referenced by _Movetype_FlyMove(), W_CalculateSpread(), and WarpZone_Projectile_Touch().
Definition at line 81 of file vector.qh.
Referenced by leanmodel_ofs().
#define pointinsidebox | ( | point, | |
bmins, | |||
bmaxs | |||
) | boxinsidebox(point, point, bmins, bmaxs) |
Definition at line 79 of file vector.qh.
Referenced by HUD_Crosshair().
Definition at line 83 of file vector.qh.
Referenced by leanmodel_ofs().
Vector distance comparison, avoids sqrt()
Definition at line 8 of file vector.qh.
Referenced by _Movetype_Physics_Walk(), animdecide_setimplicitstate(), bot_aimdir(), botframe_showwaypointlinks(), buildpath_nodefilter_directional(), CreatureFrame_FallDamage(), CSQC_Demo_Camera(), CSQCPlayer_SetPredictionError(), ctf_FlagThink(), Drag(), Drag_Finish(), Draw_ShowNames(), fireBullet_antilag(), fireBullet_trace_callback(), GENERIC_COMMAND(), havocbot_ai(), havocbot_bunnyhop(), havocbot_chooseenemy(), havocbot_ctf_teamcount(), havocbot_goalrating_controlpoints(), havocbot_goalrating_ctf_droppedflags(), havocbot_goalrating_enemyplayers(), havocbot_goalrating_ft_freeplayers(), havocbot_goalrating_items(), havocbot_goalrating_ons_controlpoints_attack(), havocbot_goalrating_ons_generator_attack(), havocbot_goalrating_waypoints(), havocbot_movetogoal(), havocbot_role_ctf_carrier(), havocbot_role_ctf_defense(), havocbot_role_ctf_escort(), havocbot_role_ctf_middle(), havocbot_role_ctf_offense(), havocbot_role_ctf_retriever(), HUD_Crosshair(), InterpolateOrigin_Note(), Item_PreDraw(), kh_Key_Think(), m_tooltip(), Monster_Attack_Check(), Monster_FindTarget(), Monster_Move(), Monster_Move_2D(), Monster_Move_Target(), MUTATOR_HOOKFUNCTION(), navigation_get_really_close_waypoint(), navigation_goalrating_timeout_can_be_anticipated(), navigation_poptouchedgoals(), navigation_routerating(), navigation_routetogoal(), navigation_shortenpath(), navigation_waypoint_will_link(), NET_HANDLE(), ons_ControlPoint_Icon_Think(), ons_Nearest_ControlPoint(), pathlib_close_node(), pathlib_nodeatpoint(), PM_dodging_checkpressedkeys(), PM_Footsteps(), race_SpeedAwardFrame(), ResetBall(), sandbox_ObjectEdit_Get(), Simple_TeleportPlayer(), Spawn_Draw(), steerlib_wander(), SUB_CalcAngleMoveEnt(), trigger_push_test(), trigger_push_touch(), TrueAimCheck(), vehicles_impact(), vehicles_touch(), View_Ortho(), W_SetupShot_Dir_ProjectileSize_Range(), WarpZone_Camera_camera_transform(), WarpZone_camera_transform(), WarpZone_Projectile_Touch(), waypoint_load_hardwiredlinks(), waypoint_load_links(), waypoint_schedulerelink(), waypoint_spawn_fromeditor(), waypoint_spawnforitem_force(), and waypoint_think().
Definition at line 90 of file vector.qh.
Referenced by bobmodel_ofs(), botframe_showwaypointlinks(), determine_force(), draw_cursor(), Draw_ShowNames(), DrawCAItem(), DrawDomItem(), havocbot_bunnyhop(), havocbot_checkgoaldistance(), havocbot_goalrating_enemyplayers(), havocbot_movetogoal(), HUD_Ammo(), HUD_Configure_DrawGrid(), HUD_Contents(), HUD_Damage(), HUD_Draw(), HUD_GetTableSize_BestItemAR(), HUD_HealthArmor(), HUD_Mod_CA_Draw(), HUD_Mod_Dom(), HUD_Mod_Keepaway(), HUD_Mod_KH(), HUD_Mod_Race(), HUD_Notify(), HUD_Panel_HlBorder(), HUD_Powerups(), HUD_PressedKeys(), HUD_Quickmenu_DrawEntry(), HUD_Radar(), HUD_Score(), HUD_Score_Rankings(), HUD_StrafeHUD(), HUD_Weapons(), Item_ItemsTime_Allow(), minigame_tile_pos(), MUTATOR_HOOKFUNCTION(), navigation_checkladders(), navigation_poptouchedgoals(), navigation_routetogoal(), NET_HANDLE(), ons_camSetup(), PM_Accelerate(), PutObserverInServer(), QuickMenu_Mouse(), Rotate(), Scoreboard_DrawItem(), Scoreboard_DrawOthers(), Scoreboard_MakeTable(), Scoreboard_Rankings_Draw(), set_tracewalk_dest(), sys_phys_simulate(), tracewalk(), trigger_push_test(), trigger_push_touch(), viewloc_PlayerPhysics(), waypoint_getSymmetricalOrigin_cmd(), waypoint_gettravelcost(), and XonoticTextBox_drawListBoxItem().
#define vec2_2 | ( | x, | |
y | |||
) | (_vec2_x = (x), _vec2_y = (y), _vec2) |
#define vec3 | ( | _x, | |
_y, | |||
_z | |||
) | (_vec3.x = (_x), _vec3.y = (_y), _vec3.z = (_z), _vec3) |
Definition at line 95 of file vector.qh.
Referenced by _Movetype_FlyMove(), animdecide_getloweranim(), animdecide_getupperanim(), findperpendicular(), HUD_Crosshair(), HUD_Draw(), PlayerEdgeDistance(), solve_cubic_pq(), View_Ortho(), viewloc_PlayerPhysics(), and XonoticCampaignList_resizeNotify().
Definition at line 4 of file vector.qh.
Referenced by _Movetype_PushMove(), _Movetype_TestEntityPosition(), CheatCommand(), Draw_ShowNames(), havocbot_chooseenemy(), havocbot_goalrating_ft_freeplayers(), havocbot_goalrating_item_pickable_check_players(), havocbot_movetogoal(), havocbot_role_ctf_offense(), MUTATOR_HOOKFUNCTION(), navigation_poptouchedgoals(), navigation_routetogoal(), navigation_shortenpath(), navigation_unstuck(), ons_Nearest_ControlPoint(), PlayerUseKey(), sys_phys_simulate(), and WarpZone_FindRadius_Recurse().
#define vmul | ( | a, | |
b | |||
) |
Definition at line 82 of file vector.qh.
Referenced by leanmodel_ofs().
Definition at line 112 of file vector.qh.
Referenced by draw_teamradar_background().
requires that m2>m1 in all coordinates, and that m4>m3
Definition at line 73 of file vector.qh.
References ERASEABLE.
Referenced by _Movetype_LinkEdict_TouchAreaGrid(), _Movetype_Physics_Toss(), botframe_autowaypoints_createwp(), conveyor_think(), Draw_ShowNames(), func_ladder_think(), havocbot_movetogoal(), HUD_Notify(), MUTATOR_HOOKFUNCTION(), navigation_checkladders(), navigation_findnearestwaypoint_withdist_except(), navigation_poptouchedgoals(), sys_phys_simulate_simple(), trigger_push_test(), waypoint_addlink_for_custom_jumppad(), waypoint_get(), waypoint_get_type_name(), waypoint_spawn(), waypoint_spawn_fromeditor(), and waypoint_think().
[in] | p | point |
[in] | l0 | starting point of ldir |
[in] | ldir | line |
Definition at line 119 of file vector.qh.
References ERASEABLE, and normalize().
Referenced by havocbot_movetogoal().
Definition at line 49 of file vector.qh.
References ERASEABLE, random(), v, and vector().
Referenced by generator_draw(), and ons_ControlPoint_Icon_Think().
Definition at line 105 of file vector.qh.
References cos(), sin(), and vec2.
Referenced by HUD_Radar(), teamradar_2dcoord_to_texcoord(), teamradar_texcoord_to_2dcoord(), and waypoint_getSymmetricalPoint().
const vector eX = '1 0 0' |
Definition at line 44 of file vector.qh.
Referenced by BorderImage_recalcPositionWithText(), Button_draw(), checkColorCode(), crosshairpicker_crosshairToCell(), DemoConfirm_ListClick_Check_Gamestatus(), Dialog_addItemSimple(), Dialog_configureDialog(), draw_BorderPicture(), draw_ButtonPicture(), draw_CenterText(), draw_Picture_Aligned(), draw_setMousePointer(), Draw_ShowNames(), draw_VertButtonPicture(), DrawAmmoItem(), DrawCAItem(), DrawDomItem(), DrawNadeProgressBar(), DrawNumIcon_expanding(), hslimage_color(), HUD_Configure_DrawGrid(), HUD_GetTableSize_BestItemAR(), HUD_HealthArmor(), HUD_Main(), HUD_MinigameMenu_MouseInput(), HUD_Mod_CTF(), HUD_Mod_Keepaway(), HUD_Mod_KH(), HUD_Mod_NexBall(), HUD_Notify(), HUD_Panel_DrawHighlight(), HUD_Panel_DrawProgressBar(), HUD_Panel_DrawStrafeHUD(), HUD_Panel_Highlight(), HUD_Panel_HlBorder(), HUD_Physics(), HUD_PressedKeys(), HUD_Quickmenu_DrawEntry(), HUD_RaceTimer(), HUD_Score(), HUD_Score_Rankings(), HUD_StrafeHUD(), Image_updateAspect(), InfoMessages_drawstring(), InputBox_draw(), Item_ItemsTime_Allow(), ListBox_draw(), ListBox_mouseRelease(), m_draw(), m_init_delayed(), MainWindow_configureMainWindow(), MainWindow_draw(), preMenuDraw(), preMenuInit(), Scoreboard_AccuracyStats_Draw(), Scoreboard_DrawHeader(), Scoreboard_DrawItem(), Scoreboard_DrawOthers(), Scoreboard_ItemStats_Draw(), Scoreboard_MapStats_Draw(), Scoreboard_Rankings_Draw(), ServerList_Info_Click(), Slider_draw(), StrafeHUD_drawGradient(), UpdateConWidthHeight(), WarpZoneLib_MoveOutOfSolid(), XonoticCampaignList_drawListBoxItem(), XonoticCampaignList_resizeNotify(), XonoticCharmap_resizeNotify(), XonoticColorpickerString_loadCvars(), XonoticCreditsList_drawListBoxItem(), XonoticCvarList_drawListBoxItem(), XonoticDemoList_drawListBoxItem(), XonoticGametypeList_drawListBoxItem(), XonoticHUDSkinList_drawListBoxItem(), XonoticKeyBinder_drawListBoxItem(), XonoticLanguageList_drawListBoxItem(), XonoticMapList_doubleClickListBoxItem(), XonoticMapList_drawListBoxItem(), XonoticMapList_keyDown(), XonoticMapList_resizeNotify(), XonoticPicker_configureXonoticPicker(), XonoticPicker_keyDown(), XonoticPlayList_drawListBoxItem(), XonoticRegisteredSettingsList_getTooltip_cb(), XonoticScreenshotList_drawListBoxItem(), XonoticScreenshotList_startScreenshot(), XonoticServerList_drawListBoxItem(), XonoticServerList_keyDown(), XonoticServerList_positionSortButton(), XonoticSkinList_drawListBoxItem(), XonoticSoundList_drawListBoxItem(), and XonoticStatsList_drawListBoxItem().
const vector eY = '0 1 0' |
Definition at line 45 of file vector.qh.
Referenced by BorderImage_recalcPositionWithText(), Button_draw(), c4_move(), checkColorCode(), crosshairpicker_crosshairToCell(), DemoConfirm_ListClick_Check_Gamestatus(), Dialog_addItemSimple(), Dialog_configureDialog(), draw_BorderPicture(), draw_ButtonPicture(), draw_Picture_Aligned(), draw_setMousePointer(), Draw_ShowNames(), draw_VertButtonPicture(), DrawAmmoItem(), DrawNumIcon_expanding(), GENERIC_COMMAND(), hslimage_color(), HUD_Configure_DrawGrid(), HUD_Draw(), HUD_GetTableSize_BestItemAR(), HUD_HealthArmor(), HUD_Main(), HUD_MinigameMenu_MouseInput(), HUD_Mod_CTF(), HUD_Mod_Keepaway(), HUD_Mod_KH(), HUD_Mod_NexBall(), HUD_Notify(), HUD_Panel_DrawHighlight(), HUD_Panel_DrawProgressBar(), HUD_Panel_Highlight(), HUD_Panel_HlBorder(), HUD_Physics(), HUD_Score(), HUD_StrafeHUD(), Image_updateAspect(), InputBox_draw(), ListBox_draw(), ListBox_mouseRelease(), m_draw(), m_init_delayed(), MainWindow_configureMainWindow(), MainWindow_draw(), nmm_in_mill(), pp_next_match(), preMenuDraw(), preMenuInit(), Scoreboard_DrawHeader(), Scoreboard_DrawItem(), Scoreboard_MakeTable(), Scoreboard_Rankings_Draw(), ServerList_Info_Click(), Slider_draw(), UpdateConWidthHeight(), WarpZoneLib_MoveOutOfSolid(), XonoticCampaignList_drawListBoxItem(), XonoticCampaignList_resizeNotify(), XonoticCharmap_resizeNotify(), XonoticColorpickerString_loadCvars(), XonoticCreditsList_drawListBoxItem(), XonoticCvarList_drawListBoxItem(), XonoticDemoList_drawListBoxItem(), XonoticGametypeList_drawListBoxItem(), XonoticHUDSkinList_drawListBoxItem(), XonoticKeyBinder_drawListBoxItem(), XonoticLanguageList_drawListBoxItem(), XonoticMapList_doubleClickListBoxItem(), XonoticMapList_drawListBoxItem(), XonoticMapList_keyDown(), XonoticMapList_resizeNotify(), XonoticPicker_configureXonoticPicker(), XonoticPicker_keyDown(), XonoticPlayList_drawListBoxItem(), XonoticRegisteredSettingsList_getTooltip_cb(), XonoticScreenshotList_drawListBoxItem(), XonoticScreenshotList_startScreenshot(), XonoticServerList_drawListBoxItem(), XonoticServerList_keyDown(), XonoticServerList_positionSortButton(), XonoticSkinList_drawListBoxItem(), XonoticSoundList_drawListBoxItem(), XonoticStatsList_drawListBoxItem(), and XonoticWeaponsList_drawListBoxItem().
const vector eZ = '0 0 1' |
Definition at line 46 of file vector.qh.
Referenced by cpicon_draw(), ctf_CalculatePassVelocity(), ctf_FlagThink(), Draw_ShowNames(), havocbot_movetogoal(), hslimage_color(), InputBox_draw(), navigation_poptouchedgoals(), resurface_limited(), sys_phys_simulate(), tracewalk(), trigger_push_test(), trigger_push_touch(), TrueAimCheck(), WarpZoneLib_MoveOutOfSolid(), and XonoticColorpickerString_loadCvars().