UFO: Alien Invasion
|
#include <cmath>
Go to the source code of this file.
Macros | |
#define | EQUAL(a, b) (fabsf((a)-(b))<0.0000000001f) |
#define | Vector2FromInt(x, y) { static_cast<float>(x), static_cast<float>(y) } |
#define | Vector3FromInt(x, y, z) { static_cast<float>(x), static_cast<float>(y), static_cast<float>(z) } |
#define | DotProduct(x, y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2]) |
Returns the distance between two 3-dimensional vectors. More... | |
#define | VectorSubtract(a, b, dest) ((dest)[0]=(a)[0]-(b)[0],(dest)[1]=(a)[1]-(b)[1],(dest)[2]=(a)[2]-(b)[2]) |
#define | Vector2Subtract(a, b, dest) ((dest)[0]=(a)[0]-(b)[0],(dest)[1]=(a)[1]-(b)[1]) |
#define | VectorAdd(a, b, dest) ((dest)[0]=(a)[0]+(b)[0],(dest)[1]=(a)[1]+(b)[1],(dest)[2]=(a)[2]+(b)[2]) |
#define | VectorMul(scalar, b, dest) ((dest)[0]=(scalar)*(b)[0],(dest)[1]=(scalar)*(b)[1],(dest)[2]=(scalar)*(b)[2]) |
#define | Vector2Mul(scalar, b, dest) ((c)[0]=(scalar)*(b)[0],(dest)[1]=(scalar)*(b)[1]) |
#define | VectorDiv(in, scalar, out) VectorScale((in),(1.0f/(scalar)),(out)) |
#define | VectorCopy(src, dest) ((dest)[0]=(src)[0],(dest)[1]=(src)[1],(dest)[2]=(src)[2]) |
#define | Vector2Copy(src, dest) ((dest)[0]=(src)[0],(dest)[1]=(src)[1]) |
#define | Vector4Copy(src, dest) ((dest)[0]=(src)[0],(dest)[1]=(src)[1],(dest)[2]=(src)[2],(dest)[3]=(src)[3]) |
#define | Vector2Clear(a) ((a)[0]=(a)[1]=0) |
#define | VectorClear(a) ((a)[0]=(a)[1]=(a)[2]=0) |
#define | VectorInside(vec, mins, maxs) (vec[0] >= mins[0] && vec[0] <= maxs[0] && vec[1] >= mins[1] && vec[1] <= maxs[1] && vec[2] >= mins[2] && vec[2] <= maxs[2]) |
#define | Vector4Clear(a) ((a)[0]=(a)[1]=(a)[2]=(a)[3]=0) |
#define | VectorNegate(src, dest) ((dest)[0]=-(src)[0],(dest)[1]=-(src)[1],(dest)[2]=-(src)[2]) |
#define | VectorSet(v, x, y, z) ((v)[0]=(x), (v)[1]=(y), (v)[2]=(z)) |
#define | VectorSum(a) ((a)[0]+(a)[1]+(a)[2]) |
#define | Vector2Set(v, x, y) ((v)[0]=(x), (v)[1]=(y)) |
#define | Vector4Set(v, r, g, b, a) ((v)[0]=(r), (v)[1]=(g), (v)[2]=(b), (v)[3]=(a)) |
#define | VectorCompare(a, b) ((a)[0]==(b)[0]?(a)[1]==(b)[1]?(a)[2]==(b)[2]?true:false:false:false) |
#define | VectorEqualEpsilon(a, b, epsilon) (EQUAL2((a)[0],(b)[0],epsilon)?EQUAL2((a)[1],(b)[1],epsilon)?EQUAL2((a)[2],(b)[2],epsilon)?true:false:false:false) |
#define | VectorEqual(a, b) (EQUAL((a)[0],(b)[0])?EQUAL((a)[1],(b)[1])?EQUAL((a)[2],(b)[2])?true:false:false:false) |
#define | Vector2Compare(a, b) ((a)[0]==(b)[0]?(a)[1]==(b)[1]?true:false:false) |
#define | Vector2Equal(a, b) (EQUAL((a)[0],(b)[0])?EQUAL((a)[1],(b)[1])?true:false:false) |
#define | VectorDistSqr(a, b) (((b)[0]-(a)[0])*((b)[0]-(a)[0])+((b)[1]-(a)[1])*((b)[1]-(a)[1])+((b)[2]-(a)[2])*((b)[2]-(a)[2])) |
#define | VectorDist(a, b) (sqrtf(((b)[0]-(a)[0])*((b)[0]-(a)[0])+((b)[1]-(a)[1])*((b)[1]-(a)[1])+((b)[2]-(a)[2])*((b)[2]-(a)[2]))) |
#define | Vector2Dist(a, b) (sqrtf(((b)[0]-(a)[0])*((b)[0]-(a)[0])+((b)[1]-(a)[1])*((b)[1]-(a)[1]))) |
#define | VectorLengthSqr(a) ((a)[0]*(a)[0]+(a)[1]*(a)[1]+(a)[2]*(a)[2]) |
#define | VectorNotEmpty(a) (!VectorEmpty((a))) |
#define | VectorEmpty(a) (VectorEqual((a), vec3_origin)) |
#define | Vector2Empty(a) (Vector2Equal((a), vec2_origin)) |
#define | Vector2NotEmpty(a) (!Vector2Empty((a))) |
#define | Vector4NotEmpty(a) (VectorNotEmpty(a) || !EQUAL((a)[3],0.0f)) |
#define | VectorIntZero(a) ((a)[0] == 0 && (a)[1] == 0 && (a)[2] == 0) |
#define | LinearInterpolation(a, b, x, y) ((y)=(a)[1] + ((((x) - (a)[0]) * ((b)[1] - (a)[1])) / ((b)[0] - (a)[0]))) |
#define | VectorScale(in, scale, out) ((out)[0] = (in)[0] * (scale),(out)[1] = (in)[1] * (scale),(out)[2] = (in)[2] * (scale)) |
#define | VectorInterpolation(p1, p2, frac, mid) ((mid)[0]=(p1)[0]+(frac)*((p2)[0]-(p1)[0]),(mid)[1]=(p1)[1]+(frac)*((p2)[1]-(p1)[1]),(mid)[2]=(p1)[2]+(frac)*((p2)[2]-(p1)[2])) |
#define | VectorAbs(a) (a[0] = fabsf(a[0]), a[1] = fabsf(a[1]), a[2] = fabsf(a[2])) |
Variables | |
const vec2_t | vec2_origin |
const vec3_t | vec3_origin |
const vec4_t | vec4_origin |
const vec4_t | color_white |
const pos3_t | pos3_origin |
#define DotProduct | ( | x, | |
y | |||
) | ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2]) |
Returns the distance between two 3-dimensional vectors.
Definition at line 44 of file vector.h.
Referenced by AddBrushBevels(), AdjustBrushesForOrigin(), AI_CheckFF(), AI_FindHerdLocation(), AIR_GetDestinationWhilePursuing(), BaseWindingForPlane(), BrushMostlyOnSide(), BrushVolume(), BuildFaceExtents(), BuildFacelights(), CalcLightinfoVectors(), Check_EdgeEdgeIntersection(), Check_EdgePlaneIntersection(), Check_MapBrushVolume(), Check_PointPlaneDistance(), Check_SidePointsDown(), ChopWindingInPlace(), CL_CameraMove(), CL_GetWorldCoordsUnderMouse(), CL_ParticleRun2(), ClipWindingEpsilon(), CM_HintedTransformedBoxTrace(), DoesPlaneSplitBrush(), Door_SlidingUse(), FacingAndCoincidentTo(), FinalLightFace(), FindPortalSide(), G_ShootGrenade(), G_ShootSingle(), G_ShotMorale(), GatherSampleLight(), GatherSampleSunlight(), GEO_AngleOfPath3D(), LET_SlideDoor(), NET_WriteDir(), Orthogonalize(), ParallelAndCoincidentTo(), PlaneFromPoints(), ProjectPointOnPlane(), R_CullMeshModel(), R_CullSphere(), R_DrawFlareSurfaces(), R_LoadBspVertexArrays(), R_ModCalcNormalsAndTangents(), R_ModCalcUniqueNormalsAndTangents(), R_SetSurfaceExtents(), R_SetupFrustum(), R_StageColor(), RemoveColinearPoints(), RotatePointAroundVector(), S_SpatializeChannel(), SL_DistanceToIntersection(), SplitBrush(), SubdivideFace(), TangentVectors(), TestBrushToPlanenum(), TestEdge(), TexinfoForBrushTexture(), TextureAxisFromPlane(), TR_BoxOnPlaneSide(), TR_ClipBoxToBrush(), TR_RecursiveHullCheck(), TR_TestBoxInBrush(), TR_TestLine_r(), TryMergeWinding(), VectorAngleBetween(), VectorLength(), VectorNormalize(), VectorNormalize2(), VectorNormalizeFast(), and VectorRotatePoint().
#define EQUAL | ( | a, | |
b | |||
) | (fabsf((a)-(b))<0.0000000001f) |
Definition at line 37 of file vector.h.
Referenced by AII_UpdateAircraftStats(), ColorNormalize(), RADAR_Initialise(), UP_AircraftItemDescription(), VecToAngles(), and VectorNormalize2().
#define LinearInterpolation | ( | a, | |
b, | |||
x, | |||
y | |||
) | ((y)=(a)[1] + ((((x) - (a)[0]) * ((b)[1] - (a)[1])) / ((b)[0] - (a)[0]))) |
Definition at line 78 of file vector.h.
Referenced by GEO_DrawMarkers().
#define Vector2Clear | ( | a | ) | ((a)[0]=(a)[1]=0) |
Definition at line 54 of file vector.h.
Referenced by uiBox_t::clear(), and uiButtonNode::draw().
#define Vector2Compare | ( | a, | |
b | |||
) | ((a)[0]==(b)[0]?(a)[1]==(b)[1]?true:false:false) |
Definition at line 66 of file vector.h.
Referenced by CL_TargetingGrenade().
Definition at line 52 of file vector.h.
Referenced by AB_BuildBase(), AB_SetAlienBasePosition(), AIR_GetDestinationWhilePursuing(), AIR_Move(), AIR_NewAircraft(), AIR_SendAircraftPursuingUFO(), B_Build(), CP_BaseAttackGoToBase(), CP_InterceptAttackInstallation(), CP_InterceptGoToInstallation(), CP_InterceptMissionLeave(), CP_SpawnAlienBaseMission(), CP_SpawnCrashSiteMission(), CP_SpawnRescueMission(), CP_SupplyGoToBase(), CP_TerrorMissionGo(), uiImageNode::draw(), uiGeoscapeNode::draw(), GEO_Click(), GEO_GetGeoscapeAngle(), INS_Build(), uiAbstractScrollableNode::isSizeChange(), R_FillArrayData(), R_ModCalcNormalsAndTangents(), R_ModCalcUniqueNormalsAndTangents(), R_StageTexCoord(), uiBox_t::set(), SP_worldspawn(), TEST_F(), UFO_CampaignRunUFOs(), UFO_SetRandomPos(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), and UI_InitRadar().
#define Vector2Dist | ( | a, | |
b | |||
) | (sqrtf(((b)[0]-(a)[0])*((b)[0]-(a)[0])+((b)[1]-(a)[1])*((b)[1]-(a)[1]))) |
Definition at line 70 of file vector.h.
Referenced by CL_CheckCameraRoute(), LE_CenterView(), and UI_InitRadar().
#define Vector2Empty | ( | a | ) | (Vector2Equal((a), vec2_origin)) |
Definition at line 74 of file vector.h.
Referenced by uiImageNode::onLoaded(), UI_WindowNodeGetNoticePosition(), and VecToAngles().
Definition at line 67 of file vector.h.
Referenced by CITY_GetByPos(), CP_TerrorInCity(), uiAbstractScrollableNode::isSizeChange(), R_ModCalcUniqueNormalsAndTangents(), UI_NodeSetPos(), and UI_NodeSetSize().
#define Vector2FromInt | ( | x, | |
y | |||
) | { static_cast<float>(x), static_cast<float>(y) } |
Definition at line 40 of file vector.h.
Referenced by CP_SpawnUFOCarrier_f(), R_DrawQuad(), R_DrawTexture(), UI_DrawSpriteInBox(), UI_LeftRightFlowLayout(), and UI_TopDownFlowLayout().
#define Vector2NotEmpty | ( | a | ) | (!Vector2Empty((a))) |
Definition at line 75 of file vector.h.
Referenced by CL_RunMapParticles(), ExportLightmap(), SP_worldspawn(), and UI_DrawNode().
Definition at line 61 of file vector.h.
Referenced by ASE_GetSurfaceAnimation(), B_BuildFromTemplate(), CP_GetRandomPosOnGeoscapeWithParameters(), CP_UpdateNationXVIInfection(), uiImageNode::draw(), GEO_3DMapToScreen(), GEO_CalcLine(), GEO_ConvertObjectPositionToGeoscapePosition(), GEO_StartCenter(), uiGeoscapeNode::onLoading(), R_FontGenerateTexture(), R_PlantGrass(), R_SetSurfaceExtents(), R_SphereGenerate(), uiGeoscapeNode::screenTo3DMap(), TEST_F(), U2M_SetDefaultConfigValues(), UFO_SetRandomDestAround(), UI_GetNodeAbsPos(), UI_GetNodeScreenPos(), UI_GetRadarWidth(), UI_SetNewWindowPos(), uiImageNode_t_set_texh(), uiImageNode_t_set_texl(), uiTBarNode_t_set_texh(), uiTBarNode_t_set_texl(), and uiWindowNode_t_set_noticepos().
Definition at line 46 of file vector.h.
Referenced by R_ModCalcNormalsAndTangents(), and R_ModCalcUniqueNormalsAndTangents().
#define Vector3FromInt | ( | x, | |
y, | |||
z | |||
) | { static_cast<float>(x), static_cast<float>(y), static_cast<float>(z) } |
#define Vector4Clear | ( | a | ) | ((a)[0]=(a)[1]=(a)[2]=(a)[3]=0) |
Definition at line 57 of file vector.h.
Referenced by R_CreateFramebuffer(), and R_InitFBObjects().
#define Vector4Copy | ( | src, | |
dest | |||
) | ((dest)[0]=(src)[0],(dest)[1]=(src)[1],(dest)[2]=(src)[2],(dest)[3]=(src)[3]) |
Definition at line 53 of file vector.h.
Referenced by uiBarNode::draw(), GEO_DrawAircraftHealthBar(), BodyData::getHitBodyPart(), PR_RequirementsInfo(), R_ModCalcNormalsAndTangents(), SP_worldspawn(), UI_AddLineChartLine(), UI_ContainerNodeDrawSingle(), UI_DrawItem(), UI_DrawModelNodeWithUIModel(), and UI_EnableFlashing().
#define Vector4NotEmpty | ( | a | ) | (VectorNotEmpty(a) || !EQUAL((a)[3],0.0f)) |
Definition at line 76 of file vector.h.
Referenced by R_SphereShadeGLSL().
Definition at line 62 of file vector.h.
Referenced by CL_ParticleRun2(), CL_ParticleSpawn(), Grid_CalcPathing(), Grid_FindPath(), uiStringNode::onLoading(), uiMessageListNode::onLoading(), uiBarNode::onLoading(), uiTextEntryNode::onLoading(), uiBaseLayoutNode::onLoading(), uiTextListNode::onLoading(), uiButtonNode::onLoading(), uiSelectBoxNode::onLoading(), uiModelNode::onLoading(), uiText2Node::onLoading(), uiOptionTreeNode::onLoading(), uiOptionListNode::onLoading(), uiTextNode::onLoading(), uiGeoscapeNode::onLoading(), R_BuildDefaultLightmap(), R_Draw3DGlobe(), R_DrawAliasModel(), R_DrawEntityEffects(), R_DrawMeshShadow(), R_EnableModelLights(), R_EnableWorldLights(), R_RotateCelestialBody(), R_StageColor(), SP_worldspawn(), UI_ParseUIModel(), UI_RadarNodeGetActorColor(), uiLineChartNode_t_set_axescolor(), uiNode_t_set_backgroundcolor(), uiNode_t_set_bordercolor(), uiNode_t_set_color(), uiNode_t_set_disabledcolor(), uiNode_t_set_flashcolor(), and uiNode_t_set_selectcolor().
#define VectorAbs | ( | a | ) | (a[0] = fabsf(a[0]), a[1] = fabsf(a[1]), a[2] = fabsf(a[2])) |
Definition at line 81 of file vector.h.
Referenced by Door_SlidingUse(), and AABB::rotateAround().
#define VectorAdd | ( | a, | |
b, | |||
dest | |||
) | ((dest)[0]=(a)[0]+(b)[0],(dest)[1]=(a)[1]+(b)[1],(dest)[2]=(a)[2]+(b)[2]) |
Definition at line 47 of file vector.h.
Referenced by AI_CheckFF(), AI_CheckLineOfFire(), BaseWindingForPlane(), BuildPatches(), BuildVertexNormals(), CalcLightinfoVectors(), CalculateMinsMaxs(), Check_EdgeEdgeIntersection(), Check_EdgePlaneIntersection(), CL_AddTargetingBox(), CL_GetWorldCoordsUnderMouse(), CL_ParticleRun2(), CL_TargetingGrenade(), CM_HintedTransformedBoxTrace(), CMod_LoadEntityString(), Door_SlidingUse(), FinalLightFace(), G_EventSpawnSound(), G_ShootGrenade(), G_ShootSingle(), AABB::getCenter(), MapTile::getTileBox(), Grid_RecalcRouting(), LET_SlideDoor(), R_CullMeshModel(), R_DrawFlareSurfaces(), R_EntityAddToOrigin(), R_LoadBspVertexArrays(), R_ModCalcNormalsAndTangents(), R_ModCalcUniqueNormalsAndTangents(), AABB::rotateAround(), RT_GetMapSize(), boxtrace_s::setLineAndBox(), AABB::shift(), SL_VectorIntersectPlane(), uiGeoscapeNode::smoothRotate(), TR_BoxTrace(), UI_InitRadar(), VectorMidpoint(), and WindingCenter().
#define VectorClear | ( | a | ) | ((a)[0]=(a)[1]=(a)[2]=0) |
Definition at line 55 of file vector.h.
Referenced by AddBrushBevels(), BrushFromBounds(), BuildLights(), BuildVertexNormals(), ChopWindingInPlace(), CL_CameraMove(), CL_CameraRoute(), CL_ParticleRun2(), ClipWindingEpsilon(), CM_InitBoxHull(), ColorNormalize(), GetVectorFromString(), Edict::init(), le_s::init(), R_ModCalcNormalsAndTangents(), RT_GetMapSize(), SnapVector(), SubdividePatch(), and TR_BoxTrace().
#define VectorCompare | ( | a, | |
b | |||
) | ((a)[0]==(b)[0]?(a)[1]==(b)[1]?(a)[2]==(b)[2]?true:false:false:false) |
Definition at line 63 of file vector.h.
Referenced by AI_CheckLineOfFire(), AI_FindMissionLocation(), CL_ActorDoMove(), CL_ActorMouseTrace(), CL_ActorMoveMouse(), CL_ActorSelectMouse(), CL_BattlescapeSearchAtGridPos(), CL_EntPerish(), CL_TargetingGrenade(), CL_TargetingStraight(), CP_UpdateNationXVIInfection(), G_ActorCheckRevitalise(), G_ClientMove(), G_EdictsGetLivingActorFromPos(), G_GetEdictFromPos(), G_GetEdictFromPosExcluding(), G_ShootSingle(), G_Vis(), Grid_CheckForbidden(), Grid_FindPath(), Edict::isSamePosAs(), LE_DoEndPathMove(), LE_Find(), LE_GetFromPos(), LE_PlaceItem(), and TEST_F().
Definition at line 51 of file vector.h.
Referenced by AABB::AABB(), AI_CheckForMissionTargets(), AI_CheckLineOfFire(), AI_CivilianCalcActionScore(), AI_FighterCalcActionScore(), AI_FindHerdLocation(), AI_FindHidingLocation(), AI_FindMissionLocation(), AI_PanicCalcActionScore(), AI_PrepBestAction(), AIL_positionapproach(), AIL_positionflee(), AIL_positionherd(), AIL_positionhide(), AIL_positionmission(), AIL_positionshoot(), AIL_positionwander(), AIRFIGHT_CampaignRunProjectiles(), AIRFIGHT_MissTarget(), KeyValuePair::asVec3(), BaseWindingForPlane(), BrushVolume(), BuildFacelights(), BuildLights(), BuildNodeChildren(), BuildPatch(), BuildPatches(), CalcLightinfoVectors(), CalcTextureReflectivity(), Check_MapBrushVolume(), Check_SidesOverlap(), CheckNodraws(), ChopWindingInPlace(), CL_ActorDoMoveTime(), CL_ActorMaximumMove(), CL_ActorMouseTrace(), CL_ActorMoveLength(), CL_ActorMoveMouse(), CL_ActorSelectMouse(), CL_ActorTraceMove(), CL_ActorVis(), CL_AddArrow(), CL_AddBrushModel(), CL_AddMapParticle(), CL_CameraAppear(), CL_CameraRoute(), CL_ClipMoveToLEs(), CL_DisplayFloorArrows(), CL_DisplayObstructionArrows(), CL_DrawLineOfSight(), CL_EntAppear(), CL_GetHitProbability(), CL_GetWorldCoordsUnderMouse(), CL_HullForEntity(), CL_ParticleRun2(), CL_ParticleRunTimed(), CL_ParticleSpawn(), CL_SoundEvent(), CL_TargetingGrenade(), CL_TargetingStraight(), CL_ViewCenterAtGridPosition(), CL_ViewUpdateRenderData(), ClipWindingEpsilon(), CM_CompleteBoxTrace(), CM_EntTestLineDM(), CM_HintedTransformedBoxTrace(), CM_SetInlineModelOrientation(), CMod_LoadSubmodels(), CP_BaseAttackPrepareBattle(), CreateNewFloatPlane(), AiAreaSearch::LQueue::dequeue(), DoRouting(), EmitBrushes(), EmitDrawNode_r(), EmitFaceVertexes(), EmitLeaf(), EmitPlanes(), AiAreaSearch::LQueue::enqueue(), FinalLightFace(), FinishSubdividePatch(), FixFaceEdges(), FixWinding(), G_ActorGetContentFlags(), G_ActorGetEyeVector(), G_ActorMoveLength(), G_ActorShouldStopInMidMove(), G_ActorVis(), G_ClientMove(), G_GetImpactDirection(), G_ShootGrenade(), G_ShootSingle(), G_SpawnField(), G_SpawnFieldPart(), G_SpawnFloor(), G_SpawnParticle(), G_SplashDamage(), GEO_AngleOfPath2D(), GEO_AngleOfPath3D(), GEO_DrawMarkers(), fireDef_s::getShotOrigin(), Grid_CalcPathing(), Grid_FindPath(), GridBox::GridBox(), LE_AddAmbientSound(), LE_AddToScene(), LE_BrushModelAction(), LE_CenterView(), LE_PlayFootStepSound(), LET_HiddenMove(), LET_PathMove(), LET_Projectile(), Line::Line(), LM_AddModel(), LM_AddToSceneOrder(), MakeNodePortal(), NET_ReadDir(), NudgeSamplePosition(), uiRadarNode::onCapturedMouseMove(), ParseBrush(), PTL_Trace(), R_AddBspRRef(), R_AddClump(), R_AddCorona(), R_AddLight(), R_AddStaticLight(), R_AddSustainedLight(), R_CreateSurfaceFlare(), R_CullMeshModel(), R_Draw2DMapMarkers(), R_Draw3DGlobe(), R_Draw3DMapMarkers(), R_DrawBoundingBoxBatched(), R_DrawSprite(), R_EnableModelLights(), R_EnableWorldLights(), R_EntitySetOrigin(), R_FillArrayData(), R_GenerateGrass(), R_LoadBspVertexArrays(), R_LoadObjModelVertexArrays(), R_ModCalcNormalsAndTangents(), R_ModCalcUniqueNormalsAndTangents(), R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), R_ModLoadSurfaces(), R_PlantGrass(), R_SetSurfaceExtents(), R_SetSurfaceStageState(), R_SetupSpotLight(), R_StageColor(), R_StageVertex(), R_UpdateLightList(), R_UpdateShadowOrigin(), RemoveColinearPoints(), ReverseWinding(), RT_CheckCell(), RT_FindOpening(), RT_FindOpeningCeilingFrac(), RT_FindOpeningFloorFrac(), RT_GetMapSize(), S_Frame(), S_LoopSample(), S_PlaySample(), SampleNormal(), SEQ_Render3D(), SEQ_SetCamera(), Line::set(), AABB::set(), GridBox::set(), AABB::setMaxs(), AABB::setMins(), Edict::setOrigin(), entity_s::setScale(), SL_SliceTheWorld(), uiGeoscapeNode::smoothRotate(), SP_worldspawn(), Step::Step(), SubdivideFace(), SV_HullForEntity(), TangentVectors(), TEST_F(), TestBrushToPlanenum(), TestEdge(), TextureAxisFromPlane(), TR_BoxTrace(), TR_BuildTracingNode_r(), TR_EmptyTransferCargo(), TR_MakeTracingNode(), TR_TestLineDist_r(), TR_TestLineDM(), TR_TileTestLineDM(), TryMergeWinding(), UI_DrawItem(), UI_GeoscapeNodeScroll_f(), UI_GeoscapeNodeZoom_f(), UI_InitModelInfoView(), UI_Transform(), VectorRotatePoint(), WindingCenter(), and WindingFromFace().
#define VectorDist | ( | a, | |
b | |||
) | (sqrtf(((b)[0]-(a)[0])*((b)[0]-(a)[0])+((b)[1]-(a)[1])*((b)[1]-(a)[1])+((b)[2]-(a)[2])*((b)[2]-(a)[2]))) |
Definition at line 69 of file vector.h.
Referenced by actorL_shoot(), actorL_throwgrenade(), AI_CheckCrouch(), AI_CheckFF(), AI_CheckForMissionTargets(), AI_CheckUsingDoor(), AI_CivilianCalcActionScore(), AI_FighterCalcActionScore(), AI_FindBestFiredef(), AI_PanicCalcActionScore(), AIL_positionflee(), AIL_positionshoot(), AIL_waypoints(), CL_ActorDoShootTime(), CL_ActorGetClosest(), CL_ActorIsReactionFireOutOfRange(), CL_ActorReactionFireAddTarget(), CL_CameraMove(), CL_TargetingStraight(), G_ClientShoot(), G_Morale(), G_SmokeVis(), G_SpawnFieldGroup(), G_SplashDamage(), G_TeamPointVis(), Grid_FindPath(), ReactionFire::isInWeaponRange(), pos3L_distance(), R_CalcTransform(), and R_UpdateLightList().
#define VectorDistSqr | ( | a, | |
b | |||
) | (((b)[0]-(a)[0])*((b)[0]-(a)[0])+((b)[1]-(a)[1])*((b)[1]-(a)[1])+((b)[2]-(a)[2])*((b)[2]-(a)[2])) |
Definition at line 68 of file vector.h.
Referenced by AI_FindHerdLocation(), AI_HideNeeded(), AIL_missiontargets(), AIL_positionwander(), AIL_see(), ReactionFire::canSee(), Check_LongestEdge(), CheckNodraws(), CL_TargetingStraight(), G_ShotMorale(), G_Vis(), R_AddLightToEntity(), and R_UpdateLightList().
#define VectorDiv | ( | in, | |
scalar, | |||
out | |||
) | VectorScale((in),(1.0f/(scalar)),(out)) |
#define VectorEmpty | ( | a | ) | (VectorEqual((a), vec3_origin)) |
Definition at line 73 of file vector.h.
Referenced by AIL_positionwander(), BuildFacelights(), BuildLights(), AABB::isZero(), LET_SlideDoor(), AABB::rotateAround(), and TR_BoxTrace().
#define VectorEqual | ( | a, | |
b | |||
) | (EQUAL((a)[0],(b)[0])?EQUAL((a)[1],(b)[1])?EQUAL((a)[2],(b)[2])?true:false:false:false) |
Definition at line 65 of file vector.h.
Referenced by GEO_CalcLine(), Grid_FindPath(), R_ModCalcUniqueNormalsAndTangents(), TEST_F(), and TR_BoxTrace().
#define VectorEqualEpsilon | ( | a, | |
b, | |||
epsilon | |||
) | (EQUAL2((a)[0],(b)[0],epsilon)?EQUAL2((a)[1],(b)[1],epsilon)?EQUAL2((a)[2],(b)[2],epsilon)?true:false:false:false) |
Definition at line 64 of file vector.h.
Referenced by GEO_GetNation().
#define VectorInside | ( | vec, | |
mins, | |||
maxs | |||
) | (vec[0] >= mins[0] && vec[0] <= maxs[0] && vec[1] >= mins[1] && vec[1] <= maxs[1] && vec[2] >= mins[2] && vec[2] <= maxs[2]) |
Definition at line 56 of file vector.h.
Referenced by CM_GetVisibility().
#define VectorInterpolation | ( | p1, | |
p2, | |||
frac, | |||
mid | |||
) | ((mid)[0]=(p1)[0]+(frac)*((p2)[0]-(p1)[0]),(mid)[1]=(p1)[1]+(frac)*((p2)[1]-(p1)[1]),(mid)[2]=(p1)[2]+(frac)*((p2)[2]-(p1)[2])) |
Definition at line 80 of file vector.h.
Referenced by CM_HintedTransformedBoxTrace(), AABB::rotateAround(), RT_FindOpening(), RT_FindOpeningCeilingFrac(), RT_FindOpeningFloorFrac(), TR_BoxTrace(), TR_RecursiveHullCheck(), TR_TestLine_r(), and TR_TestLineDist_r().
#define VectorIntZero | ( | a | ) | ((a)[0] == 0 && (a)[1] == 0 && (a)[2] == 0) |
Definition at line 77 of file vector.h.
Referenced by GridBox::isZero().
#define VectorLengthSqr | ( | a | ) | ((a)[0]*(a)[0]+(a)[1]*(a)[1]+(a)[2]*(a)[2]) |
Definition at line 71 of file vector.h.
Referenced by Check_PointPlaneDistance(), and G_ShotMorale().
#define VectorMul | ( | scalar, | |
b, | |||
dest | |||
) | ((dest)[0]=(scalar)*(b)[0],(dest)[1]=(scalar)*(b)[1],(dest)[2]=(scalar)*(b)[2]) |
Definition at line 48 of file vector.h.
Referenced by Check_EdgePlaneIntersection(), Door_SlidingUse(), LET_SlideDoor(), Orthogonalize(), R_ModCalcNormalsAndTangents(), and R_ModCalcUniqueNormalsAndTangents().
Definition at line 58 of file vector.h.
Referenced by BuildFacelights(), BuildPatch(), CL_ParticleRun2(), CM_HintedTransformedBoxTrace(), R_ModelAutoScale(), R_ModLoadSurfaces(), and UI_DrawItem().
#define VectorNotEmpty | ( | a | ) | (!VectorEmpty((a))) |
Definition at line 72 of file vector.h.
Referenced by BuildFacelights(), CalculateMinsMaxs(), CL_ParticleRun2(), CM_CalculateWidestBoundingBox(), CM_HintedTransformedBoxTrace(), Grid_RecalcRouting(), ParseMapEntity(), PlaneFromPoints(), R_DrawAliasModel(), R_DrawBox(), R_DrawMeshModelShell(), R_LoadBspVertexArrays(), R_ModAddMapTile(), R_SphereRender(), and SP_worldspawn().
#define VectorScale | ( | in, | |
scale, | |||
out | |||
) | ((out)[0] = (in)[0] * (scale),(out)[1] = (in)[1] * (scale),(out)[2] = (in)[2] * (scale)) |
Definition at line 79 of file vector.h.
Referenced by AI_CheckFF(), AI_CheckLineOfFire(), BaseWindingForPlane(), BuildVertexNormals(), CalcLightinfoVectors(), Check_EdgeEdgeIntersection(), CL_CameraMove(), CL_GetWorldCoordsUnderMouse(), CL_ParticleRun2(), CL_TargetingGrenade(), ColorNormalize(), Com_GrenadeTarget(), uiBarNode::draw(), uiImageNode::draw(), uiTextListNode::drawText(), uiTextNode::drawText(), EmissiveLight(), FinalLightFace(), G_ShootGrenade(), G_ShootSingle(), G_ShotMorale(), AABB::getCenter(), LE_AddProjectile(), R_DrawAliasModel(), R_DrawFlareSurfaces(), R_GetSpriteVectors(), R_SetupFrustum(), R_UpdateSustainedLights(), S_MumbleUpdate(), SL_VectorIntersectPlane(), uiGeoscapeNode::smoothRotate(), SP_worldspawn(), TangentVectors(), TexinfoForBrushTexture(), UI_DrawItem(), VectorMidpoint(), and WindingCenter().
Definition at line 59 of file vector.h.
Referenced by AABB::AABB(), AIL_positionshoot(), AIR_AircraftMakeMove(), AIR_NewAircraft(), AIRFIGHT_AddProjectile(), ASE_GetSurfaceAnimation(), BuildFaceExtents(), BuildFacelights(), BuildLights(), CalcTextureReflectivity(), CL_AddArrow(), CL_AddEdictFunc(), CL_AddPathingBox(), CL_AddTargetingBox(), CL_BattlescapeSearchAtGridPos(), CL_CameraMove(), CL_DisplayHomebasePopup(), CL_DrawLineOfSight(), CL_GetWorldCoordsUnderMouse(), CL_SpawnParseEntitystring(), CL_StartGame(), CM_AddMapTile(), DoRouting(), FinalLightFace(), G_BuildForbiddenListForEntity(), G_SpawnFieldGroup(), GEO_3DMapToScreen(), GEO_AngleOfPath2D(), GEO_CalcLine(), GEO_ConvertObjectPositionToGeoscapePosition(), GEO_Draw3DMarkerIfVisible(), GetVectorFromString(), HUD_PopupFiremodeReservation(), LE_AddEdictHighlight(), LE_AddGrenade(), LE_BrushModelAction(), uiModelNode::onLoading(), uiGeoscapeNode::onLoading(), PolarToVec(), R_Draw3DGlobe(), R_DrawCircle(), R_DrawNullModel(), R_DrawStarfield(), R_FillArrayData(), R_ModAddMapTile(), R_ModelAutoScale(), R_ModLoadTags(), R_PlantGrass(), R_RotateCelestialBody(), R_SetSurfaceExtents(), R_SetSurfaceStageState(), R_SphereGenerate(), R_StageColor(), RT_CheckCell(), RT_FindOpening(), RT_GetMapSize(), RT_MicroTrace(), RT_ObstructedTrace(), S_MumbleUpdate(), uiGeoscapeNode::screenTo3DMap(), SEQ_ExecuteModel(), AABB::setMaxs(), AABB::setMins(), SP_worldspawn(), TEST_F(), TR_BuildTracingNode_r(), U2M_SetDefaultConfigValues(), UI_DrawDragAndDrop(), UI_InitRadar(), uiModelNode_t_set_angles(), uiModelNode_t_set_omega(), uiModelNode_t_set_origin(), uiModelNode_t_set_scale(), and Weather::update().
#define VectorSubtract | ( | a, | |
b, | |||
dest | |||
) | ((dest)[0]=(a)[0]-(b)[0],(dest)[1]=(a)[1]-(b)[1],(dest)[2]=(a)[2]-(b)[2]) |
Definition at line 45 of file vector.h.
Referenced by AddBrushBevels(), AI_CheckFF(), AI_CheckLineOfFire(), AI_FindHerdLocation(), AIL_positionwander(), BaseWindingForNode(), BaseWindingForPlane(), BuildLights(), BuildVertexNormals(), CalcLightinfoVectors(), CalculateMinsMaxs(), Check_EdgeEdgeIntersection(), Check_EdgePlaneIntersection(), Check_SidesOverlap(), CL_ActorTurnMouse(), CL_AddPathingBox(), CL_AddTargetingBox(), CL_BattlescapeMouseDragging(), CL_CameraRoute(), CL_GetWorldCoordsUnderMouse(), CL_TargetingGrenade(), CL_TargetingStraight(), CM_HintedTransformedBoxTrace(), CMod_LoadEntityString(), Com_GrenadeTarget(), CreateNewFloatPlane(), FixFaceEdges(), FixWinding(), G_ClientShoot(), G_GetImpactDirection(), G_ShootSingle(), G_ShotMorale(), GatherSampleLight(), GEO_AngleOfPath2D(), GEO_AngleOfPath3D(), GEO_StartCenter(), AABB::getDiagonal(), MapTile::getTileBox(), Grid_RecalcRouting(), LE_AddProjectile(), LE_PlaceItem(), LET_PathMove(), MakeNodePortal(), NudgeSamplePosition(), Orthogonalize(), PlaneFromPoints(), R_DrawFlareSurfaces(), R_GenerateGrass(), R_GetLevelOfDetailForModel(), R_ModCalcNormalsAndTangents(), R_ModCalcUniqueNormalsAndTangents(), R_StageTexCoord(), RayIntersectAABB(), RemoveColinearPoints(), AABB::rotateAround(), RT_GetMapSize(), S_LoopSample(), S_SpatializeChannel(), SampleNormal(), boxtrace_s::setLineAndBox(), SL_SliceTheWorld(), uiGeoscapeNode::smoothRotate(), TestEdge(), TR_BoxTrace(), TryMergeWinding(), UI_GeoscapeNodeScroll_f(), UI_InitRadar(), VectorCompareEps(), VectorNearer(), WindingArea(), and WindingIsTiny().
#define VectorSum | ( | a | ) | ((a)[0]+(a)[1]+(a)[2]) |
Definition at line 60 of file vector.h.
Referenced by SP_worldspawn().
const vec4_t color_white |
Definition at line 1004 of file r_state.cpp.
Referenced by R_Color().
const pos3_t pos3_origin |
Definition at line 37 of file mathlib.cpp.
Referenced by AiAreaSearch::AiAreaSearch().
const vec2_t vec2_origin |
Definition at line 34 of file mathlib.cpp.
Referenced by GEO_GetGeoscapeAngle().
const vec3_t vec3_origin |
Definition at line 35 of file mathlib.cpp.
Referenced by AABB::AABB(), KeyValuePair::asVec3(), BaseWindingForNode(), BaseWindingForPlane(), BuildNodeChildren(), CalcLightinfoVectors(), CL_HullForEntity(), CM_EntTestLineDM(), CreateNewFloatPlane(), EmitBrushes(), G_EventSpawnSound(), G_TraceDraw(), GridBox::GridBox(), Line::Line(), MakeNodePortal(), ParseBrush(), R_Draw2DMapMarkers(), R_Draw3DMapMarkers(), R_RenderFrame(), SV_ClipMoveToEntities(), SV_HullForEntity(), SV_LinkEdict(), TEST_F(), and WindingCenter().
const vec4_t vec4_origin |
Definition at line 36 of file mathlib.cpp.
Referenced by R_DrawModelDirect(), and R_DrawModelParticle().