Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

l_math.h File Reference

#include <math.h>

Include dependency graph for l_math.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define DEG2RAD(a)   ( a * M_PI ) / 180.0F
#define DotProduct(x, y)   (x[0]*y[0]+x[1]*y[1]+x[2]*y[2])
#define EQUAL_EPSILON   0.001
#define M_PI   3.14159265358979323846
#define PITCH   0
#define Q_PI   3.14159265358979323846
#define ROLL   2
#define SIDE_BACK   1
#define SIDE_CROSS   -2
#define SIDE_FRONT   0
#define SIDE_ON   2
#define Vector4Copy(a, b)   {b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];}
#define VectorAdd(a, b, c)   {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];}
#define VectorClear(x)   {x[0] = x[1] = x[2] = 0;}
#define VectorCopy(a, b)   {b[0]=a[0];b[1]=a[1];b[2]=a[2];}
#define VectorMA(v, s, b, o)   ((o)[0]=(v)[0]+(b)[0]*(s),(o)[1]=(v)[1]+(b)[1]*(s),(o)[2]=(v)[2]+(b)[2]*(s))
#define VectorNegate(x, y)   {y[0]=-x[0];y[1]=-x[1];y[2]=-x[2];}
#define VectorScale(v, s, o)   ((o)[0]=(v)[0]*(s),(o)[1]=(v)[1]*(s),(o)[2]=(v)[2]*(s))
#define VectorSubtract(a, b, c)   {c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];}
#define YAW   1

Typedefs

typedef vec_t vec3_t [3]
typedef vec_t vec4_t [4]
typedef float vec_t

Functions

vec_t _DotProduct (vec3_t v1, vec3_t v2)
void _VectorAdd (vec3_t va, vec3_t vb, vec3_t out)
void _VectorCopy (vec3_t in, vec3_t out)
void _VectorMA (vec3_t va, double scale, vec3_t vb, vec3_t vc)
void _VectorScale (vec3_t v, vec_t scale, vec3_t out)
void _VectorSubtract (vec3_t va, vec3_t vb, vec3_t out)
void AddPointToBounds (const vec3_t v, vec3_t mins, vec3_t maxs)
void AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
void ClearBounds (vec3_t mins, vec3_t maxs)
vec_t ColorNormalize (vec3_t in, vec3_t out)
void CreateRotationMatrix (vec3_t angles, float matrix[3][3])
void CrossProduct (const vec3_t v1, const vec3_t v2, vec3_t cross)
vec_t Q_rint (vec_t in)
void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3])
void RotatePoint (vec3_t point, float matrix[3][3])
qboolean VectorCompare (vec3_t v1, vec3_t v2)
void VectorInverse (vec3_t v)
double VectorLength (vec3_t v)
vec_t VectorNormalize (vec3_t inout)
vec_t VectorNormalize2 (const vec3_t v, vec3_t out)

Variables

vec3_t vec3_origin


Define Documentation

#define DEG2RAD  )     ( a * M_PI ) / 180.0F
 

Definition at line 48 of file l_math.h.

Referenced by CG_AddParticleToScene(), DoRailDiscs(), FakeTexCoordsToTexMat(), R_Init(), RotatePointAroundVector(), and UI_DrawPlayer().

#define DotProduct x,
y   )     (x[0]*y[0]+x[1]*y[1]+x[2]*y[2])
 

Definition at line 60 of file l_math.h.

Referenced by AAS_Accelerate(), AAS_AgainstLadder(), AAS_AreaVolume(), AAS_BoxOnPlaneSide2(), AAS_BoxOriginDistanceFromPlane(), AAS_CheckArea(), AAS_CheckFaceWindingPlane(), AAS_ClientMovementPrediction(), AAS_ClosestEdgePoints(), AAS_DrawArrow(), AAS_FindFaceReachabilities(), AAS_FlipAreaFaces(), AAS_GapFace(), AAS_GroundFace(), AAS_InsideFace(), AAS_LadderSubdivideArea_r(), AAS_OnGround(), AAS_PointAreaNum(), AAS_PointInsideFace(), AAS_PositionBrush(), AAS_ProjectPointOntoVector(), AAS_Reachability_EqualFloorHeight(), AAS_Reachability_Grapple(), AAS_Reachability_Jump(), AAS_Reachability_Ladder(), AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(), AAS_TestSplitPlane(), AAS_TraceAreas(), AAS_TraceClientBBox(), AAS_TransformPlane(), AbsoluteToLocal(), AddBrushBevels(), AddEdge(), AddSeperators(), AddWindingToConvexHull(), AdjustBrushesForOrigin(), AllocateLightmapForSurface(), Autosprite2Deform(), BasePortalVis(), BaseWindingForPlane(), BotAimAtEnemy(), BotCheckBlocked(), BotFinishTravel_Jump(), BotGetLongTermGoal(), BotImport_DebugLineShow(), BotInputToUserCommand(), BotTravel_Elevator(), BotTravel_FuncBobbing(), BotTravel_Jump(), BoxOriginDistanceFromPlane(), Brush_MakeFaceWinding(), Brush_Point(), Brush_Ray(), Brush_SelectFaceForDragging(), BrushMostlyOnSide(), BrushVolume(), CEpairsWrapper::CalculateRotatedBounds(), CG_DamageFeedback(), CG_ImpactMark(), CG_LightVerts(), CG_OffsetFirstPersonView(), CG_PlayerAngles(), CG_PlayerFlag(), CG_ReflectVelocity(), CG_Tracer(), CheckWinding(), ChopFaceByBrush(), ChopWindingInPlace(), ClipLineToFace(), ClipSkyPolygon(), ClipToSeperators(), ClipWindingEpsilon(), CM_AddFacetBevels(), CM_CheckFacetPlane(), CM_DrawDebugSurface(), CM_FindPlane(), CM_GenerateBoundaryForPoints(), CM_GenerateFacetFor4Points(), CM_PlaneFromPoints(), CM_PointContents(), CM_PointLeafnum_r(), CM_PointOnPlaneSide(), CM_PositionTestInPatchCollide(), CM_ProjectPointOntoVector(), CM_TestBoxInBrush(), CM_TracePointThroughPatchCollide(), CM_TraceThroughBrush(), CM_TraceThroughPatchCollide(), CM_TraceThroughSphere(), CM_TraceThroughTree(), CM_TraceThroughVerticalCylinder(), CM_TransformedPointContents(), ColinearEdge(), ComputeBest2DVector(), ComputeScale(), ComputeTexCoords(), CreateFilters(), CreatePassages(), CCamWnd::CullBrush(), DebugLine(), DirToByte(), DrawSurfaceForSide(), EmitBrushPrimitTextureCoordinates(), EmitTerrainVerts(), EmitTerrainVerts2(), EmitTextureCoordinates(), Face_FitTexture(), Face_MakePlane(), Face_MoveTexture(), Face_MoveTexture_BrushPrimit(), FilterMapDrawSurfIntoTree(), FilterTrace(), FindPlaneSeperatingWindings(), FindPortalSide(), FixSurfaceJunctions(), G_BounceItem(), G_BounceMissile(), G_BounceProjectile(), G_RotatePoint(), G_TryPushingProxMine(), GenerateBoundaryForPoints(), GlobalVectorToLocal(), HL_FaceOnWinding(), HL_SplitBrush(), HL_SplitBrushWithFace(), InsertPointOnEdge(), InsideFace(), InsideWinding(), IsMirror(), LightContributionToPoint(), LightingAtSample(), LodErrorForVolume(), MakeNormalVectors(), MapPlaneFromPoints(), MergeWindings(), NodeForPoint(), NonConvex(), ParseFace(), PassageChopWinding(), Patch_ApplyMatrix(), Pickup_Powerup(), PlaceOccupant(), Plane_FromPoints(), PlaneFromPoints(), PlaneFromWinding(), PM_Accelerate(), PM_ClipVelocity(), PM_GroundTrace(), PM_SlideMove(), PM_StepSlideMove(), PM_WalkMove(), PM_WaterMove(), PointInLeaf(), PointInLeafnum(), PointOnWinding(), PointToPolygonFormFactor(), ProjectPointOnPlane(), ProjectPointOntoVector(), ProjectRadius(), Q1_FaceOnWinding(), Q1_FacePlane(), Q1_PointInLeaf(), Q1_SplitBrush(), Q1_SplitBrushWithFace(), Q2_BrushSideWinding(), Q2_FaceOnWinding(), Q2_ParseMapEntity(), Q3_BrushSideWinding(), Q3_FaceOnWinding(), Q3_FindVisibleBrushSides(), Q3_PlaneFromPoints(), Q3_SurfacePlane(), R_BoxSurfaces_r(), R_ChopPolyBehindPlane(), R_CullLocalBox(), R_CullPointAndRadius(), R_CullSurface(), R_DlightFace(), R_GetPortalOrientations(), R_InitSkyTexCoords(), R_MarkFragments(), R_MirrorPoint(), R_MirrorVector(), R_MirrorViewBySurface(), R_PointInLeaf(), R_RecursiveWorldNode(), R_RotateForEntity(), R_SetupEntityLighting(), R_SetupFrustum(), R_SubdividePatchToGrid(), R_TransformDlights(), R_WorldToLocal(), RayTriangleIntersect(), RB_AddFlare(), RB_BeginDrawingView(), RB_CalcDiffuseColor(), RB_CalcEnvironmentTexCoords(), RB_CalcFogTexCoords(), RB_CalcSpecularAlpha(), RB_ProjectionShadowDeform(), RB_ShadowTessEnd(), RB_SurfaceAnim(), RecursiveLeafFlow(), RecursivePassagePortalFlow(), RemoveColinearPoints(), RotateFaceTexture_BrushPrimit(), RotatePoint(), Select_ApplyMatrix(), SelectCurvePointByRay(), SelectEdgeByRay(), idPointListInterface::selectPointByRay(), SelectVertexByRay(), SetFacetFilter(), Sin_BrushSideWinding(), Sin_FaceOnWinding(), SP_func_door(), SphereCull(), SplitBrush(), SplitMeshByPlane(), SubdivideAreaLight(), SubdivideDrawSurf(), SubdivideFace(), SunToPlane(), SurfIsOffscreen(), TestBrushToPlanenum(), TestEdge(), TexinfoForBrushTexture(), TextureAxisFromPlane(), TH_CreateTrianglePlanes(), TH_FindTetrahedron2(), TH_IntersectTrianglePlanes(), TH_PlaneFromPoints(), TH_TetrahedronVolume(), TH_TryTriangle(), TraceAgainstFacet(), TraceGrid(), TryMergeWinding(), VectorBetweenVectors(), VectorLengthSquared(), VectorNormalizeFast(), VectorRotate(), VisChopWinding(), VL_ChopWinding(), VL_CreateSkyLights(), VL_FindAdjacentSurface(), VL_FloodDirectedLight(), VL_FloodLight(), VL_GenerateBoundaryForPoints(), VL_GenerateFacetFor4Points(), VL_GetFilter(), VL_LightmapMatrixFromPoints(), VL_LightSurfaceWithVolume(), VL_PlaneForEdgeToWinding(), VL_PlaneFromPoints(), VL_PlaneFromWinding(), VL_PointInLeafnum_r(), VL_R_FloodLight(), VL_R_WindingAreaOutsideSolid(), VL_SmoothenLightmapEdges(), VL_SplitLightVolume(), VL_SplitWinding(), VL_SubdivideAreaLight(), VS_ChopWinding(), VS_CreateSkyLights(), VS_FindAdjacentSurface(), VS_FloodDirectedLight(), VS_FloodLight(), VS_GenerateBoundaryForPoints(), VS_GenerateFacetFor4Points(), VS_GetFilter(), VS_LightmapMatrixFromPoints(), VS_LightSurfaceWithVolume(), VS_PlaneForEdgeToWinding(), VS_PlaneFromPoints(), VS_PlaneFromWinding(), VS_PointInLeafnum_r(), VS_R_FloodLight(), VS_R_WindingAreaOutsideSolid(), VS_SmoothenLightmapEdges(), VS_SplitLightVolume(), VS_SplitWinding(), VS_SubdivideAreaLight(), Winding_BaseForPlane(), Winding_Clip(), Winding_Plane(), Winding_PlanesConcave(), Winding_PointInside(), Winding_SplitEpsilon(), Winding_TryMerge(), Winding_VectorIntersect(), WindingError(), WindingOnPlaneSide(), WindingPlane(), WindingsNonConvex(), WriteMapBrush(), and WritePortalFile_r().

#define EQUAL_EPSILON   0.001
 

Definition at line 56 of file l_math.h.

#define M_PI   3.14159265358979323846
 

Definition at line 51 of file l_math.h.

Referenced by AAS_Reachability_Grapple(), AngleVectors(), BG_EvaluateTrajectory(), BG_EvaluateTrajectoryDelta(), Bullet_Fire(), CG_AddScorePlum(), CG_CalcFov(), CG_CalcViewValues(), CG_DrawPlayerHead(), CG_DrawStatusBarHead(), CG_OffsetThirdPersonView(), CG_Player(), InitShooter(), Item_Paint(), R_SetupFrustum(), R_SetupProjection(), RB_CalcBulgeVertexes(), RB_SurfaceSprite(), S_MakeTestPattern(), SP_func_pendulum(), Terrain_AddMovePoint(), angles_t::toForward(), toMatrix(), angles_t::toVectors(), UI_DrawPlayer(), and UI_LegsSequencing().

#define PITCH   0
 

Definition at line 42 of file l_math.h.

Referenced by BG_TouchJumpPad(), BotAimAtEnemy(), BotInputToUserCommand(), BotMapScripts(), CL_CreateCmd(), IN_CenterView(), and vectoyaw().

#define Q_PI   3.14159265358979323846
 

Definition at line 46 of file l_math.h.

Referenced by Brush_MakeSidedSphere(), DrawBrushEntityName(), CXYWnd::DrawCameraIcon(), InsertMD3Model(), PaintedModel(), Patch_RotateTexture(), Select_RotateAxis(), VectorRotate(), CXYWnd::XY_MouseDown(), and CXYWnd::XY_MouseMoved().

#define ROLL   2
 

Definition at line 44 of file l_math.h.

Referenced by BotInputToUserCommand().

#define SIDE_BACK   1
 

Definition at line 39 of file l_math.h.

Referenced by ClipSkyPolygon(), MergeWindings(), VL_ChopWindingWithBrush(), VL_LightSurfaceWithVolume(), VL_R_FloodLight(), VS_ChopWindingWithBrush(), VS_LightSurfaceWithVolume(), and VS_R_FloodLight().

#define SIDE_CROSS   -2
 

Definition at line 40 of file l_math.h.

#define SIDE_FRONT   0
 

Definition at line 37 of file l_math.h.

Referenced by ClipSkyPolygon(), and MergeWindings().

#define SIDE_ON   2
 

Definition at line 38 of file l_math.h.

Referenced by ChopWindingInPlace(), ClipSkyPolygon(), ClipWindingEpsilon(), PassageChopWinding(), R_ChopPolyBehindPlane(), VisChopWinding(), VL_ChopWinding(), VL_R_FloodLight(), VL_SplitLightVolume(), VL_SplitWinding(), VS_ChopWinding(), VS_R_FloodLight(), VS_SplitLightVolume(), VS_SplitWinding(), Winding_Clip(), and Winding_SplitEpsilon().

#define Vector4Copy a,
 )     {b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];}
 

Definition at line 64 of file l_math.h.

Referenced by CM_AddFacetBevels(), CM_DrawDebugSurface(), CM_FindPlane(), CM_FindPlane2(), CM_TraceThroughPatchCollide(), CM_ValidateFacet(), and UI_SPLevelMenu_MenuDraw().

#define VectorAdd a,
b,
 )     {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];}
 

Definition at line 62 of file l_math.h.

Referenced by AAS_AlternativeRouteGoals(), AAS_BestReachableArea(), AAS_BestReachableFromJumpPadArea(), AAS_CheckArea(), AAS_ClientMovementPrediction(), AAS_EntityBSPData(), AAS_FaceCenter(), AAS_FlipAreaFaces(), AAS_GetJumpPadInfo(), AAS_Reachability_Elevator(), AAS_Reachability_EqualFloorHeight(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Jump(), AAS_Reachability_Ladder(), AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(), AAS_Reachability_Teleport(), AAS_Reachability_WalkOffLedge(), AAS_StoreArea(), AAS_UpdateEntity(), AAS_WeaponJumpZVelocity(), AbsoluteToLocal(), AddSkyPolygon(), AimAtTarget(), BaseWindingForPlane(), BotAirControl(), BotAttackMove(), BotEntityVisible(), BotFuncBobStartEnd(), BotFuncButtonActivateGoal(), BotFuncDoorActivateGoal(), BotItemGoalInVisButNotVisible(), BotModelMinsMaxs(), BotRoamGoal(), BotTouchingGoal(), BotTravel_Grapple(), BotTriggerMultipleActivateGoal(), Brush_DrawFacingAngle(), Brush_MakeSidedSphere(), Brush_Move(), Brush_MoveVertex_old1(), Brush_MoveVertex_old2(), CanDamage(), CapSpecial(), CG_AdjustPositionForMover(), CG_BubbleTrail(), CG_DrawHead(), CG_DrawSelectedPlayerHead(), CG_MachineGunEjectBrass(), CG_MakeExplosion(), CG_OffsetFirstPersonView(), CG_PlasmaTrail(), CG_Player(), CG_PredictPlayerState(), CG_RailTrail(), CG_SetEntitySoundPosition(), CG_ShotgunEjectBrass(), CG_ShotgunFire(), CM_PositionTest(), CM_PositionTestInPatchCollide(), CM_TestBoxInBrush(), CM_TestCapsuleInCapsule(), CM_TraceCapsuleThroughCapsule(), CM_TraceThroughBrush(), CM_TraceThroughPatchCollide(), CM_TraceThroughSphere(), CM_TraceThroughVerticalCylinder(), CPlugInManager::CommitEntityHandleToMap(), ComputeAbsolute(), ComputeScale(), CreateEntityFromName(), CreateFlareSurface(), CreateSurfaceLights(), CreateTerrainSurface(), DeformText(), DoRailDiscs(), DrawLight(), Eclass_hasModel(), Entity_Create(), Entity_Parse(), FaceToBrushPrimitFace(), FillCloudySkySide(), FinishBrush(), G_BounceItem(), G_BounceMissile(), G_Damage(), G_KillBox(), G_MoverPush(), G_TouchTriggers(), G_TryPushingEntity(), G_TryPushingProxMine(), HasModel(), CCamWnd::InitCull(), MakeMeshNormals(), MoverBottomCenter(), MoveSelection(), PaintedModel(), ParseMesh(), Patch_AddRow(), Patch_AdjustColumns(), Patch_AdjustRows(), Patch_DisperseColumns(), Patch_DisperseRows(), Patch_InsertColumn(), Patch_InsertRow(), Patch_MeshNormals(), Patch_Move(), Patch_Thicken(), Patch_UpdateSelected(), PM_GrappleMove(), PM_SlideMove(), Q2_ParseBrush(), R_ComputeFogNum(), R_CreateSurfaceGridMesh(), R_MarkFragments(), R_MirrorPoint(), RB_CalcMoveVertexes(), RB_DrawSun(), RB_SurfaceBeam(), S_AddLoopingSound(), Select_ShiftTexture_BrushPrimit(), SetFaceTexdef(), SetPortalSphere(), SideAsTriFan(), SphereFromBounds(), SpotWouldTelefrag(), SubdivideAreaLight(), SurfaceAsTriFan(), SV_LinkEntity(), Terrain_CalcNormals(), Terrain_Move(), TH_FaceCenter(), TraceLtm(), idSplineList::updateSelection(), VectorMiddle(), VectorRotate(), VL_CreateFakeSurfaceLights(), VL_FloodLight(), VL_GenerateFacetFor3Points(), VL_GenerateFacetFor4Points(), VL_LightmapMatrixFromPoints(), VL_SetPortalSphere(), VL_SphereFromBounds(), VL_StoreLightmap(), VL_SubdivideAreaLight(), VS_CreateFakeSurfaceLights(), VS_FloodLight(), VS_GenerateFacetFor3Points(), VS_GenerateFacetFor4Points(), VS_LightmapMatrixFromPoints(), VS_SetPortalSphere(), VS_SphereFromBounds(), VS_StoreLightmap(), VS_SubdivideAreaLight(), Winding_BaseForPlane(), and WindingCenter().

#define VectorClear  )     {x[0] = x[1] = x[2] = 0;}
 

Definition at line 66 of file l_math.h.

Referenced by __VectorNormalize(), AAS_AlternativeRouteGoals(), AAS_EntityOrigin(), AAS_FaceCenter(), AAS_FixMapBrush(), AAS_GetJumpPadInfo(), AAS_PositionFuncRotatingBrush(), AAS_Reachability_Jump(), AAS_Reachability_Teleport(), AAS_ShowReachability(), AAS_StoreArea(), AAS_TestMovementPrediction(), AAS_TraceClientBBox(), AAS_VectorForBSPEpairKey(), AddBrushBevels(), BG_EvaluateTrajectoryDelta(), BotAimAtEnemy(), BotExportTest(), BotFuncButtonActivateGoal(), BotFuncDoorActivateGoal(), BotGetActivateGoal(), BotImport_BSPModelMinsMaxsOrigin(), BotMatch_CheckPoint(), BotModelMinsMaxs(), BotSetupForMovement(), BotTriggerMultipleActivateGoal(), BrushFromBounds(), CG_BloodPool(), CG_ColorFromString(), CG_DrawBlueFlagHead(), CG_DrawClientScore(), CG_DrawFlagModel(), CG_DrawPlayerAmmoIcon(), CG_DrawPlayerArmorIcon(), CG_DrawPlayerHead(), CG_DrawPlayerItem(), CG_DrawRedFlagHead(), CG_DrawStatusBar(), CG_DrawStatusBarHead(), CG_GetColorForHealth(), CG_HarvesterSkulls(), CG_Item(), CG_ParseAnimationFile(), CG_Particle_Bleed(), CG_Particle_OilParticle(), CG_Particle_OilSlick(), CG_ParticleBloodCloud(), CG_ParticleDust(), CG_ParticleExplosion(), CG_Player(), CG_PlayerAngles(), CG_PlayerFlag(), CG_PredictPlayerState(), CG_ScorePlum(), ClientEndFrame(), CM_AddFacetBevels(), CM_InitBoxHull(), CM_SnapVector(), CM_Trace(), Cmd_SetViewpos_f(), Controls_UpdateModel(), CreateFlareSurface(), CreateTerrainSurface(), DeformText(), EA_ResetInput(), FilterTrace(), G_MissileImpact(), G_SetMovedir(), G_SetOrigin(), LightContributionToPoint(), LoadShaderImage(), MakeBspBrushList(), MakeMeshNormals(), MakeNewTerrain(), NormalizeColor(), CMainFrame::OnSplineTest(), PaintedModel(), Patch_MeshNormals(), PlayerModel_UpdateModel(), PM_DeadMove(), PM_SlideMove(), R_LerpTag(), R_MirrorPoint(), R_MirrorVector(), R_ModelBounds(), R_SetupEntityLightingGrid(), RB_SurfaceAnim(), RB_SurfaceFlare(), ResetMapLoading(), SelectSplitPlaneNum(), SetFacetFilter(), SnapVector(), SP_func_plat(), SP_func_train(), SP_misc_portal_camera(), SP_misc_portal_surface(), SubdivideAreaLight(), SunToPoint(), Terrain_CalcNormals(), TH_FaceCenter(), TH_SnapVector(), Touch_DoorTriggerSpectator(), TraceAgainstFacet(), TraceGrid(), TraceLtm(), UI_DrawOpponent(), UI_DrawPlayerModel(), UI_PlayerAngles(), VectorNormalize(), VectorNormalize2(), VL_FloodLight(), VL_GetFilter(), VL_LightmapMatrixFromPoints(), VL_SubdivideAreaLight(), VS_FloodLight(), VS_GetFilter(), VS_LightmapMatrixFromPoints(), VS_SubdivideAreaLight(), and WriteOriginBrush().

#define VectorCopy a,
 )     {b[0]=a[0];b[1]=a[1];b[2]=a[2];}
 

Definition at line 63 of file l_math.h.

Referenced by AAS_AgainstLadder(), AAS_AlternativeRouteGoals(), AAS_AreaEntityCollision(), AAS_AreaGroundFace(), AAS_AreaInfo(), AAS_AreaVolume(), AAS_BestReachableArea(), AAS_BoxOriginDistanceFromPlane(), AAS_CalculateAreaTravelTimes(), AAS_ClientMovementPrediction(), AAS_ClipToBBox(), AAS_ClosestEdgePoints(), AAS_DrawArrow(), AAS_DrawCross(), AAS_DrawPermanentCross(), AAS_DrawPlaneCross(), AAS_DropToFloor(), AAS_EntityBSPData(), AAS_EntityOrigin(), AAS_EntitySize(), AAS_FacePlane(), AAS_FindBestAreaSplitPlane(), AAS_FindFaceReachabilities(), AAS_GapFace(), AAS_GetAreaRoutingCache(), AAS_GetJumpPadInfo(), AAS_GetPlane(), AAS_GetPortalRoutingCache(), AAS_GetVertex(), AAS_GroundFace(), AAS_InitReachabilityAreas(), AAS_InsideFace(), AAS_JumpReachRunStart(), AAS_LadderSubdivideArea_r(), AAS_NearestHideArea(), AAS_OnGround(), AAS_OptimizeEdge(), AAS_OriginOfMoverWithModelNum(), AAS_PositionFuncRotatingBrush(), AAS_PredictRoute(), AAS_PresenceTypeBoundingBox(), AAS_RandomGoalArea(), AAS_Reachability_Elevator(), AAS_Reachability_EqualFloorHeight(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Grapple(), AAS_Reachability_Jump(), AAS_Reachability_JumpPad(), AAS_Reachability_Ladder(), AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(), AAS_Reachability_Swim(), AAS_Reachability_Teleport(), AAS_Reachability_WalkOffLedge(), AAS_Reachability_WeaponJump(), AAS_SetMovedir(), AAS_ShowFace(), AAS_ShowFacePolygon(), AAS_StoreReachability(), AAS_Swimming(), AAS_TraceAreas(), AAS_TraceClientBBox(), AAS_TransformPlane(), AAS_UpdateEntity(), AAS_WeaponJumpZVelocity(), AbsoluteToLocal(), AddEdge(), CPlugInManager::AddFaceToBrushHandle(), AddSkyPolygon(), idSplineList::addToRenderer(), AddWindingPoint(), AddWindingToConvexHull(), AINode_Battle_Chase(), AINode_Battle_Fight(), AINode_Battle_NBG(), AINode_Battle_Retreat(), AINode_Seek_ActivateEntity(), AINode_Seek_LTG(), AINode_Seek_NBG(), AllocateLightmapForSurface(), AllocateLightmaps(), Autosprite2Deform(), AutospriteDeform(), AxializeVector(), AxisCopy(), BaseWindingForPlane(), BeginModel(), BG_EvaluateTrajectory(), BG_EvaluateTrajectoryDelta(), BG_PlayerStateToEntityState(), BG_PlayerStateToEntityStateExtraPolate(), BG_TouchJumpPad(), BotAddAvoidSpot(), BotAddToTarget(), BotAI(), BotAI_Trace(), BotAIBlocked(), BotAimAtEnemy(), BotAirControl(), BotAIStartFrame(), BotAttackMove(), BotCheckAttack(), BotCheckBarrierJump(), BotCheckEvents(), BotChooseLTGItem(), BotChooseNBGItem(), BotClearPath(), BotCreateWayPoint(), BotEntityVisible(), BotExportTest(), BotFindEnemy(), BotFinishTravel_BarrierJump(), BotFinishTravel_FuncBobbing(), BotFinishTravel_Jump(), BotFinishTravel_JumpPad(), BotFinishTravel_Walk(), BotFinishTravel_WalkOffLedge(), BotFinishTravel_WaterJump(), BotFinishTravel_WeaponJump(), BotFuncBobStartEnd(), BotFuncButtonActivateGoal(), BotFuncDoorActivateGoal(), BotFuzzyPointReachabilityArea(), BotGapDistance(), BotGetAirGoal(), BotGetAlternateRouteGoal(), BotGetLevelItemGoal(), BotGetLongTermGoal(), BotGetMapLocationGoal(), BotGetNextCampSpotGoal(), BotGoalForBSPEntity(), BotGoForActivateGoal(), BotImport_BSPModelMinsMaxsOrigin(), BotImport_DebugLineShow(), BotImport_EntityTrace(), BotImport_Trace(), BotInitLevelItems(), BotInitMoveState(), BotInLavaOrSlime(), BotLongTermGoal(), BotMatch_Camp(), BotMatch_HelpAccompany(), BotMatch_LeadTheWay(), BotMoveInGoalArea(), BotMovementViewTarget(), BotMoveToGoal(), BotOnMover(), BotPointAreaNum(), BotPredictVisiblePosition(), BotRandomMove(), BotReachabilityArea(), BotRoamGoal(), BotSetMovedir(), BotSetupForMovement(), BotSwimInDirection(), BotTravel_BarrierJump(), BotTravel_BFGJump(), BotTravel_Crouch(), BotTravel_Elevator(), BotTravel_FuncBobbing(), BotTravel_Grapple(), BotTravel_Jump(), BotTravel_JumpPad(), BotTravel_Ladder(), BotTravel_RocketJump(), BotTravel_Swim(), BotTravel_Teleport(), BotTravel_Walk(), BotTravel_WalkOffLedge(), BotTravel_WaterJump(), BotTriggerMultipleActivateGoal(), BotUpdateEntityItems(), BotValidChatPosition(), BotVoiceChat_Camp(), BotVoiceChat_FollowMe(), BotWalkInDirection(), BoxOriginDistanceFromPlane(), Brush_Create(), Brush_CreatePyramid(), Brush_DrawXY(), Brush_FullClone(), Brush_MakeSided(), Brush_MakeSidedCone(), Brush_MakeSidedSphere(), Brush_Merge(), Brush_MergeList(), Brush_Move(), Brush_MoveVertex(), Brush_Ray(), Brush_RebuildBrush(), Brush_SelectFaceForDragging(), Brush_SideSelect(), Brush_SplitBrushByFace(), BrushVolume(), BuildFaceTree_r(), Bullet_Fire(), ByteToDir(), CalcMuzzlePoint(), CalcMuzzlePointOrigin(), CEpairsWrapper::CalculateRotatedBounds(), CanDamage(), Cap(), CapSpecial(), CG_AddFragment(), CG_AddParticles(), CG_AddParticleToScene(), CG_AddPlayerWeapon(), CG_AddScorePlum(), CG_AddTestModel(), CG_AddViewWeapon(), CG_AdjustPositionForMover(), CG_Beam(), CG_BigExplode(), CG_Bleed(), CG_BloodPool(), CG_BubbleTrail(), CG_CalcMuzzlePoint(), CG_CalculateWeaponPosition(), CG_CalcViewValues(), CG_ClipMoveToEntities(), CG_CopyClientInfoModel(), CG_Draw3DModel(), CG_DrawActive(), CG_General(), CG_GibPlayer(), CG_Grapple(), CG_GrappleTrail(), CG_HasteTrail(), CG_ImpactMark(), CG_Item(), CG_LaunchExplode(), CG_LaunchGib(), CG_LightningBolt(), CG_MachineGunEjectBrass(), CG_MakeExplosion(), CG_Missile(), CG_MissileHitWall(), CG_Mover(), CG_OffsetFirstPersonView(), CG_OffsetThirdPersonView(), CG_Particle_Bleed(), CG_Particle_OilParticle(), CG_Particle_OilSlick(), CG_ParticleBloodCloud(), CG_ParticleBubble(), CG_ParticleBulletDebris(), CG_ParticleDust(), CG_ParticleExplosion(), CG_ParticleImpactSmokePuff(), CG_ParticleMisc(), CG_ParticleSmoke(), CG_ParticleSnow(), CG_ParticleSnowFlurry(), CG_ParticleSparks(), CG_PlasmaTrail(), CG_Player(), CG_PlayerAngles(), CG_PlayerFlag(), CG_PlayerFloatSprite(), CG_PlayerShadow(), CG_PlayerSplash(), CG_Portal(), CG_PositionEntityOnTag(), CG_PositionRotatedEntityOnTag(), CG_RailTrail(), CG_ReflectVelocity(), CG_ResetEntity(), CG_ResetPlayerEntity(), CG_ScanForCrosshairEntity(), CG_ScorePlum(), CG_ShotgunEjectBrass(), CG_SmokePuff(), CG_SpawnEffect(), CG_TeamBase(), CG_TrailItem(), ChopFaceByBrush(), ChopWindingInPlace(), CL_CreateCmd(), ClientSpawn(), ClientThink_real(), ClipSkyPolygon(), ClipWindingEpsilon(), CM_BoxBrushes(), CM_BoxLeafnums(), CM_DrawDebugSurface(), CM_GenerateFacetFor3Points(), CM_GenerateFacetFor4Points(), CM_GeneratePatchCollide(), CM_ModelBounds(), CM_PositionTestInPatchCollide(), CM_RemoveDegenerateColumns(), CM_SetBorderInward(), CM_SubdivideGridColumns(), CM_TempBoxModel(), CM_TestCapsuleInCapsule(), CM_Trace(), CM_TraceCapsuleThroughCapsule(), CM_TracePointThroughPatchCollide(), CM_TraceThroughPatchCollide(), CM_TraceThroughSphere(), CM_TraceThroughVerticalCylinder(), CM_TransformedPointContents(), CM_TransposeGrid(), Cmd_Give_f(), ColorToBytes(), ComputeAbsolute(), ComputeScale(), CopyToBodyQue(), CreateFlareSurface(), CreateNewFloatPlane(), CreateSurfaceLights(), CreateTerrainSurface(), DebugLine(), CPlugInManager::Dispatch(), DoRailDiscs(), Drag_Begin(), Drag_MouseMoved(), Drag_MouseUp(), Drag_Setup(), CXYWnd::DragDelta(), DrawLight(), DrawSurfaceForMesh(), DrawSurfaceForSide(), Drop_Item(), EA_Move(), EA_View(), EmitBrushes(), EmitDrawNode_r(), EmitFaceVertexes(), EmitFlareSurf(), EmitLeaf(), EmitModelSurf(), EmitPatchSurf(), EmitPlanarSurf(), EmitPlanes(), EmitTerrainVerts(), EmitTerrainVerts2(), Entity_Write(), Entity_WriteSelected(), FaceBSP(), FaceToBrushPrimitFace(), FillPatch(), FilterMiscModelSurfIntoTree(), FilterPatchSurfIntoTree(), FindIntermissionPoint(), FindPlaneSeperatingWindings(), FindPoint(), FindSkyBrushes(), FinishBrush(), fire_bfg(), fire_grapple(), fire_grenade(), fire_plasma(), fire_rocket(), FixFaceEdges(), FixSurfaceJunctions(), G_BounceItem(), G_BounceMissile(), G_Damage(), G_MissileImpact(), G_MoverPush(), G_RotatePoint(), G_RunItem(), G_RunMissile(), G_SetMovedir(), G_SetOrigin(), G_SpawnGEntityFromSpawnVars(), G_TempEntity(), G_TryPushingEntity(), G_TryPushingProxMine(), GenerateEndCaps(), GetCachedModel(), CEpairsWrapper::GetEntityOrigin(), HL_CreateBrushesFromBSP(), InitMover(), InsertPointOnEdge(), Item_Model_Paint(), LaunchItem(), LightingAtSample(), LoadPortals(), locateCamera(), Main_MenuDraw(), MakeBspBrushList(), MakeMeshNormals(), MakeNodePortal(), MakeTnode(), Map_LoadFile(), Map_New(), Map_RegionBrush(), Map_RegionTallBrush(), MergeWindings(), MoveClientToIntermission(), MoveSelection(), PaintedModel(), PassageChopWinding(), Patch_AddRow(), Patch_BendHandleTAB(), Patch_BrushToMesh(), Patch_CapTexture(), Patch_EditPatch(), Patch_InsertColumn(), Patch_InsertRow(), Patch_MeshNormals(), Patch_SetBendRotateOrigin(), Patch_Thicken(), Patch_UpdateSelected(), PatchMapDrawSurfs(), player_die(), PM_AirMove(), PM_CorrectAllSolid(), PM_FlyMove(), PM_Friction(), PM_GrappleMove(), PM_GroundTraceMissed(), PM_NoclipMove(), PM_SlideMove(), PM_StepSlideMove(), PM_WalkMove(), PM_WaterMove(), PmoveSingle(), Pointfile_Check(), Pointfile_Next(), Pointfile_Prev(), PointToPolygonFormFactor(), ProcessWorldBrushes(), CXYWnd::ProduceSplitLists(), CXYWnd::ProduceSplits(), ProjectDlightTexture(), Q1_CreateBrushesFromBSP(), Q2_ParseBrush(), QERApp_AddFaceData(), QERApp_GetFaceData(), QERApp_GetFaceInfo(), QERApp_SetFaceData(), QERApp_SetFaceInfo(), R_ChopPolyBehindPlane(), R_CreateSurfaceGridMesh(), R_CullLocalBox(), R_GetPortalOrientations(), R_GridInsertColumn(), R_GridInsertRow(), R_LightForPoint(), R_MarkFragments(), R_ModelBounds(), R_PlaneForSurface(), R_RotateForEntity(), R_RotateForViewer(), R_SetupEntityLighting(), R_SetupEntityLightingGrid(), RB_AddFlare(), RB_CalcDiffuseColor(), RB_DrawSun(), RB_ProjectionShadowDeform(), RB_ShadowTessEnd(), RB_SurfaceFace(), RB_SurfaceLightningBolt(), RB_SurfacePolychain(), RB_SurfaceRailCore(), RB_SurfaceRailRings(), RE_AddDynamicLightToScene(), RE_AddPolyToScene(), RE_RenderScene(), Reached_Train(), RemoveColinearPoints(), RemoveEqualPoints(), ReverseWinding(), RotateAroundDirection(), RotateFaceTexture(), RotatePoint(), RotateSelected(), S_AddLoopingSound(), S_AddRealLoopingSound(), S_Respatialize(), S_StartSound(), S_UpdateEntityPosition(), Select_ApplyMatrix(), Select_CompleteTall(), Select_FlipAxis(), Select_Inside(), Select_PartialTall(), Select_RotateAxis(), Select_ShiftTexture_BrushPrimit(), Select_Touching(), SelectCTFSpawnPoint(), SelectCurvePointByRay(), SelectFaceEdge(), SelectInitialSpawnPoint(), SelectRandomFurthestSpawnPoint(), SelectSpectatorSpawnPoint(), SelectVertex(), SetClientViewAngle(), SetEntityOrigins(), SetMoverState(), SetPortalSphere(), SetRotateOrigin(), SetVectorVariableValue(), CCamWnd::ShiftTexture_BrushPrimit(), ShotgunPellet(), SP_func_bobbing(), SP_func_button(), SP_func_door(), SP_func_pendulum(), SP_func_plat(), SP_func_rotating(), SP_func_static(), SP_misc_model(), SP_misc_portal_surface(), SP_target_push(), SP_target_speaker(), SpawnModelOnVictoryPad(), SpawnPlatTrigger(), SpectatorThink(), SplitNodePortals(), SubdivideAreaLight(), SubdivideFace(), SurfaceAsTriFan(), SV_BuildClientSnapshot(), SV_CreateworldSector(), SV_SetBrushModel(), SV_Trace(), target_laser_think(), Team_GetLocation(), TeleportPlayer(), Terrain_BrushToMesh(), Terrain_CalcVertPos(), Terrain_Duplicate(), Terrain_GetVert(), TestEdge(), TextureAxisFromPlane(), TH_AASFaceVertex(), TH_CreateFloatPlane(), TH_CreateVertex(), Think_SpawnNewDoorTrigger(), TraceGrid(), TraceLine(), TraceLine_r(), TraceLtm(), TryMergeWinding(), UI_DrawPlayer(), UI_PlayerAngles(), UI_PlayerFloatSprite(), UI_PlayerInfo_SetInfo(), UI_PositionEntityOnTag(), UI_PositionRotatedEntityOnTag(), CClipPoint::UpdatePointPtr(), Use_Shooter(), Use_target_push(), VectorRotate(), VectorVariableValue(), VertexLighting(), VisChopWinding(), VL_CalcVisibleLightmapPixelArea(), VL_ChopWinding(), VL_ChopWindingWithBrush(), VL_CreateFakeSurfaceLights(), VL_CreateSkyLights(), VL_FloodDirectedLight(), VL_FloodLight(), VL_GetFilter(), VL_LightSurfaceWithVolume(), VL_LoadPortals(), VL_R_FloodLight(), VL_R_LinkSurface(), VL_R_SubdivideAreaSpotLight(), VL_R_SubdivideDirectedAreaLight(), VL_R_SubdivideRadialAreaLight(), VL_R_WindingAreaOutsideSolid(), VL_SetPortalSphere(), VL_SplitLightVolume(), VL_SplitWinding(), VL_SubdivideAreaLight(), VL_SurfaceRadiosity(), VL_WindingForBrushSide(), VS_CalcVisibleLightmapPixelArea(), VS_ChopWinding(), VS_ChopWindingWithBrush(), VS_CreateFakeSurfaceLights(), VS_CreateSkyLights(), VS_FloodDirectedLight(), VS_FloodLight(), VS_GetFilter(), VS_LightSurfaceWithVolume(), VS_LoadPortals(), VS_R_FloodLight(), VS_R_LinkSurface(), VS_R_SubdivideAreaSpotLight(), VS_R_SubdivideDirectedAreaLight(), VS_R_SubdivideRadialAreaLight(), VS_R_WindingAreaOutsideSolid(), VS_SetPortalSphere(), VS_SplitLightVolume(), VS_SplitWinding(), VS_SubdivideAreaLight(), VS_SurfaceRadiosity(), VS_WindingForBrushSide(), Weapon_HookThink(), Weapon_LightningFire(), weapon_railgun_fire(), Winding_BaseForPlane(), Winding_Clip(), Winding_InsertPoint(), Winding_Reverse(), Winding_SplitEpsilon(), Winding_TryMerge(), Winding_VectorIntersect(), WindingCenter(), WindingFromDrawSurf(), CXYWnd::XY_MouseDown(), CXYWnd::XY_MouseMoved(), CXYWnd::XY_Overlay(), Z_Draw(), and Z_MouseDown().

#define VectorMA v,
s,
b,
 )     ((o)[0]=(v)[0]+(b)[0]*(s),(o)[1]=(v)[1]+(b)[1]*(s),(o)[2]=(v)[2]+(b)[2]*(s))
 

Definition at line 68 of file l_math.h.

Referenced by AAS_ClientMovementPrediction(), AAS_DrawArrow(), AAS_NearbySolidOrGap(), AAS_PositionFuncRotatingBrush(), AAS_ProjectPointOntoVector(), AAS_Reachability_Elevator(), AAS_Reachability_EqualFloorHeight(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Grapple(), AAS_Reachability_Jump(), AAS_Reachability_Ladder(), AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(), AAS_Reachability_Swim(), AAS_Reachability_WalkOffLedge(), AAS_ShowFace(), AAS_TraceClientBBox(), AAS_WeaponJumpZVelocity(), Autosprite2Deform(), BaseWindingForPlane(), BG_EvaluateTrajectory(), BotAddToTarget(), BotAIBlocked(), BotAimAtEnemy(), BotCheckAttack(), BotCheckBarrierJump(), BotCheckBlocked(), BotExportTest(), BotFinishTravel_WalkOffLedge(), BotFuncButtonActivateGoal(), BotGapDistance(), BotImport_DebugLineShow(), BotMoveToGoal(), BotOnTopOfEntity(), BotReachabilityArea(), BotTravel_Jump(), Brush_DrawFacingAngle(), Brush_SideSelect(), Bullet_Fire(), CalcMuzzlePoint(), CalcMuzzlePointOrigin(), CCamWnd::Cam_MouseControl(), CCamWnd::Cam_PositionDrag(), CG_AddParticleToScene(), CG_AddScorePlum(), CG_AddViewWeapon(), CG_BubbleTrail(), CG_CalcMuzzlePoint(), CG_CalcViewValues(), CG_DamageBlendBlob(), CG_DrawActive(), CG_GrappleTrail(), CG_LightningBolt(), CG_MissileHitWall(), CG_OffsetFirstPersonView(), CG_OffsetThirdPersonView(), CG_ParticleBloodCloud(), CG_ParticleDust(), CG_PositionEntityOnTag(), CG_PositionRotatedEntityOnTag(), CG_RailTrail(), CG_ReflectVelocity(), CG_ScanForCrosshairEntity(), CG_ShotgunPattern(), CG_TestModel_f(), CG_Tracer(), CG_TrailItem(), CheckGauntletAttack(), CM_EdgePlaneNum(), CM_ProjectPointOntoVector(), CM_TraceThroughSphere(), CM_TraceThroughVerticalCylinder(), CreateFlareSurface(), DebugLine(), DeformText(), DoRailCore(), DrawNormals(), G_BounceItem(), G_BounceMissile(), G_BounceProjectile(), G_CheckProxMinePosition(), LightingAtSample(), MakeNormalVectors(), MoverBottomCenter(), CMainFrame::OnCameraBack(), CMainFrame::OnCameraForward(), CMainFrame::OnCameraStrafeleft(), CMainFrame::OnCameraStraferight(), Patch_DrawCam(), Patch_Thicken(), PM_Accelerate(), PM_CheckWaterJump(), PM_NoclipMove(), PM_SlideMove(), PodiumPlacementThink(), ProjectPointOntoVector(), R_CullLocalBox(), R_GetPortalOrientations(), R_MarkFragments(), R_MirrorPoint(), R_MirrorVector(), R_SetupEntityLighting(), R_SetupEntityLightingGrid(), R_SetupFrustum(), RaySphereIntersections(), RB_ProjectionShadowDeform(), RB_ShadowTessEnd(), RB_SurfaceSprite(), SelectCurvePointByRay(), SelectEdgeByRay(), SelectVertexByRay(), ShotgunPattern(), SP_func_button(), SP_func_door(), SpawnModelOnVictoryPad(), SpawnPodium(), SphereCull(), SubdivideAreaLight(), SunToPlane(), SunToPoint(), target_laser_think(), Terrain_SelectPointByRay(), TestEdge(), TraceGrid(), TraceLtm(), UI_PositionEntityOnTag(), UI_PositionRotatedEntityOnTag(), Use_Shooter(), ValidBloodPool(), VL_CalcVisibleLightmapPixelArea(), VL_FloodDirectedLight(), VL_FloodLight(), VL_GetFilter(), VL_LightSurfaceWithVolume(), VL_SubdivideAreaLight(), VL_SurfaceRadiosity(), VS_CalcVisibleLightmapPixelArea(), VS_FloodDirectedLight(), VS_FloodLight(), VS_GetFilter(), VS_LightSurfaceWithVolume(), VS_SubdivideAreaLight(), VS_SurfaceRadiosity(), Weapon_LightningFire(), weapon_railgun_fire(), and Winding_BaseForPlane().

#define VectorNegate x,
y   )     {y[0]=-x[0];y[1]=-x[1];y[2]=-x[2];}
 

Definition at line 67 of file l_math.h.

Referenced by AAS_AreaGroundFace(), AAS_GetPlane(), BotAIBlocked(), BotAttackMove(), CG_ParticleDust(), CM_AddFacetBevels(), CM_DrawDebugSurface(), CM_PlaneEqual(), CM_PositionTestInPatchCollide(), CM_TraceThroughPatchCollide(), FindPlaneSeperatingWindings(), HL_FaceOnWinding(), HL_SplitBrushWithFace(), Q1_FaceOnWinding(), Q1_SplitBrushWithFace(), Q2_FaceOnWinding(), and Sin_FaceOnWinding().

#define VectorScale v,
s,
 )     ((o)[0]=(v)[0]*(s),(o)[1]=(v)[1]*(s),(o)[2]=(v)[2]*(s))
 

Definition at line 65 of file l_math.h.

Referenced by AAS_AlternativeRouteGoals(), AAS_CheckArea(), AAS_ClientMovementPrediction(), AAS_FaceCenter(), AAS_FlipAreaFaces(), AAS_GetJumpPadInfo(), AAS_JumpReachRunStart(), AAS_Reachability_Elevator(), AAS_Reachability_EqualFloorHeight(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Jump(), AAS_Reachability_JumpPad(), AAS_Reachability_Ladder(), AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(), AAS_Reachability_Teleport(), AAS_Reachability_WalkOffLedge(), AAS_Reachability_WeaponJump(), AAS_ShowReachability(), AAS_StoreArea(), AAS_TestMovementPrediction(), AAS_WeaponJumpZVelocity(), AbsoluteToLocal(), AimAtTarget(), AllocateLightmapForSurface(), AutospriteDeform(), BaseWindingForPlane(), BG_EvaluateTrajectoryDelta(), BotAimAtEnemy(), BotAirControl(), BotEntityVisible(), BotFuncBobStartEnd(), BotFuncButtonActivateGoal(), BotFuncDoorActivateGoal(), BotItemGoalInVisButNotVisible(), BotRoamGoal(), BotTriggerMultipleActivateGoal(), BotWalkInDirection(), Brush_DrawFacingAngle(), Brush_Scale(), CanDamage(), CapSpecial(), CG_BubbleTrail(), CG_ImpactMark(), CG_Item(), CG_MachineGunEjectBrass(), CG_MakeExplosion(), CG_MissileHitWall(), CG_PlasmaTrail(), CG_PredictPlayerState(), CG_RailTrail(), CG_ReflectVelocity(), CG_ShotgunEjectBrass(), CG_ShotgunFire(), CG_TeamBase(), CG_Tracer(), CM_TraceThroughSphere(), CM_TraceThroughVerticalCylinder(), ColinearEdge(), ColorNormalize(), ColorToBytes(), ComputeAbsolute(), ComputeScale(), CreateFlareSurface(), CreateSurfaceLights(), CSG_MakeHollow(), DeformText(), Drop_Item(), Eclass_hasModel(), FaceToBrushPrimitFace(), FinishBrush(), fire_bfg(), fire_grapple(), fire_grenade(), fire_plasma(), fire_rocket(), G_BounceItem(), G_BounceMissile(), G_Damage(), InitMover(), LightContributionToPoint(), LightWorld(), LoadShaderImage(), PaintedModel(), ParseMesh(), ParseShader(), ParseShaderFile(), Patch_DragScale(), Patch_Thicken(), PM_Accelerate(), PM_CheckWaterJump(), PM_DeadMove(), PM_GrappleMove(), PM_NoclipMove(), PM_SlideMove(), PM_WalkMove(), PM_WaterMove(), Q2_ParseBrush(), R_CreateSurfaceGridMesh(), R_GetPortalOrientations(), R_InitSkyTexCoords(), R_SetupEntityLighting(), R_SetupEntityLightingGrid(), R_SetupFrustum(), R_SubdividePatchToGrid(), RB_AddFlare(), RB_CalcDeformVertexes(), RB_CalcMoveVertexes(), RB_DrawSun(), RB_RenderFlare(), RB_SurfaceBeam(), RB_SurfaceRailRings(), RB_SurfaceSprite(), Select_ShiftTexture_BrushPrimit(), SetFaceTexdef(), SetMoverState(), SP_target_push(), SphereFromBounds(), SubdivideAreaLight(), TeleportPlayer(), Terrain_DragScale(), TH_FaceCenter(), TraceLtm(), VectorMiddle(), VertexLighting(), VL_CreateFakeSurfaceLights(), VL_FloodLight(), VL_LightmapMatrixFromPoints(), VL_LightWorld(), VL_SphereFromBounds(), VL_SubdivideAreaLight(), VS_CreateFakeSurfaceLights(), VS_FloodLight(), VS_LightmapMatrixFromPoints(), VS_LightWorld(), VS_SphereFromBounds(), VS_SubdivideAreaLight(), weapon_supershotgun_fire(), Winding_BaseForPlane(), and WindingCenter().

#define VectorSubtract a,
b,
 )     {c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];}
 

Definition at line 61 of file l_math.h.

Referenced by AAS_AirControl(), AAS_AlternativeRouteGoals(), AAS_AreaTravelTime(), AAS_ClientMovementPrediction(), AAS_ClipToBBox(), AAS_ClosestEdgePoints(), AAS_DrawArrow(), AAS_FaceArea(), AAS_FindFaceReachabilities(), AAS_GetJumpPadInfo(), AAS_HorizontalVelocityForJump(), AAS_InsideFace(), AAS_LinkEntityClientBBox(), AAS_NearbySolidOrGap(), AAS_NearestEntity(), AAS_NearestHideArea(), AAS_PointInsideFace(), AAS_ProjectPointOntoVector(), AAS_Reachability_Elevator(), AAS_Reachability_EqualFloorHeight(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Grapple(), AAS_Reachability_Jump(), AAS_Reachability_JumpPad(), AAS_Reachability_Ladder(), AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(), AAS_Reachability_WalkOffLedge(), AAS_Reachability_WeaponJump(), AAS_ShowReachability(), AAS_TraceClientBBox(), AAS_WeaponJumpZVelocity(), AbsoluteToLocal(), AddBrushBevels(), AddEdge(), AddSeperators(), AddWindingToConvexHull(), AdjustBrushesForOrigin(), AimAtTarget(), AINode_Battle_Chase(), AINode_Battle_NBG(), AINode_Battle_Retreat(), AINode_Seek_ActivateEntity(), AINode_Seek_LTG(), AINode_Seek_NBG(), AllocateLightmapForSurface(), AnglesToAxis(), Autosprite2Deform(), AutospriteDeform(), BaseWindingForNode(), BaseWindingForPlane(), BotAddToTarget(), BotAimAtEnemy(), BotAirControl(), BotAttackMove(), BotCheckAttack(), BotClearPath(), BotCTFSeekGoals(), BotEntityVisible(), BotFindEnemy(), BotFindEntityForLevelItem(), BotFinishTravel_Elevator(), BotFinishTravel_FuncBobbing(), BotFinishTravel_WalkOffLedge(), BotFinishTravel_WaterJump(), BotFinishTravel_WeaponJump(), BotFuncButtonActivateGoal(), BotFuzzyPointReachabilityArea(), BotGetLongTermGoal(), BotImport_DebugLineShow(), BotLongTermGoal(), BotMapScripts(), BotNearestVisibleItem(), BotRoamGoal(), BotSetEntityNumForGoal(), BotSetEntityNumForGoalWithModel(), BotTouchingGoal(), BotTravel_Elevator(), BotTravel_FuncBobbing(), BotTravel_Grapple(), BotTravel_Jump(), BotTravel_Ladder(), BotTravel_Swim(), BotTravel_Teleport(), BotTravel_WalkOffLedge(), BotTravel_WaterJump(), BotTriggerMultipleActivateGoal(), BotUpdateBattleInventory(), BotUpdateEntityItems(), BotVisibleTeamMatesAndEnemies(), Brush_Center(), Brush_MakeFaceWinding(), Brush_Ray(), CalcTerrainSize(), CalcTriNormal(), CapSpecial(), CG_AddFallScaleFade(), CG_AddMoveScaleFade(), CG_AddScaleFade(), CG_AddScorePlum(), CG_AdjustPositionForMover(), CG_BubbleTrail(), CG_DamageFeedback(), CG_ImpactMark(), CG_LightningBolt(), CG_OffsetThirdPersonView(), CG_Portal(), CG_PredictPlayerState(), CG_RailTrail(), CG_ShotgunFire(), CG_Tracer(), CheckAlmostCapture(), CheckAlmostScored(), CheckWinding(), ClipToSeperators(), CM_AddFacetBevels(), CM_DistanceFromLineSquared(), CM_DrawDebugSurface(), CM_GenerateBoundaryForPoints(), CM_NeedsSubdivision(), CM_PlaneFromPoints(), CM_PositionTestInPatchCollide(), CM_ProjectPointOntoVector(), CM_TestBoxInBrush(), CM_TestCapsuleInCapsule(), CM_TraceCapsuleThroughCapsule(), CM_TraceThroughBrush(), CM_TraceThroughPatchCollide(), CM_TraceThroughSphere(), CM_TraceThroughVerticalCylinder(), CM_TransformedBoxTrace(), CM_TransformedPointContents(), CM_ValidateFacet(), CM_VectorDistanceSquared(), ColinearEdge(), ComputeColors(), CreateEntityLights(), CreateFilters(), CreateNewFloatPlane(), CreateSurfaceLights(), CSG_MakeHollow(), DebugLine(), Distance(), DistanceFromLineSquared(), DistancePointToLine(), DistanceSquared(), Drag_MouseMoved(), CXYWnd::DragDelta(), DrawLight(), DrawPathLines(), Entity_Write(), Entity_WriteSelected(), FilterTrace(), FindIntermissionPoint(), FindPlaneSeperatingWindings(), FixFaceEdges(), FixSurfaceJunctions(), G_BounceProjectile(), G_MoverTeam(), G_RadiusDamage(), G_TouchTriggers(), G_TryPushingEntity(), G_TryPushingProxMine(), GenerateBoundaryForPoints(), HL_FaceOnWinding(), HL_SplitBrushWithFace(), CCamWnd::InitCull(), InitMover(), InsertPointOnEdge(), InsideFace(), InsideWinding(), IsTriangleDegenerate(), LightContributionToPoint(), LightingAtSample(), LoadPortals(), locateCamera(), LodErrorForVolume(), LookAtKiller(), MakeMeshNormals(), MakeNodePortal(), MapPlaneFromPoints(), MergeWindings(), MoveSelection(), CXYWnd::NewBrushDrag(), CXYWnd::PaintSizeInfo(), ParseMesh(), Patch_AddRow(), Patch_AdjustColumns(), Patch_AdjustRows(), Patch_ApplyMatrix(), Patch_DisperseColumns(), Patch_DisperseRows(), Patch_DragScale(), Patch_GetAxisFace(), Patch_Height(), Patch_HeightDistanceTo(), Patch_InsertColumn(), Patch_InsertRow(), Patch_MeshNormals(), Patch_Width(), Patch_WidthDistanceTo(), Pickup_Powerup(), Plane_FromPoints(), PlaneFromPoints(), PlaneFromWinding(), PM_Accelerate(), PM_GrappleMove(), PodiumPlacementThink(), Pointfile_Next(), Pointfile_Prev(), PointOnWinding(), PointToPolygonFormFactor(), ProjectDlightTexture(), ProjectPointOntoVector(), Q1_FaceArea(), Q1_FaceOnWinding(), Q1_FacePlane(), Q1_SplitBrushWithFace(), Q2_FaceOnWinding(), Q3_FaceOnWinding(), Q3_PlaneFromPoints(), Q3_SurfacePlane(), R_CreateSurfaceGridMesh(), R_GetPortalOrientations(), R_LoadFogs(), R_MarkFragments(), R_MirrorPoint(), R_MirrorViewBySurface(), R_RotateForEntity(), R_SetupEntityLighting(), R_SetupEntityLightingGrid(), R_SubdividePatchToGrid(), R_TransformDlights(), RayTriangleIntersect(), RB_AddFlare(), RB_AddQuadStampExt(), RB_CalcEnvironmentTexCoords(), RB_CalcFogTexCoords(), RB_CalcSpecularAlpha(), RB_ClipSkyPolygons(), RB_DrawSun(), RB_ShadowTessEnd(), RB_SurfaceLightningBolt(), RB_SurfaceRailCore(), RB_SurfaceRailRings(), RB_SurfaceSprite(), Reached_Train(), RecursiveLeafFlow(), RecursivePassagePortalFlow(), RemoveColinearPoints(), RemoveEqualPoints(), RemoveLinearMeshColumnsRows(), S_SpatializeOrigin(), Select_ApplyMatrix(), Select_Brush(), Select_RotateAxis(), SelectCurvePointByRay(), SelectEdgeByRay(), SelectNearestDeathmatchSpawnPoint(), SelectRandomFurthestSpawnPoint(), SelectVertexByRay(), SetFaceTexdef(), SetFarClip(), SetMoverState(), SetPortalSphere(), Sin_FaceOnWinding(), SP_func_button(), SP_func_door(), SpawnModelOnVictoryPad(), SpawnPodium(), SphereCull(), SphereFromBounds(), SubdivideMesh(), SubdivideMeshQuads(), SurfIsOffscreen(), SV_AddEntitiesVisibleFromPoint(), SV_CreateworldSector(), target_laser_think(), Team_FragBonuses(), Terrain_DragScale(), TestEdge(), TH_Colinear(), TH_CreateFloatPlane(), TH_CreateTrianglePlanes(), TH_PlaneFromPoints(), TH_TryTriangle(), TraceGrid(), TryMergeWinding(), UI_MovedirAdjustment(), Use_Shooter(), VectorBetweenVectors(), VectorDistance(), VectorDistanceSquared(), VectorRotate(), VL_CreateEntityLights(), VL_CreateFakeSurfaceLights(), VL_FindAdjacentSurface(), VL_FloodDirectedLight(), VL_GenerateBoundaryForPoints(), VL_GenerateFacetFor3Points(), VL_GenerateFacetFor4Points(), VL_LightmapMatrixFromPoints(), VL_LightSurfaceWithVolume(), VL_LoadPortals(), VL_PlaneForEdgeToWinding(), VL_PlaneFromPoints(), VL_PlaneFromWinding(), VL_R_FloodLight(), VL_SetPortalSphere(), VL_SmoothenLightmapEdges(), VL_SphereFromBounds(), VS_CreateEntitySpeakers(), VS_CreateFakeSurfaceLights(), VS_FindAdjacentSurface(), VS_FloodDirectedLight(), VS_GenerateBoundaryForPoints(), VS_GenerateFacetFor3Points(), VS_GenerateFacetFor4Points(), VS_LightmapMatrixFromPoints(), VS_LightSurfaceWithVolume(), VS_LoadPortals(), VS_PlaneForEdgeToWinding(), VS_PlaneFromPoints(), VS_PlaneFromWinding(), VS_R_FloodLight(), VS_SetPortalSphere(), VS_SmoothenLightmapEdges(), VS_SphereFromBounds(), Weapon_LightningFire(), Winding_Area(), Winding_BaseForPlane(), Winding_IsTiny(), Winding_Plane(), Winding_PointInside(), Winding_TryMerge(), WindingArea(), WindingError(), WindingIsTiny(), WindingPlane(), CXYWnd::XY_MouseDown(), and CXYWnd::XY_MouseMoved().

#define YAW   1
 

Definition at line 43 of file l_math.h.

Referenced by BotAimAtEnemy(), BotInputToUserCommand(), BotMapScripts(), CG_PlayerAngles(), CG_PlayerFlag(), CG_Viewpos_f(), CL_CreateCmd(), G_TryPushingEntity(), UI_PlayerAngles(), vectoyaw(), CXYWnd::XY_MouseDown(), and CXYWnd::XY_MouseMoved().


Typedef Documentation

typedef vec_t vec3_t[3]
 

Definition at line 34 of file l_math.h.

Referenced by _UI_SetActiveMenu(), AAS_AgainstLadder(), AAS_AirControl(), AAS_AlternativeRouteGoals(), AAS_AreaEntityCollision(), AAS_AreaGroundFace(), AAS_AreaTravelTime(), AAS_AreaVolume(), AAS_BestReachableArea(), AAS_BestReachableFromJumpPadArea(), AAS_BoxOnPlaneSide2(), AAS_BoxOriginDistanceFromPlane(), AAS_CalculateAreaTravelTimes(), AAS_CheckArea(), AAS_CheckFaceWindingPlane(), AAS_ClientMovementPrediction(), AAS_ClipToBBox(), AAS_ClosestEdgePoints(), AAS_CreateArea(), AAS_CreateCurveBrushes(), AAS_DrawArrow(), AAS_DrawCross(), AAS_DrawPermanentCross(), AAS_DrawPlaneCross(), AAS_DropToFloor(), AAS_FaceArea(), AAS_FindBestAreaSplitPlane(), AAS_FindFaceReachabilities(), AAS_FixMapBrush(), AAS_FlipAreaFaces(), AAS_GapFace(), AAS_GetJumpPadInfo(), AAS_GetVertex(), AAS_GroundFace(), AAS_HorizontalVelocityForJump(), AAS_InitReachabilityAreas(), AAS_InsideFace(), AAS_JumpReachRunStart(), AAS_LadderSubdivideArea_r(), AAS_LinkEntityClientBBox(), AAS_NearbySolidOrGap(), AAS_NearestEntity(), AAS_NearestHideArea(), AAS_OnGround(), AAS_PointInsideFace(), AAS_PositionFuncRotatingBrush(), AAS_PredictClientMovement(), AAS_PredictRoute(), AAS_PresenceTypeBoundingBox(), AAS_ProjectPointOntoVector(), AAS_RandomGoalArea(), AAS_Reachability_Elevator(), AAS_Reachability_EqualFloorHeight(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Grapple(), AAS_Reachability_Jump(), AAS_Reachability_JumpPad(), AAS_Reachability_Ladder(), AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(), AAS_Reachability_Swim(), AAS_Reachability_Teleport(), AAS_Reachability_WalkOffLedge(), AAS_Reachability_WeaponJump(), AAS_SetWeaponJumpAreaFlags(), AAS_ShowBoundingBox(), AAS_ShowFace(), AAS_ShowFacePolygon(), AAS_ShowReachability(), AAS_StoreArea(), AAS_SubdivideArea_r(), AAS_Swimming(), AAS_TestMovementPrediction(), AAS_TraceAreas(), AAS_TraceClientBBox(), AAS_TransformPlane(), AAS_UpdateEntity(), AAS_WeaponJumpZVelocity(), AbsoluteToLocal(), AddBrushBevels(), AddBrushForPatch(), AddBrushForTerrain(), AddEdge(), AddProp(), AddRegionBrushes(), AddSeperators(), AddSkyPolygon(), AddTriangleModels(), AddWindingToConvexHull(), AimAtTarget(), AINode_Battle_Chase(), AINode_Battle_Fight(), AINode_Battle_NBG(), AINode_Battle_Retreat(), AINode_Seek_ActivateEntity(), AINode_Seek_LTG(), AINode_Seek_NBG(), AllocateLightmapForSurface(), AnglesToAxis(), Autosprite2Deform(), AutospriteDeform(), AxializeVector(), BaseWindingForNode(), BaseWindingForPlane(), BeginModel(), BG_PlayerTouchesItem(), BG_TouchJumpPad(), BotAddToTarget(), BotAIBlocked(), BotAimAtEnemy(), BotAirControl(), BotAttackMove(), BotCheckAttack(), BotCheckBarrierJump(), BotCheckBlocked(), BotClearPath(), BotCreateWayPoint(), BotCTFSeekGoals(), BotEntityVisible(), BotExportTest(), BotFindEnemy(), BotFindEntityForLevelItem(), BotFinishTravel_BarrierJump(), BotFinishTravel_Elevator(), BotFinishTravel_FuncBobbing(), BotFinishTravel_Jump(), BotFinishTravel_JumpPad(), BotFinishTravel_Walk(), BotFinishTravel_WalkOffLedge(), BotFinishTravel_WaterJump(), BotFinishTravel_WeaponJump(), BotFuncBobStartEnd(), BotFuncButtonActivateGoal(), BotFuncDoorActivateGoal(), BotFuzzyPointReachabilityArea(), BotGapDistance(), BotGetActivateGoal(), BotGetAirGoal(), BotGetLongTermGoal(), BotGetMapLocationGoal(), BotGetNextCampSpotGoal(), BotGoalForBSPEntity(), BotImport_BSPModelMinsMaxsOrigin(), BotImport_DebugLineCreate(), BotImport_DebugLineShow(), BotImport_DebugPolygonCreate(), BotImport_DebugPolygonShow(), BotInitLevelItems(), BotInLavaOrSlime(), BotInputToUserCommand(), BotItemGoalInVisButNotVisible(), BotLongTermGoal(), BotMapScripts(), BotMatch_CheckPoint(), BotMoveInGoalArea(), BotMovementViewTarget(), BotMoveToGoal(), BotNearestVisibleItem(), BotOnMover(), BotOnTopOfEntity(), BotPointAreaNum(), BotPredictVisiblePosition(), BotRandomMove(), BotReachabilityArea(), BotRoamGoal(), BotSetEntityNumForGoal(), BotSetEntityNumForGoalWithModel(), BotSwimInDirection(), BotTouchingGoal(), BotTravel_BarrierJump(), BotTravel_BFGJump(), BotTravel_Crouch(), BotTravel_Elevator(), BotTravel_FuncBobbing(), BotTravel_Grapple(), BotTravel_Jump(), BotTravel_JumpPad(), BotTravel_Ladder(), BotTravel_RocketJump(), BotTravel_Swim(), BotTravel_Teleport(), BotTravel_Walk(), BotTravel_WalkOffLedge(), BotTravel_WaterJump(), BotTriggerMultipleActivateGoal(), BotUpdateBattleInventory(), BotUpdateEntityItems(), BotValidChatPosition(), BotVisibleTeamMatesAndEnemies(), BotWalkInDirection(), BoxOriginDistanceFromPlane(), Brush_Center(), Brush_Create(), Brush_CreatePyramid(), Brush_DrawFacingAngle(), Brush_DrawXY(), Brush_MakeSided(), Brush_MakeSidedCone(), Brush_MakeSidedSphere(), Brush_Move(), Brush_Ray(), Brush_RebuildBrush(), Brush_SideSelect(), Brush_SplitBrushByFace(), BrushFromBounds(), BrushVolume(), Bullet_Fire(), CalcTriNormal(), CEpairsWrapper::CalculateRotatedBounds(), CCamWnd::Cam_ChangeFloor(), CCamWnd::Cam_MouseDown(), CCamWnd::Cam_MouseMoved(), CanDamage(), Cap(), CapSpecial(), CG_AddFallScaleFade(), CG_AddFragment(), CG_AddMoveScaleFade(), CG_AddParticles(), CG_AddParticleToScene(), CG_AddPlayerWeapon(), CG_AddScaleFade(), CG_AddScorePlum(), CG_AddViewWeapon(), CG_AdjustPositionForMover(), CG_BigExplode(), CG_BloodPool(), CG_BloodTrail(), CG_BubbleTrail(), CG_Bullet(), CG_CalcMuzzlePoint(), CG_ClipMoveToEntities(), CG_DamageFeedback(), CG_DrawActive(), CG_DrawAttacker(), CG_DrawBlueFlagHead(), CG_DrawClientScore(), CG_DrawFlagModel(), CG_DrawHead(), CG_DrawPlayerAmmoIcon(), CG_DrawPlayerArmorIcon(), CG_DrawPlayerHead(), CG_DrawPlayerItem(), CG_DrawRedFlagHead(), CG_DrawSelectedPlayerHead(), CG_DrawStatusBar(), CG_DrawStatusBarHead(), CG_EntityEvent(), CG_GibPlayer(), CG_GrappleTrail(), CG_HarvesterSkulls(), CG_HasteTrail(), CG_ImpactMark(), CG_InterpolateEntityPosition(), CG_Item(), CG_LightningBolt(), CG_LightVerts(), CG_MachineGunEjectBrass(), CG_MakeExplosion(), CG_Missile(), CG_MissileHitWall(), CG_NewParticleArea(), CG_OffsetFirstPersonView(), CG_OffsetThirdPersonView(), CG_ParticleBloodCloud(), CG_ParticleDust(), CG_PlasmaTrail(), CG_Player(), CG_PlayerAngles(), CG_PlayerFlag(), CG_PlayerShadow(), CG_PlayerSplash(), CG_PositionRotatedEntityOnTag(), CG_PredictPlayerState(), CG_RailTrail(), CG_ReflectVelocity(), CG_RegisterGraphics(), CG_RegisterWeapon(), CG_RocketTrail(), CG_ScanForCrosshairEntity(), CG_ScorePlum(), CG_SetEntitySoundPosition(), CG_ShotgunEjectBrass(), CG_ShotgunFire(), CG_ShotgunPattern(), CG_TeamBase(), CG_TestModel_f(), CG_Tracer(), CG_TrailItem(), CheckAlmostCapture(), CheckAlmostScored(), CheckGauntletAttack(), CheckWinding(), ChopFaceByBrush(), ChopWindingInPlace(), CL_CreateCmd(), ClientEvents(), ClientSpawn(), ClientThink_real(), ClipSkyPolygon(), ClipToSeperators(), ClipWindingEpsilon(), CM_AddFacetBevels(), CM_DistanceFromLineSquared(), CM_DrawDebugSurface(), CM_EdgePlaneNum(), CM_GenerateBoundaryForPoints(), CM_NeedsSubdivision(), CM_PlaneFromPoints(), CM_PositionTestInPatchCollide(), CM_ProjectPointOntoVector(), CM_SubdivideGridColumns(), CM_TestBoundingBoxInCapsule(), CM_TestBoxInBrush(), CM_TestCapsuleInCapsule(), CM_Trace(), CM_TraceBoundingBoxThroughCapsule(), CM_TraceCapsuleThroughCapsule(), CM_TraceThroughBrush(), CM_TraceThroughPatchCollide(), CM_TraceThroughSphere(), CM_TraceThroughTree(), CM_TraceThroughVerticalCylinder(), CM_TransformedBoxTrace(), CM_TransformedPointContents(), CM_TransposeGrid(), CM_ValidateFacet(), CM_VectorDistanceSquared(), Cmd_SetViewpos_f(), CMod_LoadPatches(), ColinearEdge(), ColorToBytes(), CPlugInManager::CommitEntityHandleToMap(), ComputeAbsolute(), ComputeColors(), ComputeScale(), CreateEntityBrush(), CreateEntityFromName(), CreateEntityLights(), CreateFilters(), CreateSmartBrush(), CreateSurfaceLights(), CSG_MakeHollow(), CCamWnd::CullBrush(), DebugLine(), DeformText(), CPlugInManager::Dispatch(), Distance(), DistanceFromLineSquared(), DistancePointToLine(), DistanceSquared(), DoRailDiscs(), Drag_Begin(), Drag_MouseMoved(), Drag_Setup(), CXYWnd::DragDelta(), DrawLight(), DrawNormals(), DrawPatchMesh(), DrawPathLines(), DrawSurfaceForSide(), Drop_Item(), CXYWnd::DropClipPoint(), Eclass_hasModel(), EmitBrushes(), EmitBrushPrimitTextureCoordinates(), EmitTerrainVerts(), EmitTerrainVerts2(), Entity_Create(), Entity_Parse(), Entity_Write(), Entity_WriteSelected(), Face_FitTexture(), Face_MakePlane(), Face_MoveTexture(), Face_MoveTexture_BrushPrimit(), Face_TextureVectors(), FaceToBrushPrimitFace(), FacingVectors(), FilterTrace(), FindIntermissionPoint(), FindPlaneSeperatingWindings(), FinishBrush(), FinishSpawningItem(), FixFaceEdges(), FixSurfaceJunctions(), FloodEntities(), FogDrawSurfs(), G_BounceItem(), G_BounceMissile(), G_BounceProjectile(), G_CheckProxMinePosition(), G_Damage(), G_ExplodeMissile(), G_KillBox(), G_MissileImpact(), G_MoverPush(), G_MoverTeam(), G_ParseField(), G_RadiusDamage(), G_RotatePoint(), G_RunItem(), G_RunMissile(), G_SetMovedir(), G_TempEntity(), G_TouchTriggers(), G_TryPushingEntity(), G_TryPushingProxMine(), GenerateBoundaryForPoints(), GenerateEndCaps(), CXYWnd::GetOrigin(), GetVertexnum(), HasModel(), HL_CreateBrushesFromBSP(), HL_FaceOnWinding(), HL_SplitBrushWithFace(), InitMover(), InsertMD3Model(), InsertPointOnEdge(), InsideFace(), InsideWinding(), IsTriangleDegenerate(), Item_Model_Paint(), LeakFile(), LerpMeshVertexes(), LightContributionToPoint(), LightingAtSample(), locateCamera(), LodErrorForVolume(), LookAtKiller(), Main_MenuDraw(), MakeBrushFromTriangle(), MakeBspBrushList(), MakeHeadnodePortals(), MakeMeshNormals(), MakeNodePortal(), MakeSkyVec(), MapPlaneFromPoints(), MergeWindings(), MoveHold(), MoverBottomCenter(), MoverDown(), MoveSelected(), MoveSelection(), CXYWnd::NewBrushDrag(), CMainFrame::Nudge(), CMainFrame::NudgeSelection(), CMainFrame::OnCreate(), CDlgCamera::OnHScroll(), CMainFrame::OnSelectionMovedown(), CMainFrame::OnSelectionMoveup(), CMainFrame::OnSplineTest(), P_DamageFeedback(), PaintedModel(), CXYWnd::PaintSizeInfo(), ParseMesh(), ParseRawBrush(), ParseStage(), PassageChopWinding(), Patch_AddRow(), Patch_AdjustColumns(), Patch_AdjustRows(), Patch_AdjustSelected(), Patch_ApplyMatrix(), Patch_CapTexture(), Patch_DisperseColumns(), Patch_DisperseRows(), Patch_DragScale(), Patch_DrawCam(), Patch_GetAxisFace(), Patch_Height(), Patch_HeightDistanceTo(), Patch_InsertColumn(), Patch_InsertRow(), Patch_MeshNormals(), Patch_Move(), Patch_Rebuild(), Patch_RotateTexture(), Patch_Scale(), Patch_Thicken(), Patch_UpdateSelected(), Patch_Width(), Patch_WidthDistanceTo(), PatchMapDrawSurfs(), PerpendicularVector(), Pickup_Powerup(), Plane_Equal(), Plane_FromPoints(), PlaneFromPoints(), PlaneFromWinding(), PlayerModel_UpdateModel(), PlayerSettings_DrawPlayer(), PlayerSettings_SetMenuItems(), PM_Accelerate(), PM_AirMove(), PM_CheckWaterJump(), PM_CorrectAllSolid(), PM_FlyMove(), PM_Friction(), PM_GrappleMove(), PM_GroundTrace(), PM_GroundTraceMissed(), PM_NoclipMove(), PM_SetWaterLevel(), PM_SlideMove(), PM_StepSlideMove(), PM_WalkMove(), PM_WaterMove(), PodiumPlacementThink(), Pointfile_Check(), Pointfile_Next(), Pointfile_Prev(), PointOnWinding(), PointToPolygonFormFactor(), ProcessWorldBrushes(), ProjectDlightTexture(), ProjectPointOnPlane(), ProjectPointOntoVector(), ProjectRadius(), Q1_CreateBrushesFromBSP(), Q1_FaceArea(), Q1_FaceOnWinding(), Q1_FacePlane(), Q1_SplitBrushWithFace(), Q2_FaceOnWinding(), Q2_ParseBrush(), Q3_FaceOnWinding(), Q3_LoadMapFromBSP(), Q3_PlaneFromPoints(), Q3_SurfacePlane(), QERApp_GetPoints(), QuakeTextureVecs(), R_AddMarkFragments(), R_ChopPolyBehindPlane(), R_ComputeFogNum(), R_CreateSurfaceGridMesh(), R_CullLocalBox(), R_CullLocalPointAndRadius(), R_CullModel(), R_GetPortalOrientations(), R_GridInsertColumn(), R_GridInsertRow(), R_InitSkyTexCoords(), R_LoadLightGrid(), R_MarkFragments(), R_MirrorPoint(), R_RotateForEntity(), R_RotateForViewer(), R_SetupEntityLighting(), R_SetupEntityLightingGrid(), R_SubdividePatchToGrid(), R_TransformDlights(), RadiusFromBounds(), RayTriangleIntersect(), RB_AddFlare(), RB_AddQuadStampExt(), RB_CalcDeformVertexes(), RB_CalcDiffuseColor(), RB_CalcEnvironmentTexCoords(), RB_CalcFogTexCoords(), RB_CalcMoveVertexes(), RB_CalcSpecularAlpha(), RB_ClipSkyPolygons(), RB_DrawSun(), RB_ProjectionShadowDeform(), RB_RenderFlare(), RB_ShadowTessEnd(), RB_SurfaceAnim(), RB_SurfaceBeam(), RB_SurfaceFlare(), RB_SurfaceLightningBolt(), RB_SurfaceRailCore(), RB_SurfaceRailRings(), RB_SurfaceSprite(), RE_AddPolyToScene(), Reached_Train(), RemoveColinearPoints(), RemoveEqualPoints(), RemoveLinearMeshColumnsRows(), RotateAroundDirection(), RotateFaceTexture(), RotateFaceTexture_BrushPrimit(), RotateHold(), CXYWnd::RotateOrigin(), RotatePoint(), RotatePointAroundVector(), RotateSelected(), CXYWnd::Rotation(), S_AddLoopingSound(), S_Respatialize(), S_SpatializeOrigin(), Select_ApplyMatrix(), Select_Brush(), Select_Clone(), Select_CompleteTall(), Select_GetMid(), Select_GetTrueMid(), Select_Inside(), Select_Move(), Select_PartialTall(), Select_RotateAxis(), Select_Scale(), Select_ShiftTexture_BrushPrimit(), Select_SnapToGrid(), Select_Touching(), SelectCurvePointByRay(), SelectEdgeByRay(), SelectNearestDeathmatchSpawnPoint(), SelectRandomFurthestSpawnPoint(), SelectSplitPlaneNum(), SelectVertexByRay(), SetEntityOrigins(), SetFaceTexdef(), SetFarClip(), SetMoverState(), SetPortalSphere(), SetRotateOrigin(), SetTerrainTextures(), SetupGrid(), CCamWnd::ShiftTexture_BrushPrimit(), ShotgunPattern(), ShotgunPellet(), Sin_FaceOnWinding(), SP_func_button(), SP_func_door(), SpawnModelOnVictoryPad(), SpawnPlatTrigger(), SpawnPodium(), SphereCull(), SphereFromBounds(), SpotWouldTelefrag(), SubdivideAreaLight(), SubdivideDrawSurf(), SubdivideFace(), SubdivideMesh(), SubdivideMeshQuads(), SunToPlane(), SunToPoint(), SurfIsOffscreen(), SV_AddEntitiesVisibleFromPoint(), SV_BuildClientSnapshot(), SV_ClearWorld(), SV_CreateworldSector(), SV_SetBrushModel(), target_laser_think(), Team_FragBonuses(), Team_GetLocation(), Terrain_CalcNormals(), Terrain_DragScale(), Terrain_Move(), Terrain_Scale(), Terrain_SelectAreaPoints(), Terrain_SelectPointByRay(), Terrain_UpdateSelected(), TestEdge(), TexinfoForBrushTexture(), TH_Colinear(), TH_CreateAASFaceTriangles(), TH_CreateTrianglePlanes(), TH_FindVertex(), TH_IntersectTrianglePlanes(), TH_PlaneFromPoints(), TH_TryTriangle(), Think_SpawnNewDoorTrigger(), Touch_DoorTriggerSpectator(), TraceAgainstFacet(), TraceGrid(), TraceLine_r(), TraceLtm(), TrackMD3Angles(), TryMergeWinding(), tv(), UI_DrawOpponent(), UI_DrawPlayer(), UI_DrawPlayerModel(), UI_MovedirAdjustment(), UI_PlayerAngles(), UI_PositionRotatedEntityOnTag(), Use_Shooter(), ValidBloodPool(), VectorBetweenVectors(), VectorDistance(), VectorDistanceSquared(), VectorRotate(), VertexLighting(), VisChopWinding(), VL_ChopWinding(), VL_ChopWindingWithBrush(), VL_CreateEntityLights(), VL_CreateFakeSurfaceLights(), VL_CreateSkyLights(), VL_FindAdjacentSurface(), VL_FloodDirectedLight(), VL_FloodLight(), VL_GenerateBoundaryForPoints(), VL_GenerateFacetFor3Points(), VL_GenerateFacetFor4Points(), VL_GetFilter(), VL_LightmapMatrixFromPoints(), VL_LightSurfaceWithVolume(), VL_LinkSurfaces(), VL_PlaneForEdgeToWinding(), VL_PlaneFromPoints(), VL_PlaneFromWinding(), VL_R_FloodLight(), VL_SetPortalSphere(), VL_SmoothenLightmapEdges(), VL_SphereFromBounds(), VL_SplitLightVolume(), VL_SplitWinding(), VL_SubdivideAreaLight(), VL_SurfaceRadiosity(), VL_WindingAreaOutsideBrushes(), VL_WindingForBrushSide(), VS_ChopWinding(), VS_ChopWindingWithBrush(), VS_CreateEntitySpeakers(), VS_CreateFakeSurfaceLights(), VS_CreateSkyLights(), VS_FindAdjacentSurface(), VS_FloodDirectedLight(), VS_FloodLight(), VS_GenerateBoundaryForPoints(), VS_GenerateFacetFor3Points(), VS_GenerateFacetFor4Points(), VS_GetFilter(), VS_LightmapMatrixFromPoints(), VS_LightSurfaceWithVolume(), VS_LinkSurfaces(), VS_PlaneForEdgeToWinding(), VS_PlaneFromPoints(), VS_PlaneFromWinding(), VS_R_FloodLight(), VS_SetPortalSphere(), VS_SmoothenLightmapEdges(), VS_SphereFromBounds(), VS_SplitLightVolume(), VS_SplitWinding(), VS_SubdivideAreaLight(), VS_SurfaceRadiosity(), VS_WindingAreaOutsideBrushes(), VS_WindingForBrushSide(), Weapon_HookThink(), Weapon_LightningFire(), weapon_railgun_fire(), Winding_Area(), Winding_BaseForPlane(), Winding_Clip(), Winding_IsTiny(), Winding_Plane(), Winding_PointInside(), Winding_SplitEpsilon(), Winding_TryMerge(), Winding_VectorIntersect(), WindingArea(), WindingError(), WindingIsTiny(), WindingPlane(), WriteMapBrush(), WriteOriginBrush(), WritePortalFile_r(), CXYWnd::XY_Draw(), CXYWnd::XY_MouseDown(), CXYWnd::XY_MouseMoved(), CXYWnd::XY_Overlay(), Z_Draw(), and Z_MouseDown().

typedef vec_t vec4_t[4]
 

Definition at line 35 of file l_math.h.

typedef float vec_t
 

Definition at line 32 of file l_math.h.

Referenced by __VectorNormalize(), _DotProduct(), AAS_AreaVolume(), AAS_BoxOriginDistanceFromPlane(), AAS_FaceArea(), AAS_PlaneTypeForNormal(), AAS_PointAreaNum(), AAS_PointInsideFace(), AAS_Reachability_Elevator(), AAS_Reachability_Grapple(), AAS_Reachability_Jump(), AAS_Reachability_WalkOffLedge(), AddPointToBounds(), AddSeperators(), AdjustBrushesForOrigin(), BaseWindingForNode(), BaseWindingForPlane(), BoxOriginDistanceFromPlane(), Brush_BuildWindings(), BrushBSP(), BrushFromBounds(), BrushMostlyOnSide(), BrushVolume(), CapSpecial(), CapsuleOriginDistanceFromPlane(), CheckWinding(), ChopFaceByBrush(), ChopWindingInPlace(), ClipToSeperators(), ClipWindingEpsilon(), ColorNormalize(), ComputeAxisBase(), Distance(), DistanceSquared(), Draw_ClearWindow(), DrawPathLines(), DrawSurfaceForSide(), EmitBrushes(), EmitBrushPrimitTextureCoordinates(), EmitTerrainVerts(), EmitTerrainVerts2(), ExtendBounds(), Face_MoveTexture_BrushPrimit(), FaceToBrushPrimitFace(), FixFaceEdges(), FloatForKey(), HL_FaceOnWinding(), HL_SplitBrush(), HL_SplitBrushWithFace(), HL_TextureBrushes(), InsideFace(), InsideWinding(), MapPlaneFromPoints(), NodeForPoint(), OutputWinding(), ParsePatch(), ParseRawBrush(), PassageChopWinding(), PlaceOccupant(), PlaneFromPoints(), PlaneTypeForNormal(), PointInLeaf(), PointInLeafnum(), ProjectDlightTexture(), Q1_FaceArea(), Q1_FaceOnWinding(), Q1_FacePlane(), Q1_PointInLeaf(), Q1_SplitBrush(), Q1_SplitBrushWithFace(), Q1_TextureBrushes(), Q2_FaceOnWinding(), Q2_ParseMapEntity(), Q3_FaceOnWinding(), Q_rint(), QuakeTextureVecs(), RotateFaceTexture_BrushPrimit(), S_SpatializeOrigin(), SarrusDet(), Select_RotateAxis(), Sin_CreateMapTexinfo(), Sin_FaceOnWinding(), SplitBrush(), SubdivideFace(), Terrain_ParseFace(), TestBrushToPlanenum(), TestEdge(), TestExpandBrushes(), TexinfoForBrushTexture(), TextureAxisFromPlane(), TH_PlaneFromPoints(), TH_PlaneTypeForNormal(), TryMergeWinding(), VectorLength(), VectorLengthSquared(), VectorNormalize(), VectorNormalize2(), VisChopWinding(), VL_ChopWinding(), VL_PointInLeafnum_r(), VL_SplitLightVolume(), VL_SplitWinding(), VS_ChopWinding(), VS_PointInLeafnum_r(), VS_SplitLightVolume(), VS_SplitWinding(), Winding_BaseForPlane(), Winding_Bounds(), Winding_Clip(), Winding_IsTiny(), Winding_SplitEpsilon(), Winding_TryMerge(), WindingArea(), WindingBounds(), WindingError(), WindingIsTiny(), WindingOnPlaneSide(), and WritePortalFile_r().


Function Documentation

vec_t _DotProduct vec3_t  v1,
vec3_t  v2
 

Definition at line 170 of file l_math.c.

00171 {
00172     return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
00173 }

void _VectorAdd vec3_t  va,
vec3_t  vb,
vec3_t  out
 

Definition at line 182 of file l_math.c.

00183 {
00184     out[0] = va[0]+vb[0];
00185     out[1] = va[1]+vb[1];
00186     out[2] = va[2]+vb[2];
00187 }

void _VectorCopy vec3_t  in,
vec3_t  out
 

Definition at line 189 of file l_math.c.

00190 {
00191     out[0] = in[0];
00192     out[1] = in[1];
00193     out[2] = in[2];
00194 }

void _VectorMA vec3_t  va,
double  scale,
vec3_t  vb,
vec3_t  vc
 

Definition at line 163 of file l_math.c.

References va().

00164 {
00165     vc[0] = va[0] + scale*vb[0];
00166     vc[1] = va[1] + scale*vb[1];
00167     vc[2] = va[2] + scale*vb[2];
00168 }

Here is the call graph for this function:

void _VectorScale vec3_t  v,
vec_t  scale,
vec3_t  out
 

Definition at line 196 of file l_math.c.

00197 {
00198     out[0] = v[0] * scale;
00199     out[1] = v[1] * scale;
00200     out[2] = v[2] * scale;
00201 }

void _VectorSubtract vec3_t  va,
vec3_t  vb,
vec3_t  out
 

Definition at line 175 of file l_math.c.

00176 {
00177     out[0] = va[0]-vb[0];
00178     out[1] = va[1]-vb[1];
00179     out[2] = va[2]-vb[2];
00180 }

void AddPointToBounds const vec3_t  v,
vec3_t  mins,
vec3_t  maxs
 

Definition at line 276 of file l_math.c.

00277 {
00278     int     i;
00279     vec_t   val;
00280 
00281     for (i=0 ; i<3 ; i++)
00282     {
00283         val = v[i];
00284         if (val < mins[i])
00285             mins[i] = val;
00286         if (val > maxs[i])
00287             maxs[i] = val;
00288     }
00289 }

void AngleVectors const vec3_t  angles,
vec3_t  forward,
vec3_t  right,
vec3_t  up
 

Definition at line 29 of file l_math.c.

00030 {
00031     float       angle;
00032     static float        sr, sp, sy, cr, cp, cy;
00033     // static to help MS compiler fp bugs
00034 
00035     angle = angles[YAW] * (M_PI*2 / 360);
00036     sy = sin(angle);
00037     cy = cos(angle);
00038     angle = angles[PITCH] * (M_PI*2 / 360);
00039     sp = sin(angle);
00040     cp = cos(angle);
00041     angle = angles[ROLL] * (M_PI*2 / 360);
00042     sr = sin(angle);
00043     cr = cos(angle);
00044 
00045     if (forward)
00046     {
00047         forward[0] = cp*cy;
00048         forward[1] = cp*sy;
00049         forward[2] = -sp;
00050     }
00051     if (right)
00052     {
00053         right[0] = (-1*sr*sp*cy+-1*cr*-sy);
00054         right[1] = (-1*sr*sp*sy+-1*cr*cy);
00055         right[2] = -1*sr*cp;
00056     }
00057     if (up)
00058     {
00059         up[0] = (cr*sp*cy+-sr*-sy);
00060         up[1] = (cr*sp*sy+-sr*cy);
00061         up[2] = cr*cp;
00062     }
00063 }

void ClearBounds vec3_t  mins,
vec3_t  maxs
 

Definition at line 270 of file l_math.c.

00271 {
00272     mins[0] = mins[1] = mins[2] = 99999;
00273     maxs[0] = maxs[1] = maxs[2] = -99999;
00274 }

vec_t ColorNormalize vec3_t  in,
vec3_t  out
 

Definition at line 241 of file l_math.c.

00242 {
00243     float   max, scale;
00244 
00245     max = in[0];
00246     if (in[1] > max)
00247         max = in[1];
00248     if (in[2] > max)
00249         max = in[2];
00250 
00251     if (max == 0)
00252         return 0;
00253 
00254     scale = 1.0 / max;
00255 
00256     VectorScale (in, scale, out);
00257 
00258     return max;
00259 }

void CreateRotationMatrix vec3_t  angles,
float  matrix[3][3]
 

void CrossProduct const vec3_t  v1,
const vec3_t  v2,
vec3_t  cross
 

Definition at line 156 of file l_math.c.

00157 {
00158     cross[0] = v1[1]*v2[2] - v1[2]*v2[1];
00159     cross[1] = v1[2]*v2[0] - v1[0]*v2[2];
00160     cross[2] = v1[0]*v2[1] - v1[1]*v2[0];
00161 }

vec_t Q_rint vec_t  in  ) 
 

Definition at line 151 of file l_math.c.

00152 {
00153     return floor(in + 0.5);
00154 }

void R_ConcatRotations float  in1[3][3],
float  in2[3][3],
float  out[3][3]
 

Definition at line 89 of file l_math.c.

00090 {
00091     out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] +
00092                 in1[0][2] * in2[2][0];
00093     out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] +
00094                 in1[0][2] * in2[2][1];
00095     out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] +
00096                 in1[0][2] * in2[2][2];
00097     out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] +
00098                 in1[1][2] * in2[2][0];
00099     out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] +
00100                 in1[1][2] * in2[2][1];
00101     out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] +
00102                 in1[1][2] * in2[2][2];
00103     out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] +
00104                 in1[2][2] * in2[2][0];
00105     out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] +
00106                 in1[2][2] * in2[2][1];
00107     out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] +
00108                 in1[2][2] * in2[2][2];
00109 }

void RotatePoint vec3_t  point,
float  matrix[3][3]
 

qboolean VectorCompare vec3_t  v1,
vec3_t  v2
 

Definition at line 140 of file l_math.c.

00141 {
00142     int     i;
00143     
00144     for (i=0 ; i<3 ; i++)
00145         if (fabs(v1[i]-v2[i]) > EQUAL_EPSILON)
00146             return false;
00147             
00148     return true;
00149 }

void VectorInverse vec3_t  v  ) 
 

Definition at line 263 of file l_math.c.

00264 {
00265     v[0] = -v[0];
00266     v[1] = -v[1];
00267     v[2] = -v[2];
00268 }

double VectorLength vec3_t  v  ) 
 

Definition at line 127 of file l_math.c.

00128 {
00129     int     i;
00130     double  length;
00131     
00132     length = 0;
00133     for (i=0 ; i< 3 ; i++)
00134         length += v[i]*v[i];
00135     length = sqrt (length);     // FIXME
00136 
00137     return length;
00138 }

vec_t VectorNormalize vec3_t  inout  ) 
 

Definition at line 203 of file l_math.c.

00204 {
00205     vec_t   length, ilength;
00206 
00207     length = sqrt (inout[0]*inout[0] + inout[1]*inout[1] + inout[2]*inout[2]);
00208     if (length == 0)
00209     {
00210         VectorClear (inout);
00211         return 0;
00212     }
00213 
00214     ilength = 1.0/length;
00215     inout[0] = inout[0]*ilength;
00216     inout[1] = inout[1]*ilength;
00217     inout[2] = inout[2]*ilength;
00218 
00219     return length;
00220 }

vec_t VectorNormalize2 const vec3_t  v,
vec3_t  out
 

Definition at line 222 of file l_math.c.

00223 {
00224     vec_t   length, ilength;
00225 
00226     length = sqrt (in[0]*in[0] + in[1]*in[1] + in[2]*in[2]);
00227     if (length == 0)
00228     {
00229         VectorClear (out);
00230         return 0;
00231     }
00232 
00233     ilength = 1.0/length;
00234     out[0] = in[0]*ilength;
00235     out[1] = in[1]*ilength;
00236     out[2] = in[2]*ilength;
00237 
00238     return length;
00239 }


Variable Documentation

vec3_t vec3_origin
 

Definition at line 27 of file l_math.c.


Generated on Thu Aug 25 12:54:20 2005 for Quake III Arena by  doxygen 1.3.9.1