![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "qtypes.h"
Go to the source code of this file.
Data Structures | |
struct | randomseed_t |
struct | tinydoubleplane_t |
struct | tinyplane_t |
LadyHavoc: minimal plane structure. More... | |
Macros | |
#define | ANGLEMOD(a) |
#define | bit2i(n) |
\TODO: what is this function supposed to do? | |
#define | boolxor(a, b) |
boolean XOR (why doesn't C have the ^^ operator for this purpose?) | |
#define | bound(min, num, max) |
#define | BoxesOverlap(a, b, c, d) |
#define | BoxInsideBox(a, b, c, d) |
#define | CrossProduct(a, b, out) |
#define | DEG2RAD(a) |
#define | DotProduct(a, b) |
#define | DotProduct2(a, b) |
#define | DotProduct4(a, b) |
#define | invpow(base, number) |
#define | lhcheeserand(seed) |
#define | lhcheeserandom(seed, MIN, MAX) |
#define | lhrandom(MIN, MAX) |
LadyHavoc: this function never returns exactly MIN or exactly MAX, because of a QuakeC bug in id1 where the line self.nextthink = self.nexthink + random() * 0.5; can result in 0 (self.nextthink is 0 at this point in the code to begin with), causing "stone monsters" that never spawned properly, also MAX is avoided because some people use random() as an index into arrays or for loop conditions, where hitting exactly MAX may be a fatal error. | |
#define | log2i(n) |
returns log base 2 of "n" \WARNING: "n" MUST be a power of 2! | |
#define | M_PI 3.14159265358979323846 |
#define | max(A, B) |
#define | min(A, B) |
#define | NUMVERTEXNORMALS 162 |
#define | PlaneDiff(point, plane) |
#define | PlaneDist(point, plane) |
#define | PointInfrontOfTriangle(p, a, b, c) |
#define | Q_rint(x) |
#define | RAD2DEG(a) |
#define | TriangleBBoxOverlapsBox(a, b, c, d, e) |
#define | TriangleNormal(a, b, c, n) |
#define | Vector2Clear(a) |
#define | Vector2Compare(a, b) |
#define | Vector2Copy(in, out) |
#define | Vector2Length(a) |
#define | Vector2Negate(in, out) |
#define | Vector2Normalize2(v, dest) |
#define | Vector2Scale(in, scale, out) |
#define | Vector2Set(vec, x, y) |
#define | Vector4Add(a, b, out) |
#define | Vector4Clear(a) |
#define | Vector4Compare(a, b) |
#define | Vector4Copy(in, out) |
#define | Vector4Lerp(v1, lerp, v2, out) |
#define | Vector4MA(a, scale, b, out) |
#define | Vector4Multiply(a, b, out) |
#define | Vector4Negate(in, out) |
#define | Vector4Normalize2(v, dest) |
#define | Vector4Scale(in, scale, out) |
#define | Vector4Set(vec, r, g, b, a) |
#define | Vector4Subtract(a, b, out) |
#define | VectorAdd(a, b, out) |
#define | VectorCheeseRandom(seed, v) |
#define | VectorClear(a) |
#define | VectorCompare(a, b) |
#define | VectorCopy(in, out) |
#define | VectorCopy4(a, b) |
#define | VectorDistance(a, b) |
#define | VectorDistance2(a, b) |
#define | VectorLehmerRandom(seed, v) |
#define | VectorLength(a) |
#define | VectorLength2(a) |
#define | VectorLerp(v1, lerp, v2, out) |
#define | VectorM(scale1, b1, out) |
#define | VectorMA(a, scale, b, out) |
#define | VectorMAM(scale1, b1, scale2, b2, out) |
#define | VectorMAMAM(scale1, b1, scale2, b2, scale3, b3, out) |
#define | VectorMAMAMAM(scale1, b1, scale2, b2, scale3, b3, scale4, b4, out) |
#define | VectorMultiply(a, b, out) |
#define | VectorNegate(a, b) |
#define | VectorNormalize(v) |
#define | VectorNormalize2(v, dest) |
#define | VectorNormalizeDouble(v) |
#define | VectorRandom(v) |
#define | VectorReflect(a, r, b, out) |
#define | VectorScale(in, scale, out) |
#define | VectorScaleCast(in, scale, outtype, out) |
#define | VectorSet(vec, x, y, z) |
#define | VectorSubtract(a, b, out) |
Functions | |
void | AngleMatrix (const vec3_t angles, const vec3_t translate, vec_t matrix[][4]) |
LadyHavoc: builds a [3][4] matrix. | |
void | AnglesFromVectors (vec3_t angles, const vec3_t forward, const vec3_t up, qbool flippitch) |
LadyHavoc: calculates pitch/yaw/roll angles from forward and up vectors. | |
void | AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up) |
void | AngleVectorsDuke3DFLU (const vec3_t angles, vec3_t forward, vec3_t left, vec3_t up, double maxShearAngle) |
divVerent: improper matrix version of AngleVectors | |
void | AngleVectorsFLU (const vec3_t angles, vec3_t forward, vec3_t left, vec3_t up) |
LadyHavoc: proper matrix version of AngleVectors. | |
void | BoxFromPoints (vec3_t mins, vec3_t maxs, int numpoints, vec_t *point3f) |
int | BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, const struct mplane_s *p) |
int | BoxOnPlaneSide_Separate (const vec3_t emins, const vec3_t emaxs, const vec3_t normal, const vec_t dist) |
void | BoxPlaneCornerDistances (const vec3_t emins, const vec3_t emaxs, const struct mplane_s *p, vec_t *outnear, vec_t *outfar) |
void | BoxPlaneCornerDistances_Separate (const vec3_t emins, const vec3_t emaxs, const vec3_t normal, vec_t *outnear, vec_t *outfar) |
void | BoxPlaneCorners (const vec3_t emins, const vec3_t emaxs, const struct mplane_s *p, vec3_t outnear, vec3_t outfar) |
void | BoxPlaneCorners_Separate (const vec3_t emins, const vec3_t emaxs, const vec3_t normal, vec3_t outnear, vec3_t outfar) |
void | ByteToNormal (unsigned char num, vec3_t n) |
unsigned int | CeilPowerOf2 (unsigned int value) |
returns the smallest integer greater than or equal to "value", or 0 if "value" is too big | |
int | LoopingFrameNumberFromDouble (double t, int loopframes) |
int | Math_atov (const char *s, prvm_vec3_t out) |
float | Math_crandomf (randomseed_t *r) |
unsigned long long | Math_rand64 (randomseed_t *r) |
float | Math_randomf (randomseed_t *r) |
float | Math_randomrangef (randomseed_t *r, float minf, float maxf) |
int | Math_randomrangei (randomseed_t *r, int mini, int maxi) |
void | Math_RandomSeed_FromInts (randomseed_t *r, unsigned int s0, unsigned int s1, unsigned int s2, unsigned int s3) |
void | Math_RandomSeed_Reset (randomseed_t *r) |
void | Mathlib_Init (void) |
void | Matrix4x4_Print (const struct matrix4x4_s *in) |
print a matrix to the console | |
unsigned char | NormalToByte (const vec3_t n) |
void | PlaneClassify (struct mplane_s *p) |
void | R_ConcatRotations (const float in1[3 *3], const float in2[3 *3], float out[3 *3]) |
void | R_ConcatTransforms (const float in1[3 *4], const float in2[3 *4], float out[3 *4]) |
float | RadiusFromBounds (const vec3_t mins, const vec3_t maxs) |
float | RadiusFromBoundsAndOrigin (const vec3_t mins, const vec3_t maxs, const vec3_t origin) |
void | RotatePointAroundVector (vec3_t dst, const vec3_t dir, const vec3_t point, float degrees) |
float | VectorNormalizeLength (vec3_t v) |
returns vector length | |
void | VectorVectors (const vec3_t forward, vec3_t right, vec3_t up) |
LadyHavoc: like AngleVectors, but taking a forward vector instead of angles, useful! | |
void | VectorVectorsDouble (const double *forward, double *right, double *up) |
Variables | |
float | m_bytenormals [NUMVERTEXNORMALS][3] |
vec3_t | vec3_origin |
#define ANGLEMOD | ( | a | ) |
Definition at line 67 of file mathlib.h.
Referenced by CL_AdjustAngles(), CL_IsMoveInDirection(), CL_UpdateNetworkEntity(), SV_NewChaseDir(), VM_changepitch(), and VM_changeyaw().
#define bit2i | ( | n | ) |
boolean XOR (why doesn't C have the ^^ operator for this purpose?)
Definition at line 60 of file mathlib.h.
Referenced by S_SetChannelLayout(), and S_Update().
Definition at line 34 of file mathlib.h.
Referenced by BuildGammaTable16(), BuildGammaTable8(), CL_AdjustAngles(), CL_Beams_SetupBuiltinTexture(), CL_ClientMovement_Physics_AdjustAirAccelQW(), CL_ClientMovement_Physics_CPM_PM_Aircontrol(), CL_ClientMovement_Physics_PM_Accelerate(), CL_ClientMovement_Physics_Swim(), CL_DecayLightFlashes(), CL_DrawVideo(), CL_ExaminePrintString(), CL_Frame(), CL_Input(), CL_LerpPoint(), CL_Locs_FindNearest(), CL_MoveLerpEntityStates(), CL_NetworkTimeReceived(), CL_NewParticlesFromEffectinfo(), CL_ParseDownload(), CL_ParseServerMessage(), CL_SelectTraceLine(), CL_SendMove(), CL_UpdateNetworkEntity(), CL_UpdateNetworkEntityTrail(), CL_UpdatePrydonCursor(), CL_UpdateScreen(), Collision_ClipExtendFinish(), Collision_TraceBrushBrushFloat(), Collision_TraceLineBrushFloat(), Con_CheckResize(), Con_MaskPrint(), Crypto_ClientParsePacket(), Crypto_ServerParsePacket_Internal(), Crypto_StoreHostKey(), DrawQ_GetTextColor(), EntityFrame4_WriteFrame(), EntityFrameQuake_WriteFrame(), EntityState5_Priority(), Font_Postprocess(), Font_Postprocess_Update(), fractalnoise(), fractalnoisequick(), GL_SetupTextureParameters(), GL_Texture_CalcImageSize(), Image_MakesRGBColorsFromLinear_Lightmap(), jam_video(), JPEG_LoadImage_BGRA(), JPEG_SaveImage_to_Buffer(), lowpass(), lowpass_limited(), M_Background(), M_DrawSlider(), M_Menu_Options_AdjustSliders(), M_Menu_Options_ColorControl_AdjustSliders(), M_Menu_Options_Effects_AdjustSliders(), M_Menu_Options_Graphics_AdjustSliders(), M_Menu_Video_AdjustSliders(), M_ModList_Draw(), M_Options_ColorControl_Draw(), M_Options_Draw(), M_Options_Effects_Draw(), M_Options_Graphics_Draw(), Mod_FrameGroupify_ParseGroups_Store(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_GridSample(), Mod_GenerateLightmaps_LightmapSample(), Mod_INTERQUAKEMODEL_Load(), Mod_LoadQ3Shaders_EnumerateWaveFunc(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(), Mod_Q3BSP_LightPoint(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_LoadLightmaps(), Mod_VBSP_LoadFaces(), NetConn_BuildStatusResponse(), NetConn_OpenClientPorts(), NetConn_OpenServerPorts(), OGG_DecodeTags(), Palette_Load(), PRVM_MEM_Alloc(), R_BeginCoronaQuery(), R_Bloom_MakeTexture(), R_Bloom_StartFrame(), R_BufferData_Resize(), R_BuildFogTexture(), R_BuildLightMap(), R_DecalSystem_SplatTriangle(), R_DrawEntityBBoxes_Callback(), R_DrawModelDecals_FadeEntity(), R_DrawParticles(), R_EvaluateQ3WaveFunc(), r_explosion_start(), R_FrameData_Alloc(), R_FrameData_Resize(), R_HDR_UpdateIrisAdaptation(), R_InitParticleTexture(), R_MeshQueue_RenderTransparent(), R_Mod_DrawLight(), R_MotionBlurView(), R_ProcessTransparentTextureSurfaceList(), R_Shadow_BounceGrid_ConvertPixelsAndUpload(), R_Shadow_BounceGrid_GenerateSettings(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_DrawModelShadowMaps(), R_Shadow_LoadLightsFile(), R_Shadow_MakeTextures(), R_Shadow_MakeTextures_MakeCorona(), R_Shadow_MakeTextures_SamplePoint(), R_Shadow_PrepareLight(), R_Shadow_PrepareLights(), R_Shadow_PrepareLights_AddSceneLight(), R_Shadow_SetShadowMode(), R_StainNode(), R_TestQ3WaveFunc(), R_Textures_Frame(), R_TimeReport_EndFrame(), R_UpdateFog(), R_UpdateVariables(), R_Water_StartFrame(), S_ConvertPaintBuffer(), S_MixToBuffer(), S_SetUnderwaterIntensity(), Sbar_Draw(), Sbar_DrawFace(), Sbar_DrawGauge(), Sbar_PrintScoreboardItem(), SCR_CaptureVideo_Avi_SoundFrame(), SCR_CaptureVideo_Ogg_BeginVideo(), SCR_CaptureVideo_Ogg_SoundFrame(), SCR_DrawNetGraph_DrawGraph(), SCR_DrawScreen(), SCR_UpdateVars(), setup_rateindex(), shadebubble(), SND_Spatialize_WithSfx(), SndSys_Init(), SV_ExecuteClientMoves(), SV_MaxPlayers_f(), SV_Ping_f(), SV_Pings_f(), SV_PointSuperContents(), SV_PrepareEntityForSending(), SV_SendClientDatagram(), SV_ServerOptions(), SV_StartParticle(), SV_Status_f(), SV_WriteClientdataToMessage(), SV_WriteEntitiesToClient(), TaskQueue_Frame(), V_CalcRefdefUsing(), V_CalcViewBlend(), VID_ApplyDisplayMode(), VID_BuildGammaTables(), VID_InitModeGL(), VID_JoyState_GetAxis(), VID_TouchscreenArea(), VM_bound(), VM_CL_findradius(), VM_drawsetcliparea(), VM_findkeysforcommand(), VM_FrameBlendFromFrameGroupBlend(), VM_getkeybind(), VM_getsurfacenearpoint(), VM_setkeybind(), VM_substring(), VM_SV_findradius(), VM_SV_newcheckclient(), VM_SV_pointparticles(), VM_SV_te_blood(), VM_SV_te_bloodshower(), VM_SV_te_customflash(), VM_SV_te_explosionrgb(), VM_SV_te_particlecube(), VM_SV_te_particlerain(), VM_SV_te_particlesnow(), and VM_SV_te_spark().
Definition at line 122 of file mathlib.h.
Referenced by CL_Cache_TraceLineSurfaces(), CL_SelectTraceLine(), CL_TraceBox(), CL_TraceLine(), CL_TracePoint(), Collision_ClipTrace_Point(), Collision_PointInsideBrushFloat(), Collision_TraceBrushTriangleMeshFloat(), Collision_TraceLineTriangleMeshFloat(), Mod_BSP_BoxTouchingLeafPVS(), Mod_BSP_BoxTouchingPVS(), Mod_BSP_BoxTouchingVisibleLeafs(), Mod_BSP_FindBoxClusters(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLineOfSight(), Mod_CollisionBIH_TraceLineShared(), Mod_CollisionBIH_TracePoint(), Mod_GenerateLightmaps_CreateLights_ComputeSVBSP_InsertSurfaces(), Mod_Q1BSP_TraceLineOfSight(), Mod_Q3BSP_TraceLineOfSight(), Portal_RecursiveFlow(), R_CanSeeBox(), R_DecalSystem_ApplySplatEntities(), R_DecalSystem_SplatEntity(), R_Mod_DrawShadowMap(), R_Q1BSP_RecursiveGetLightInfo_BIH(), R_Q1BSP_RecursiveGetLightInfo_BSP(), R_ScissorForBBox(), R_Shadow_ChooseSidesFromBox(), R_Shadow_PrepareLight(), R_Shadow_PrepareModelShadows(), SV_EntitiesInBox(), SV_Physics_Toss(), and World_EntitiesInBox().
Definition at line 123 of file mathlib.h.
Referenced by Portal_RecursiveFlow(), R_Q1BSP_RecursiveGetLightInfo_BSP(), and R_Shadow_ChooseSidesFromBox().
Definition at line 103 of file mathlib.h.
Referenced by CL_Beam_AddPolygons(), CL_Beam_AddQuad(), clippointtosurface(), Collision_CalcPlanesForTriangleBrushFloat(), Collision_TraceBrushBrushFloat(), Collision_TraceLineTriangleFloat(), Mod_BSP_FindNonSolidLocation_r_Triangle(), Mod_BuildTextureVectorsFromNormals(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_INTERQUAKEMODEL_Load(), Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(), Mod_RemoveDegenerateTriangles(), Portal_CheckPolygon(), Portal_RecursiveFlowSearch(), R_CalcBeam_Vertex3f(), R_RotateSprite(), R_Shadow_DrawModelShadowMaps(), R_Shadow_PrepareModelShadows(), R_View_SetFrustum(), RSurf_PrepareVerticesForBatch(), and SV_FlyMove().
#define DEG2RAD | ( | a | ) |
Definition at line 65 of file mathlib.h.
Referenced by DrawQ_RotPic(), Mod_Decompile_SMD(), and RotatePointAroundVector().
Definition at line 98 of file mathlib.h.
Referenced by _R_CullBox(), AnglesFromVectors(), CL_Beam_AddPolygons(), CL_ClientMovement_Move(), CL_ClientMovement_Physics_CPM_PM_Aircontrol(), CL_ClientMovement_Physics_PM_Accelerate(), CL_ClientMovement_Physics_PM_AirAccelerate(), CL_ClientMovement_Physics_Swim(), CL_ClientMovement_Physics_Walk(), CL_ClientMovement_UpdateStatus(), CL_MoveLerpEntityStates(), clippointtosurface(), ClipVelocity(), Collision_CalcPlanesForTriangleBrushFloat(), Collision_ClipTrace_Line_Sphere(), Collision_NewBrushFromPlanes(), Collision_PointInsideBrushFloat(), Collision_TraceLineBrushFloat(), Collision_TraceLineTriangleFloat(), Collision_TracePointBrushFloat(), Collision_TranslateBrush(), Collision_ValidateBrush(), Com_CalcRoll(), furthestplanedist_float(), Mod_BSP_FindNonSolidLocation_r_Triangle(), Mod_BSP_GetPVS(), Mod_BSP_PointInLeaf(), Mod_BuildTextureVectorsFromNormals(), Mod_GenerateLightmaps_LightmapSample(), Mod_GenerateLightmaps_SamplePoint(), Mod_GenerateLightmaps_SamplePoint_SVBSP(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_LoadMapBrushes(), Mod_Q1BSP_PointSuperContents(), Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_RecursiveHullCheckPoint(), Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(), Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode(), Mod_Q3BSP_TraceLineOfSight_RecursiveNodeCheck(), Mod_ShadowMesh_CalcBBox(), Mod_VBSP_LoadFaces(), nearestplanedist_float(), Portal_CheckPolygon(), Portal_PolygonRecursiveMarkLeafs(), Portal_RecursiveFindLeafForFlow(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), R_BeginCoronaQuery(), R_BuildNormalizationCube(), R_DecalSystem_SpawnTriangle(), R_DecalSystem_SplatEntity(), R_DrawModelDecals_Entity(), R_DrawParticle_TransparentCallback(), R_DrawParticles(), R_HDR_UpdateIrisAdaptation(), R_MeshQueue_AddTransparent(), R_MeshQueue_BeginScene(), R_Model_Sprite_Draw_TransparentCallback(), R_MoveExplosion(), R_Q1BSP_CallRecursiveGetLightInfo(), R_SetupView(), R_Shadow_BounceGrid_Slice(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_ChooseSidesFromBox(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_DrawModelShadowMaps(), R_Shadow_LoadLightsFile(), R_Shadow_PrepareModelShadows(), R_Shadow_SelectLightInView(), R_StainNode(), R_UpdateFog(), R_View_SetFrustum(), R_Viewport_ApplyNearClipPlaneFloatGL(), R_Water_AddWaterPlane(), RSurf_FogPoint(), RSurf_FogVertex(), RSurf_PrepareVerticesForBatch(), shadebubble(), SV_Accelerate(), SV_AirAccelerate(), SV_CheckVelocity(), SV_FlyMove(), SV_NudgeOutOfSolid_PivotIsKnownGood(), SV_Physics_Toss(), SV_PushMove(), SV_WallFriction(), V_CalcRefdefUsing(), VectorNormalizeLength(), VM_CL_findradius(), VM_SV_aim(), and VM_SV_findradius().
#define invpow | ( | base, | |
number ) |
Definition at line 50 of file mathlib.h.
Referenced by VID_ApplyGammaToColor(), and VID_BuildGammaTables().
#define lhcheeserand | ( | seed | ) |
#define lhcheeserandom | ( | seed, | |
MIN, | |||
MAX ) |
#define lhrandom | ( | MIN, | |
MAX ) |
LadyHavoc: this function never returns exactly MIN or exactly MAX, because of a QuakeC bug in id1 where the line self.nextthink = self.nexthink + random() * 0.5; can result in 0 (self.nextthink is 0 at this point in the code to begin with), causing "stone monsters" that never spawned properly, also MAX is avoided because some people use random() as an index into arrays or for loop conditions, where hitting exactly MAX may be a fatal error.
Definition at line 48 of file mathlib.h.
Referenced by CDAudio_StartPlaylist(), CL_Beams_SetupBuiltinTexture(), CL_EntityParticles(), CL_NewParticle(), CL_NewParticlesFromEffectinfo(), CL_ParseStatic(), CL_ParticleCube(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_ParticleExplosion2(), CL_ParticleRain(), CL_RelinkBeams(), CL_Smoke(), CL_Sparks(), CL_SpawnDecalParticleForSurface(), Image_GenerateConChars(), particletextureblotch(), R_CanSeeBox(), R_DrawParticles(), R_MotionBlurView(), R_StainNode(), S_StartSound_StartPosition_Flags(), SV_CanSeeBox(), VID_BuildGammaTables(), VM_CL_makestatic(), and VM_random().
#define log2i | ( | n | ) |
#define M_PI 3.14159265358979323846 |
Definition at line 28 of file mathlib.h.
Referenced by AnglesFromVectors(), AngleVectors(), AngleVectorsDuke3DFLU(), AngleVectorsFLU(), CL_RelinkBeams(), CL_UpdateNetworkEntity(), CL_UpdateScreen(), M_ModList_Draw(), M_Options_PrintCheckbox(), M_Options_PrintCommand(), M_Options_PrintSlider(), M_ServerList_Draw(), Matrix4x4_CreateFromQuakeEntity(), Matrix4x4_CreateRotate(), Mod_AliasInit(), Mod_GenerateLightmaps_GridSample(), R_DrawParticle_TransparentCallback(), R_EvaluateQ3WaveFunc(), R_ExplosionVert(), R_RotateSprite(), R_TrackSprite(), RSurf_PrepareVerticesForBatch(), SCR_DrawNetGraph_DrawGraph(), SCR_DrawScreen(), skyspherecalc(), SND_Spatialize_WithSfx(), SV_SetIdealPitch(), SV_StepDirection(), V_CalcRefdefUsing(), VID_BuildGammaTables(), VM_CL_R_SetView(), VM_CL_walkmove(), VM_SV_walkmove(), and VM_vectoyaw().
#define max | ( | A, | |
B ) |
Definition at line 38 of file mathlib.h.
Referenced by BoxFromPoints(), BufStr_Expand(), BufStr_Set(), CL_AllocLightFlash(), CL_Cache_TraceLineSurfaces(), CL_ClientMovement_Physics_CPM_PM_Aircontrol(), CL_ClientMovement_Physics_PM_Accelerate(), CL_ClientMovement_Physics_PM_AirAccelerate(), CL_ClientMovement_Physics_Walk(), CL_DrawVideo(), CL_Effect(), CL_Frame(), CL_Input(), CL_IPLog_Add(), CL_LinkNetworkEntity(), CL_Locs_AddNode(), CL_NetworkTimeReceived(), CL_NewBeam(), CL_OpenVideo(), CL_ParseClientdata(), CL_ParticleRain(), CL_ReadDemoMessage(), CL_SelectTraceLine(), CL_SendMove(), CL_TraceBox(), CL_TraceLine(), CL_UpdateNetworkEntity(), CL_UpdateScreen(), CL_VideoStart(), Collision_NewBrushFromPlanes(), Crypto_ClientParsePacket(), Crypto_StoreHostKey(), EntityFrame5_LostFrame(), EntityFrame5_WriteFrame(), Font_LoadSize(), Font_Postprocess(), fractalnoise(), FS_Inflate(), FS_Search(), furthestplanedist_float(), GetMapList(), GL_Texture_CalcImageSize(), GrowBuf(), hmac(), jam_open(), jam_video(), libavw_decodeframe(), LibAvW_OpenVideo(), LoadFont(), LoadSubtitles(), M_Options_ColorControl_Draw(), M_Options_Draw(), M_Options_Effects_Draw(), M_Options_Graphics_Draw(), Mem_ExpandableArray_AllocRecord(), Mod_BSP_RecursiveRecalcNodeBBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLineShared(), Mod_DARKPLACESMODEL_Load(), Mod_Decompile_OBJ(), Mod_FrameGroupify_ParseGroups_Store(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateTriangleInformation(), Mod_GenerateLightmaps_LightmapSample(), Mod_IDS2_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_MakeCollisionBIH(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Mesh_AddSurface(), Mod_Mesh_AddTriangle(), Mod_Mesh_ComputeBounds(), Mod_Mesh_GetTexture(), Mod_Mesh_IndexForVertex(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_LoadTextures(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_LoadLightmaps(), Mod_Q3BSP_LoadPVS(), Mod_Sprite_SharedSetup(), Mod_VBSP_LoadFaces(), Mod_VertexRangeFromElements(), Mod_ZYMOTICMODEL_Load(), NetConn_ClientParsePacket(), OGG_LoadVorbisFile(), PRVM_CallProfile(), PRVM_MEM_Alloc(), PRVM_Profile(), PRVM_SetTempString(), PRVM_ShortStackTrace(), Q3PatchTesselateFloat(), R_AnimCache_GetEntity(), R_BufferData_Store(), R_BuildFogTexture(), R_DecalSystem_SpawnTriangle(), R_DrawModelDecals_Entity(), R_FrameData_Alloc(), R_HDR_UpdateIrisAdaptation(), R_Mesh_AddBrushMeshFromPlanes(), R_MeshQueue_AddTransparent(), R_Mod_GetLightInfo(), R_Model_Sprite_Draw_TransparentCallback(), R_MotionBlurView(), R_NewExplosion(), R_PicmipForFlags(), R_Q1BSP_CallRecursiveGetLightInfo(), R_Q1BSP_RecursiveGetLightInfo_BSP(), R_SetupShader_Surface(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_Slice(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_MakeTextures(), R_Shadow_PrepareLight(), R_Shadow_RenderLighting(), R_Shadow_UpdateWorldLight(), R_TimeReport_EndFrame(), R_UpdateFog(), R_UpdateTexture(), R_Water_AddWaterPlane(), RadiusFromBounds(), RadiusFromBoundsAndOrigin(), RSurf_FogPoint(), RSurf_FogVertex(), S_PaintAndSubmit(), S_SetUnderwaterIntensity(), S_SoftClipPaintBuffer(), S_Update(), S_UpdateAmbientSounds(), Sbar_DrawInventory(), Sbar_MiniDeathmatchOverlay(), Sbar_Score(), Sbar_ShowFPS(), Sbar_SoloScoreboard(), SCR_CaptureVideo_Ogg_BeginVideo(), SCR_DrawLoadingScreen(), SCR_DrawNetGraph(), SCR_DrawScreen(), SetMinMaxSize(), SetMinMaxSize(), SetMinMaxSizePRVM(), SHOWLMP_decodeshow(), SND_Spatialize_WithSfx(), SV_CanSeeBox(), SV_ExecuteClientMoves(), SV_Name_f(), SV_Physics(), SV_PrepareEntityForSending(), SV_RunThink(), SV_SendClientDatagram(), SV_TraceBox(), SV_TraceLine(), SV_TracePoint(), Sys_Con_NearestColor(), V_CalcRefdefUsing(), V_CalcViewBlend(), VID_ApplyDisplayMode_c(), VID_Mode(), VM_buf_loadfile(), VM_bufstr_add(), VM_CL_R_PolygonVertex(), VM_CL_skel_build(), VM_CL_skel_copybones(), VM_CL_skel_mul_bones(), VM_matchpattern(), VM_max(), VM_SV_skel_build(), VM_SV_skel_copybones(), VM_SV_skel_mul_bones(), World_EntitiesInBox(), and World_SetSize().
#define min | ( | A, | |
B ) |
Definition at line 37 of file mathlib.h.
Referenced by _Mem_Alloc(), BoxFromPoints(), CL_Cache_TraceLineSurfaces(), CL_ClientMovement_Physics_Swim(), CL_ClientMovement_Physics_Walk(), CL_DrawVideo(), CL_Frame(), CL_Locs_AddNode(), CL_Locs_Reload_f(), CL_NewParticle(), CL_NewParticlesFromEffectinfo(), CL_ParseServerMessage(), CL_ReadDemoMessage(), CL_SelectTraceLine(), CL_SendMove(), CL_TraceBox(), CL_TraceLine(), CL_UpdateNetworkEntity(), CL_UpdateScreen(), Collision_BoundingBoxOfBrushTraceSegment(), Collision_NewBrushFromPlanes(), Con_CenterPrintf(), Con_CompleteCommandLine(), Con_Quakebar(), CSQC_AddPrintText(), dpvsnprintf(), Font_Postprocess(), fractalnoise(), FS_Write(), GetMapList(), GL_Texture_CalcImageSize(), Host_Frame(), jam_video(), Key_Event(), libavw_decodeframe(), LoadSubtitles(), Log_Start(), M_GameOptions_Key(), M_Menu_GameOptions_f(), M_ModList_Draw(), M_ScanSaves(), M_ServerList_Draw(), Memory_Init_Commands(), Mod_BSP_RecursiveRecalcNodeBBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLineShared(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateTriangleInformation(), Mod_GenerateLightmaps_InitSampleOffsets(), Mod_LoadQ3Shaders(), Mod_MakeCollisionBIH(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_OBJ_Load(), Mod_Q1BSP_AmbientSoundLevelsForPoint(), Mod_Q1BSP_LoadFaces(), Mod_Q3BSP_Load(), Mod_Q3BSP_LoadFaces(), Mod_VBSP_LoadFaces(), Mod_VertexRangeFromElements(), Mod_ZYMOTICMODEL_Load(), ModList_RebuildList(), nearestplanedist_float(), NetConn_ClientParsePacket(), NetConn_ServerParsePacket(), OGG_LoadVorbisFile(), PK3_BuildFileList(), Portal_PortalThroughPortalPlanes(), PRVM_FreeString(), PRVM_GarbageCollection(), PRVM_MEM_IncreaseEdicts(), QW_CL_NextUpload_f(), R_Bloom_MakeTexture(), R_BuildLightMap(), R_CompleteLightPoint(), R_DrawParticle_TransparentCallback(), R_DrawParticles(), R_DrawPortal_Callback(), R_DrawSurface_TransparentCallback(), R_HDR_UpdateIrisAdaptation(), R_InitBloodTextures(), R_MeshQueue_RenderTransparent(), R_Mod_DrawLight(), R_Mod_GetLightInfo(), R_Q1BSP_CallRecursiveGetLightInfo(), R_Q1BSP_DrawLight_TransparentCallback(), R_Q1BSP_RecursiveGetLightInfo_BSP(), R_Shadow_BounceGrid_Slice(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_DrawCoronas(), R_UpdateTexture(), R_Water_AddWaterPlane(), RSurf_FogPoint(), RSurf_FogVertex(), RSurf_PrepareVerticesForBatch(), S_LoadWavFile(), S_MixToBuffer(), S_PaintAndSubmit(), S_SetUnderwaterIntensity(), Sbar_Draw(), Sbar_DrawFrags(), Sbar_MiniDeathmatchOverlay(), SCR_CaptureVideo_Avi_BeginVideo(), SCR_DrawConsole(), SCR_DrawLoadingScreen(), SCR_DrawScreen(), SetMinMaxSize(), SetMinMaxSize(), SetMinMaxSizePRVM(), SND_Spatialize_WithSfx(), SV_CanSeeBox(), SV_ExecuteClientMoves(), SV_Frame(), SV_Physics_Toss(), SV_PrepareEntityForSending(), SV_ReadClientMove(), SV_SendClientDatagram(), SV_ThreadFunc(), SV_TraceBox(), SV_TraceLine(), SV_TracePoint(), Sys_Con_NearestColor(), Sys_SDL_GetClipboardData(), V_CalcRefdefUsing(), VM_CL_skel_build(), VM_CL_skel_copybones(), VM_CL_skel_mul_bones(), VM_matchpattern(), VM_min(), VM_SV_skel_build(), VM_SV_skel_copybones(), VM_SV_skel_mul_bones(), and World_EntitiesInBox().
#define NUMVERTEXNORMALS 162 |
Definition at line 225 of file mathlib.h.
Referenced by CL_EntityParticles().
#define PlaneDiff | ( | point, | |
plane ) |
Definition at line 257 of file mathlib.h.
Referenced by Mod_BSP_FatPVS_RecursiveBSPNode(), Mod_BSP_FindNonSolidLocation_r(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_CullFrustumSides(), R_StainNode(), R_TrackSprite(), R_Water_AddWaterPlane(), and RSurf_FindWaterPlaneForSurface().
#define PlaneDist | ( | point, | |
plane ) |
Definition at line 256 of file mathlib.h.
Referenced by R_Q1BSP_RecursiveGetLightInfo_BSP().
Fast PointInfrontOfTriangle. subtracts v1 from v0 and v2, combined into a crossproduct, combined with a dotproduct of the light location relative to the first point of the triangle (any point works, since any triangle is obviously flat), and finally a comparison to determine if the light is infront of the triangle (the goal of this statement) we do not need to normalize the surface normal because both sides of the comparison use it, therefore they are both multiplied the same amount... furthermore a subtract can be done on the point to eliminate one dotproduct this is ((p - a) * cross(a-b,c-b))
Definition at line 143 of file mathlib.h.
Referenced by Portal_RecursiveFlow(), R_Q1BSP_RecursiveGetLightInfo_BIH(), R_Q1BSP_RecursiveGetLightInfo_BSP(), and R_Shadow_ChooseSidesFromBox().
#define Q_rint | ( | x | ) |
Definition at line 69 of file mathlib.h.
Referenced by MSG_WriteAngle16i(), MSG_WriteAngle8i(), MSG_WriteCoord13i(), and MSG_WriteCoord16i().
#define RAD2DEG | ( | a | ) |
Definition at line 124 of file mathlib.h.
Referenced by Collision_TraceBrushTriangleMeshFloat(), Portal_RecursiveFlow(), R_Q1BSP_RecursiveGetLightInfo_BSP(), and R_Shadow_ChooseSidesFromBox().
Definition at line 126 of file mathlib.h.
Referenced by clippointtosurface(), Collision_CalcPlanesForTriangleBrushFloat(), Mod_BuildNormals(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateTriangleInformation(), Mod_Q1BSP_LoadMapBrushes(), Portal_RecursiveFlow(), R_DecalSystem_SpawnTriangle(), R_Shadow_ChooseSidesFromBox(), R_Shadow_ComputeShadowCasterCullingPlanes(), and VM_getsurfacenormal().
#define Vector2Copy | ( | in, | |
out ) |
Definition at line 74 of file mathlib.h.
Referenced by Mod_LoadTextureFromQ3Shader(), Mod_OBJ_Load(), and VM_stringwidth().
#define Vector2Length | ( | a | ) |
Definition at line 79 of file mathlib.h.
Referenced by CL_ClientMovement_Physics_Walk(), and SV_UserFriction().
#define Vector2Negate | ( | in, | |
out ) |
#define Vector2Normalize2 | ( | v, | |
dest ) |
Definition at line 78 of file mathlib.h.
Referenced by VID_TouchscreenArea().
#define Vector2Scale | ( | in, | |
scale, | |||
out ) |
#define Vector4Clear | ( | a | ) |
Definition at line 82 of file mathlib.h.
Referenced by Collision_TraceBrushBrushFloat(), Collision_TraceLineBrushFloat(), Collision_TracePointBrushFloat(), R_BuildFogHeightTexture(), R_LoadTextureDDSFile(), and R_SkyStartFrame().
#define Vector4Copy | ( | in, | |
out ) |
Definition at line 84 of file mathlib.h.
Referenced by DrawQ_GetTextColor(), Image_GetEmbeddedPicBGRA(), Mod_LoadTextureFromQ3Shader(), Mod_PSKMODEL_Load(), R_DrawParticle_TransparentCallback(), R_DrawTextureSurfaceList_ShowSurfaces(), and R_DrawTextureSurfaceList_Sky().
#define Vector4Negate | ( | in, | |
out ) |
Definition at line 85 of file mathlib.h.
Referenced by Mod_INTERQUAKEMODEL_Load(), and Mod_PSKMODEL_Load().
#define Vector4Normalize2 | ( | v, | |
dest ) |
Definition at line 87 of file mathlib.h.
Referenced by Mod_INTERQUAKEMODEL_Load(), and Mod_PSKMODEL_Load().
#define Vector4Scale | ( | in, | |
scale, | |||
out ) |
Definition at line 86 of file mathlib.h.
Referenced by CL_Beam_AddQuad(), CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), DrawQ_GetTextColor(), Mod_GenerateLightmaps_UnweldTriangles(), Mod_LoadQ3Shaders(), Mod_Q1BSP_LoadTextures(), Palette_Load(), R_ClearScreen(), R_DebugLine(), R_DecalSystem_SplatEntities(), R_DrawEntityBBoxes_Callback(), R_DrawParticle_TransparentCallback(), R_DrawTextureSurfaceList_ShowSurfaces(), R_ScissorForBBox(), R_Shadow_ClearShadowMapTexture(), R_Shadow_DrawPrepass(), R_SkinFrame_LoadInternalUsingTexture(), R_UpdateFog(), R_Viewport_InitOrtho(), RSurf_PrepareVerticesForBatch(), and VM_CL_boxparticles().
Definition at line 100 of file mathlib.h.
Referenced by CL_CheckBottom(), CL_ClientMovement_Unstick(), CL_LinkEdict(), CL_movestep(), CL_Trace_Toss(), CL_TraceBox(), CL_TraceLine(), CL_TracePoint(), Collision_CalcPlanesForTriangleBrushFloat(), Collision_TranslateBrush(), Mod_BSP_FindNonSolidLocation(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_GenerateLightmaps_SamplePoint(), Mod_MDLMD2MD3_TraceBox(), Mod_Q1BSP_RoundUpToHullSize(), PHYS_TestEntityPosition(), Portal_CheckPolygon(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), R_DrawPortals(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_CalcBBoxSideMask(), R_Shadow_DrawModelShadowMaps(), R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(), R_Shadow_PrepareModelShadows(), R_View_SetFrustum(), R_Water_AddWaterPlane(), RSurf_PrepareVerticesForBatch(), SV_CheckBottom(), SV_LinkEdict(), SV_movestep(), SV_Physics_Follow(), SV_PlayerPhysics(), SV_PrepareEntityForSending(), SV_PushEntity(), SV_PushMove(), SV_Trace_Toss(), SV_TraceBox(), SV_WriteEntitiesToClient(), V_CalcRefdefUsing(), VM_CL_checkbottom(), VM_CL_checkpvs(), VM_CL_GetEntity(), VM_getsurfaceclippedpoint(), VM_SV_checkclient(), VM_SV_droptofloor(), and VM_SV_newcheckclient().
#define VectorCheeseRandom | ( | seed, | |
v ) |
Definition at line 172 of file mathlib.h.
Referenced by R_Shadow_BounceGrid_AssignPhotons_Task().
#define VectorClear | ( | a | ) |
Definition at line 97 of file mathlib.h.
Referenced by CL_ReadPointFile_f(), CL_SetEntityColormapColors(), CL_TraceLine(), CL_TracePoint(), CL_UpdatePrydonCursor(), Collision_CalcPlanesForTriangleBrushFloat(), Collision_ClipExtendFinish(), Collision_ClipTrace_Line_Sphere(), Collision_NewBrushFromPlanes(), Collision_TraceBrushBrushFloat(), Collision_TraceLineBrushFloat(), Collision_TracePointBrushFloat(), CSQC_AddRenderEdict(), Cvar_UpdateAutoCvar(), EntityFrame_Clear(), EntityFrame_WriteFrame(), EntityStateQW_ReadPlayerUpdate(), Math_atov(), Mod_Alias_CalculateBoundingBox(), Mod_BSP_FindNonSolidLocation(), Mod_INTERQUAKEMODEL_Load(), Mod_LoadModel(), Mod_MDL_AnimateVertices(), Mod_Mesh_ComputeBounds(), Mod_OBJ_Load(), Mod_Q1BSP_Load(), Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), Mod_Q3BSP_LightPoint(), Mod_Q3BSP_LoadFaces(), Mod_ShadowMesh_CalcBBox(), PHYS_UnstickEntityReturnOffset(), Portal_CheckPolygon(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), PRVM_Prog_Load(), R_DrawParticles(), R_DrawPortals(), R_Model_Sprite_Draw_TransparentCallback(), R_RealGetTexture(), R_SetupTexture(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_LoadWorldLights(), R_Shadow_RenderLighting(), R_Shadow_SetCursorLocationForView(), RSurf_PrepareVerticesForBatch(), Sbar_Draw(), SV_CheckVelocity(), SV_FlyMove(), SV_Physics_Toss(), SV_PushMove(), SV_SpawnServer(), SV_TraceLine(), SV_TracePoint(), SV_WalkMove(), SVVM_free_edict(), V_CalcRefdef(), V_CalcRefdefUsing(), VID_TouchscreenArea(), VM_CL_skel_get_boneabs(), VM_CL_skel_get_bonerel(), VM_ClearTraceGlobals(), VM_getsurfaceclippedpoint(), VM_getsurfacenormal(), VM_getsurfacepoint(), VM_getsurfacepointattribute(), VM_getsurfacetriangle(), VM_normalize(), VM_SV_getlight(), VM_SV_skel_get_boneabs(), and VM_SV_skel_get_bonerel().
Definition at line 113 of file mathlib.h.
Referenced by CL_Locs_Save_f(), CL_TraceBox(), CL_TraceLine(), CL_TracePoint(), Collision_BrushForBox(), EntityFrameQuake_WriteFrame(), EntityState5_DeltaBits(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TraceLineShared(), Mod_MDLMD2MD3_TraceBox(), Mod_OBJ_Load(), Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), PHYS_TestEntityPosition(), R_DrawLoc_Callback(), SV_Physics_ClientEntity(), SV_Physics_Entity(), SV_PrepareEntityForSending(), SV_TraceBox(), SV_TraceLine(), and SV_TracePoint().
#define VectorCopy | ( | in, | |
out ) |
Definition at line 101 of file mathlib.h.
Referenced by AnglesFromVectors(), applytransform_forward_normal(), BoxFromPoints(), CL_Beam_CalculatePositions(), CL_Cache_TraceLineSurfaces(), CL_ClientMovement_Move(), CL_ClientMovement_Physics_PM_Accelerate(), CL_ClientMovement_Physics_PM_AirAccelerate(), CL_ClientMovement_Physics_Swim(), CL_ClientMovement_Physics_Walk(), CL_ClientMovement_Replay(), CL_ClientMovement_Unstick(), CL_ClientMovement_UpdateStatus(), CL_DecayLightFlashes(), CL_Effect(), CL_GetEntityMatrix(), CL_GetTagMatrix(), CL_ImmediateBloodStain(), CL_LinkEdict(), CL_MeshEntities_Scene_FinalizeRenderEntity(), CL_MoveLerpEntityStates(), CL_movestep(), CL_NetworkTimeReceived(), CL_NewBeam(), CL_NewParticle(), CL_NewParticlesFromEffectinfo(), CL_ParseClientdata(), CL_ParseServerMessage(), CL_ReadDemoMessage(), CL_ReadPointFile_f(), CL_RelinkBeams(), CL_RotateMoves(), CL_SelectTraceLine(), CL_SendMove(), CL_SpawnDecalParticleForPoint(), CL_Trace_Toss(), CL_TraceBox(), CL_TraceLine(), CL_TracePoint(), CL_UpdateEntityShading_GetDirectedFullbright(), CL_UpdateNetworkEntity(), CL_UpdateNetworkEntityTrail(), CL_UpdatePrydonCursor(), CL_VM_Event_Sound(), CL_VM_GetEntitySoundOrigin(), CL_VM_Init(), CL_VM_TransformView(), CL_VM_UpdateDmgGlobals(), clippointtosurface(), Collision_BoundingBoxOfBrushTraceSegment(), Collision_BrushForBox(), Collision_Cache_Lookup(), Collision_CalcPlanesForTriangleBrushFloat(), Collision_ClipExtendPrepare(), Collision_ClipPointToGenericEntity(), Collision_ClipPointToWorld(), Collision_ClipTrace_Box(), Collision_ClipTrace_Line_Sphere(), Collision_CombineTraces(), Collision_NewBrushFromPlanes(), Collision_TraceBrushBrushFloat(), Collision_TraceBrushTriangleFloat(), Collision_TraceBrushTriangleMeshFloat(), Collision_TraceLineBrushFloat(), Collision_TracePointBrushFloat(), Collision_TransformBrush(), Con_MaskPrint(), CSQC_AddRenderEdict(), CSQC_SetGlobals(), Cvar_UpdateAutoCvar(), DropPunchAngle(), EntityFrame_AddFrame_Client(), EntityFrame_AddFrame_Server(), EntityFrame_Clear(), EntityFrame_FetchFrame(), EntityStateQW_ReadPlayerUpdate(), getdrawfontscale(), Mod_Alias_CalculateBoundingBox(), Mod_BSP_FinalizePortals(), Mod_BSP_FindNonSolidLocation(), Mod_BSP_FindNonSolidLocation_r_Triangle(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLineShared(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateLights_ComputeSVBSP(), Mod_GenerateLightmaps_CreateLights_ComputeSVBSP_InsertSurfaces(), Mod_GenerateLightmaps_CreateTriangleInformation(), Mod_GenerateLightmaps_GridSample(), Mod_GenerateLightmaps_LightmapSample(), Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_VertexSample(), Mod_INTERQUAKEMODEL_Load(), Mod_MakeCollisionBIH(), Mod_Mesh_ComputeBounds(), Mod_OBJ_Load(), Mod_Q1BSP_Load(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_RecursiveHullCheckPoint(), Mod_Q1BSP_RoundUpToHullSize(), Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), Mod_Q1BSP_TraceLineAgainstSurfaces(), Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(), Mod_Q1BSP_TracePoint(), Mod_Q2BSP_Load(), Mod_Q2BSP_LoadBrushes(), Mod_Q3BSP_Load(), Mod_Q3BSP_LoadBrushes(), Mod_Q3BSP_LoadEntities(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_TraceLineOfSight(), Mod_Q3BSP_TraceLineOfSight_RecursiveNodeCheck(), Mod_RemoveDegenerateTriangles(), Mod_ShadowMesh_CalcBBox(), Mod_VBSP_LoadFaces(), Palette_Load(), PHYS_NudgeOutOfSolid(), PHYS_TestEntityPosition(), PHYS_UnstickEntityReturnOffset(), Portal_RecursiveFlow(), Portal_Visibility(), R_BuildLightMap(), R_CanSeeBox(), R_ClearScreen(), R_DecalSystem_SplatEntities(), R_DecalSystem_SplatTriangle(), R_DrawDebugModel(), R_DrawLoc_Callback(), R_DrawModelDecals_Entity(), R_DrawParticles(), R_DrawPortal_Callback(), R_DrawTextureSurfaceList_Sky(), R_HDR_UpdateIrisAdaptation(), R_Mesh_AddVertex(), R_Mod_GetLightInfo(), R_Model_Sprite_Draw_TransparentCallback(), R_MotionBlurView(), R_MoveExplosion(), R_NewExplosion(), R_Q1BSP_CallRecursiveGetLightInfo(), R_Q1BSP_RecursiveGetLightInfo_BIH(), R_Q1BSP_RecursiveGetLightInfo_BSP(), R_RotateSprite(), R_RTLight_Update(), R_ScissorForBBox(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_BlurPixels_Task(), R_Shadow_BounceGrid_BlurPixelsInDirection(), R_Shadow_BounceGrid_ConvertPixelsAndUpload(), R_Shadow_BounceGrid_Slice(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_DrawModelShadowMaps(), R_Shadow_DrawWorldLight(), R_Shadow_EditLights_CopyInfo_f(), R_Shadow_EditLights_Edit_f(), R_Shadow_GetRTLightInfo(), R_Shadow_PrepareLight(), R_Shadow_PrepareModelShadows(), R_Shadow_UpdateWorldLight(), R_SkinFrame_LoadExternal_SkinFrame(), R_StainNode(), R_TrackSprite(), R_UpdateFog(), R_View_SetFrustum(), R_Water_AddWaterPlane(), RotateBBox(), RotatePointAroundVector(), RSurf_PrepareVerticesForBatch(), S_PlaySfxOnChannel(), SetMinMaxSize(), SetMinMaxSize(), SetMinMaxSizePRVM(), SV_AirMove(), SV_ApplyClientMove(), SV_CanSeeBox(), SV_CheckWaterTransition(), SV_CreateBaseline(), SV_EntitiesInBox(), SV_FlyMove(), SV_Impact(), SV_LinkEdict(), SV_LinkEdict_TouchAreaGrid_Call(), SV_movestep(), SV_NudgeOutOfSolid_PivotIsKnownGood(), SV_Physics_ClientEntity(), SV_Physics_ClientEntity_PostThink(), SV_Physics_ClientMove(), SV_Physics_Entity(), SV_Physics_Step(), SV_PlayerPhysics(), SV_PrepareEntityForSending(), SV_PushEntity(), SV_PushMove(), SV_SpawnServer(), SV_StepDirection(), SV_Trace_Toss(), SV_TraceBox(), SV_TraceLine(), SV_TracePoint(), SV_UnstickEntity(), SV_WalkMove(), SV_WallFriction(), SV_WaterMove(), SV_WriteClientdataToMessage(), SV_WriteEntitiesToClient(), V_CalcIntermissionRefdef(), V_CalcRefdef(), V_CalcRefdefUsing(), VID_TouchscreenArea(), VM_CL_ambientsound(), VM_CL_boxparticles(), VM_CL_checkpvs(), VM_CL_droptofloor(), VM_CL_effect(), VM_CL_findradius(), VM_CL_GetEntity(), VM_CL_getinputstate(), VM_CL_getlight(), VM_CL_gettaginfo(), VM_CL_makestatic(), VM_CL_makevectors(), VM_CL_particle(), VM_CL_pointcontents(), VM_CL_pointparticles(), VM_CL_pointsound(), VM_CL_project(), VM_CL_R_AddDynamicLight(), VM_CL_R_ClearScene(), VM_CL_R_SetView(), VM_CL_RotateMoves(), VM_CL_runplayerphysics(), VM_CL_setlistener(), VM_CL_setorigin(), VM_CL_setsize(), VM_CL_skel_get_boneabs(), VM_CL_skel_get_bonerel(), VM_CL_skel_mul_bone(), VM_CL_skel_mul_bones(), VM_CL_skel_set_bone(), VM_CL_SpawnParticle(), VM_CL_SpawnParticleDelayed(), VM_CL_te_beam(), VM_CL_te_blood(), VM_CL_te_bloodshower(), VM_CL_te_customflash(), VM_CL_te_explosion(), VM_CL_te_explosion2(), VM_CL_te_explosionquad(), VM_CL_te_explosionrgb(), VM_CL_te_flamejet(), VM_CL_te_gunshot(), VM_CL_te_gunshotquad(), VM_CL_te_knightspike(), VM_CL_te_lavasplash(), VM_CL_te_lightning1(), VM_CL_te_lightning2(), VM_CL_te_lightning3(), VM_CL_te_particlecube(), VM_CL_te_particlerain(), VM_CL_te_particlesnow(), VM_CL_te_plasmaburn(), VM_CL_te_smallflash(), VM_CL_te_spark(), VM_CL_te_spike(), VM_CL_te_spikequad(), VM_CL_te_superspike(), VM_CL_te_superspikequad(), VM_CL_te_tarexplosion(), VM_CL_te_teleport(), VM_CL_te_wizspike(), VM_CL_tracebox(), VM_CL_traceline(), VM_CL_trailparticles(), VM_CL_unproject(), VM_CL_V_CalcRefdef(), VM_drawcolorcodedstring(), VM_getsurfaceclippedpoint(), VM_getsurfacenearpoint(), VM_getsurfacenormal(), VM_getsurfacepoint(), VM_getsurfacepointattribute(), VM_makevectors(), VM_normalize(), VM_physics_addforce(), VM_physics_addtorque(), VM_randomvec(), VM_SetTraceGlobals(), VM_SV_aim(), VM_SV_ambientsound(), VM_SV_checkpvs(), VM_SV_droptofloor(), VM_SV_effect(), VM_SV_findradius(), VM_SV_getlight(), VM_SV_gettaginfo(), VM_SV_particle(), VM_SV_pointcontents(), VM_SV_pointparticles(), VM_SV_pointsound(), VM_SV_setorigin(), VM_SV_setsize(), VM_SV_skel_get_boneabs(), VM_SV_skel_get_bonerel(), VM_SV_skel_mul_bone(), VM_SV_skel_mul_bones(), VM_SV_skel_set_bone(), VM_SV_tracebox(), VM_SV_traceline(), VM_SV_trailparticles(), VM_vectoangles(), VM_vectorvectors(), World_EntitiesInBox(), World_LinkEdict(), and World_SetSize().
Definition at line 108 of file mathlib.h.
Referenced by AnglesFromVectors(), EntityState5_Priority(), R_MeshQueue_AddTransparent(), R_Shadow_PrepareLight(), RSurf_FogPoint(), and RSurf_FogVertex().
Definition at line 107 of file mathlib.h.
Referenced by CL_Locs_FindNearest(), clippointtosurface(), Collision_NewBrushFromPlanes(), PHYS_TestEntityPosition(), R_DrawParticles(), R_Mesh_AddVertex(), R_Shadow_PrepareLight(), and RSurf_PrepareVerticesForBatch().
#define VectorLehmerRandom | ( | seed, | |
v ) |
Definition at line 173 of file mathlib.h.
Referenced by R_Shadow_BounceGrid_AssignPhotons_Task().
#define VectorLength | ( | a | ) |
Definition at line 109 of file mathlib.h.
Referenced by CL_Beam_CalculatePositions(), CL_ClientMovement_Physics_PM_Accelerate(), CL_ClientMovement_Physics_PM_AirAccelerate(), CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), Collision_ClipExtendPrepare(), Collision_ClipTrace_Line_Sphere(), Mod_DARKPLACESMODEL_Load(), Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_SamplePoint(), Mod_ZYMOTICMODEL_Load(), R_BeginCoronaQuery(), R_BuildLightMap(), R_CompleteLightPoint(), R_DrawCorona(), R_DrawParticle_TransparentCallback(), R_DrawParticles(), R_HDR_UpdateIrisAdaptation(), R_MotionBlurView(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_Slice(), R_Shadow_DrawLightSprite_TransparentCallback(), R_TrackSprite(), Sbar_ShowFPS(), SND_Spatialize_WithSfx(), SV_WaterMove(), and VM_vlen().
#define VectorLength2 | ( | a | ) |
Definition at line 110 of file mathlib.h.
Referenced by CL_ClientMovement_Move(), CL_ClientMovement_Physics_PM_Accelerate(), CL_ClientMovement_Physics_Walk(), CL_UpdateEntityShading_Entity(), Collision_ClipTrace_Line_Sphere(), Collision_CombineTraces(), Collision_TraceBrushBrushFloat(), CSQC_AddRenderEdict(), getdrawfontscale(), Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_SamplePoint(), Mod_OBJ_Load(), Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), Mod_RemoveDegenerateTriangles(), R_CompleteLightPoint(), R_DrawParticles(), R_GetCurrentTexture(), R_SetupShader_Surface(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_BounceGrid_ConvertPixelsAndUpload(), R_Shadow_BounceGrid_Slice(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_CullFrustumSides(), R_Shadow_PrepareLight(), R_Shadow_RenderLighting(), RSurf_PrepareVerticesForBatch(), SV_CheckVelocity(), SV_PrepareEntityForSending(), SV_PushMove(), VM_CL_makestatic(), VM_getsurfacenearpoint(), VM_normalize(), and VM_SV_pointparticles().
Definition at line 120 of file mathlib.h.
Referenced by CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), CL_SelectTraceLine(), CL_UpdateNetworkEntity(), Collision_BoundingBoxOfBrushTraceSegment(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLineShared(), Mod_GenerateLightmaps_SamplePoint(), Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), Mod_Q3BSP_TraceLineOfSight_RecursiveNodeCheck(), R_DrawEntityBBoxes(), R_DrawLocs(), R_ScissorForBBox(), R_Shadow_BounceGrid_Slice(), RSurf_PrepareVerticesForBatch(), SV_PushMove(), and V_CalcViewBlend().
#define VectorM | ( | scale1, | |
b1, | |||
out ) |
Definition at line 115 of file mathlib.h.
Referenced by CL_Beam_AddPolygons(), Mod_CollisionBIH_TraceBrush(), R_Shadow_DrawModelShadowMaps(), R_Shadow_PrepareModelShadows(), and R_Shadow_RenderLighting().
Definition at line 114 of file mathlib.h.
Referenced by CL_Beam_AddPolygons(), CL_ClientMovement_Move(), CL_ClientMovement_Physics_PM_Accelerate(), CL_ClientMovement_Physics_PM_AirAccelerate(), CL_ClientMovement_Physics_Swim(), CL_ClientMovement_Physics_Walk(), CL_ClientMovement_UpdateStatus(), CL_LinkNetworkEntity(), CL_NewParticle(), CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_RelinkBeams(), CL_SpawnDecalParticleForPoint(), CL_Trace_Toss(), CL_UpdateNetworkEntity(), CL_UpdateRenderEntity(), clippointtosurface(), ClipVelocity(), Collision_ClipExtendFinish(), Collision_ClipExtendPrepare(), Collision_ClipTrace_Line_Sphere(), Mod_BSP_FindNonSolidLocation_r_Triangle(), Mod_BSP_LightPoint_RecursiveBSPNode(), Mod_BuildTextureVectorsFromNormals(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_GridSample(), Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_SamplePoint(), Mod_MD3_AnimateVertices(), Mod_MDL_AnimateVertices(), Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_TraceLineAgainstSurfaces(), Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode(), Mod_Q3BSP_LightPoint(), PHYS_NudgeOutOfSolid(), R_BeginCoronaQuery(), R_DecalSystem_SplatTriangle(), R_DrawDebugModel(), R_DrawLoc_Callback(), R_DrawParticle_TransparentCallback(), R_DrawParticles(), R_Model_Sprite_Draw_TransparentCallback(), R_MoveExplosion(), R_NewExplosion(), R_RotateSprite(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_DrawModelShadowMaps(), R_Shadow_PrepareModelShadows(), R_Shadow_SetCursorLocationForView(), R_TrackSprite(), RSurf_PrepareVerticesForBatch(), SV_NudgeOutOfSolid_PivotIsKnownGood(), SV_Physics_ClientEntity(), SV_Physics_ClientEntity_NoThink(), SV_Physics_Entity(), SV_Physics_Toss(), SV_PrepareEntityForSending(), SV_PushMove(), SV_Trace_Toss(), SV_WriteEntitiesToClient(), V_CalcRefdefUsing(), VM_CL_GetEntity(), VM_CL_getlight(), VM_getsurfacetriangle(), VM_SV_aim(), and VM_SV_getlight().
#define VectorMAM | ( | scale1, | |
b1, | |||
scale2, | |||
b2, | |||
out ) |
Definition at line 116 of file mathlib.h.
Referenced by CL_Beam_AddPolygons(), CL_ClientMovement_Physics_CPM_PM_Aircontrol(), CL_ClientMovement_Physics_Walk(), CL_LinkNetworkEntity(), CL_NewParticlesFromEffectinfo(), CL_ParticleCube(), CL_Smoke(), CL_Sparks(), CL_UpdateNetworkEntity(), CL_UpdateNetworkEntityTrail(), R_CanSeeBox(), R_DrawParticle_TransparentCallback(), R_DrawTextureSurfaceList_ShowSurfaces(), R_Model_Sprite_Draw_TransparentCallback(), R_Shadow_RenderLighting(), R_Water_AddWaterPlane(), SND_Spatialize_WithSfx(), SV_CanSeeBox(), SV_PrepareEntityForSending(), and V_CalcViewBlend().
#define VectorMAMAM | ( | scale1, | |
b1, | |||
scale2, | |||
b2, | |||
scale3, | |||
b3, | |||
out ) |
Definition at line 117 of file mathlib.h.
Referenced by CL_ClientMovement_Physics_Swim(), CL_NewParticlesFromEffectinfo(), CL_VM_GetEntitySoundOrigin(), Mod_Q1BSP_AssignNoShadowSkySurfaces(), Mod_Q1BSP_TraceBox(), R_Model_Sprite_Draw_TransparentCallback(), R_View_SetFrustum(), RSurf_PrepareVerticesForBatch(), V_CalcRefdefUsing(), VM_CL_findradius(), and VM_SV_findradius().
#define VectorMAMAMAM | ( | scale1, | |
b1, | |||
scale2, | |||
b2, | |||
scale3, | |||
b3, | |||
scale4, | |||
b4, | |||
out ) |
Definition at line 118 of file mathlib.h.
Referenced by CL_NewParticlesFromEffectinfo(), RSurf_PrepareVerticesForBatch(), and V_MakeViewIsometric().
Definition at line 102 of file mathlib.h.
Referenced by R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_RenderLighting(), RadiusFromBounds(), and RadiusFromBoundsAndOrigin().
Definition at line 95 of file mathlib.h.
Referenced by CL_UpdateEntityShading_GetDirectedFullbright(), Collision_CalcPlanesForTriangleBrushFloat(), Collision_NewBrushFromPlanes(), Mod_BSP_FinalizePortals(), Mod_BSP_RecursiveNodePortals(), Mod_BuildTextureVectorsFromNormals(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_Q1BSP_RecursiveHullCheck(), R_DecalSystem_SplatEntity(), R_DrawCorona(), R_RenderView_UpdateViewVectors(), R_ScissorForBBox(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_RenderLighting(), R_View_SetFrustum(), R_Water_AddWaterPlane(), R_Water_ProcessPlanes(), RSurf_PrepareVerticesForBatch(), SV_Impact(), SV_PushMove(), VM_CL_GetEntity(), VM_CL_makestatic(), VM_CL_setlistener(), VM_CL_skel_get_boneabs(), VM_CL_skel_get_bonerel(), VM_CL_skel_mul_bone(), VM_CL_skel_mul_bones(), VM_CL_skel_set_bone(), VM_SV_gettaginfo(), VM_SV_skel_get_boneabs(), VM_SV_skel_get_bonerel(), VM_SV_skel_mul_bone(), VM_SV_skel_mul_bones(), VM_SV_skel_set_bone(), and World_SetSize().
#define VectorNormalize | ( | v | ) |
Definition at line 104 of file mathlib.h.
Referenced by AnglesFromVectors(), CL_Beam_AddPolygons(), CL_Beam_AddQuad(), CL_Beam_CalculatePositions(), CL_ClientMovement_Physics_CPM_PM_Aircontrol(), CL_ClientMovement_Physics_Walk(), CL_ImmediateBloodStain(), CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), CL_UpdateEntityShading_Entity(), clippointtosurface(), Collision_CalcPlanesForTriangleBrushFloat(), Collision_ClipTrace_Line_Sphere(), Collision_NewBrushFromPlanes(), Collision_TraceBrushBrushFloat(), Image_HeightmapToNormalmap_BGRA(), Mod_BSP_FindNonSolidLocation_r_Triangle(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_DARKPLACESMODEL_Load(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_GridSample(), Mod_GenerateLightmaps_LightmapSample(), Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_SamplePoint(), Mod_Q3BSP_LightPoint(), Mod_ZYMOTICMODEL_Load(), Portal_CheckPolygon(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), R_BuildLightMap(), R_CalcBeam_Vertex3f(), R_CompleteLightPoint(), R_DecalSystem_SpawnTriangle(), R_DecalSystem_SplatEntity(), R_DrawParticle_TransparentCallback(), R_DrawParticles(), R_InitParticleTexture(), R_Model_Sprite_Draw_TransparentCallback(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_ConvertPixelsAndUpload(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_DrawLightSprite_TransparentCallback(), R_Shadow_DrawModelShadowMaps(), R_Shadow_PrepareModelShadows(), R_View_SetFrustum(), R_Water_AddWaterPlane(), RSurf_PrepareVerticesForBatch(), shadebubble(), SND_Spatialize_WithSfx(), SV_FlyMove(), SV_WaterMove(), V_ParseDamage(), VectorVectors(), VectorVectorsDouble(), VM_getsurfacenormal(), and VM_SV_aim().
#define VectorNormalize2 | ( | v, | |
dest ) |
Definition at line 105 of file mathlib.h.
Referenced by CL_ClientMovement_Physics_PM_AirAccelerate(), R_DrawParticle_TransparentCallback(), and VM_vectorvectors().
#define VectorNormalizeDouble | ( | v | ) |
#define VectorRandom | ( | v | ) |
Definition at line 119 of file mathlib.h.
Referenced by CL_NewParticle(), CL_NewParticlesFromEffectinfo(), CL_ParticleExplosion(), CL_SpawnDecalParticleForPoint(), Mod_GenerateLightmaps_InitSampleOffsets(), and VM_randomvec().
Definition at line 121 of file mathlib.h.
Referenced by R_Shadow_BounceGrid_TracePhotons_Shot(), and RSurf_PrepareVerticesForBatch().
#define VectorScale | ( | in, | |
scale, | |||
out ) |
Definition at line 111 of file mathlib.h.
Referenced by AnglesFromVectors(), CL_Beam_AddPolygons(), CL_ClientMovement_Physics_CPM_PM_Aircontrol(), CL_ClientMovement_Physics_PM_Accelerate(), CL_ClientMovement_Physics_PM_AirAccelerate(), CL_ClientMovement_Physics_Swim(), CL_ClientMovement_Physics_Walk(), CL_DecayLightFlashes(), CL_GetEntityMatrix(), CL_LinkNetworkEntity(), CL_Locs_Reload_f(), CL_ParticleExplosion(), CL_SetEntityColormapColors(), CL_Trace_Toss(), CL_UpdateNetworkEntity(), CL_UpdateNetworkEntityTrail(), CL_VM_TransformView(), Collision_ClipTrace_Line_Sphere(), Collision_TraceLineTriangleFloat(), Con_MaskPrint(), DropPunchAngle(), Matrix4x4_QuakeToDuke3D(), Mod_BSP_FindNonSolidLocation_r_Triangle(), Mod_GenerateLightmaps_GridSample(), Mod_GenerateLightmaps_InitSampleOffsets(), Mod_GenerateLightmaps_LightmapSample(), Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_SamplePoint(), Mod_MD3_AnimateVertices(), Mod_MDL_AnimateVertices(), Portal_CheckPolygon(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), R_DecalSystem_SplatEntity(), R_DrawCorona(), R_DrawModelDecals_Entity(), R_DrawParticle_TransparentCallback(), R_DrawParticles(), R_DrawPortals(), R_DrawTextureSurfaceList_ShowSurfaces(), R_Model_Sprite_Draw_TransparentCallback(), R_NewExplosion(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_BounceGrid_Slice(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_CalcBBoxSideMask(), R_Shadow_DrawLightSprite_TransparentCallback(), R_Shadow_LoadLightsFile(), R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(), R_Shadow_PrepareLight(), R_Shadow_PrepareLights(), R_UpdateFog(), R_View_SetFrustum(), R_Viewport_ApplyNearClipPlaneFloatGL(), RSurf_PrepareVerticesForBatch(), SND_Spatialize_WithSfx(), SV_AirMove(), SV_FlyMove(), SV_Physics_Toss(), SV_PushMove(), SV_Trace_Toss(), SV_UserFriction(), SV_WallFriction(), SV_WaterMove(), V_CalcRefdefUsing(), V_CalcViewBlend(), VectorNormalizeLength(), VM_CL_gettaginfo(), VM_CL_R_AddDynamicLight(), VM_CL_R_SetView(), VM_normalize(), and VM_SV_aim().
#define VectorScaleCast | ( | in, | |
scale, | |||
outtype, | |||
out ) |
Definition at line 96 of file mathlib.h.
Referenced by CL_AddQWCTFFlagModel(), CL_Beam_CalculatePositions(), CL_ClearState(), CL_ClientMovement_Move(), CL_ClientMovement_Physics_Swim(), CL_ClientMovement_Physics_Walk(), CL_ClientMovement_UpdateStatus(), CL_LinkNetworkEntity(), CL_Locs_AddNode(), CL_MeshEntities_Init(), CL_NewTempEntity(), CL_ParseTempEntity(), CL_ParticleEffect_Fallback(), CL_ParticleRain(), CL_RelinkBeams(), CL_RelinkEffects(), CL_RelinkQWNails(), CL_RelinkStaticEntities(), CL_RelinkWorld(), CL_UpdateEntityShading_Entity(), CL_UpdateEntityShading_GetDirectedFullbright(), CL_UpdateNetworkEntity(), CL_UpdatePrydonCursor(), CL_VM_DrawHud(), Collision_BrushForBox(), CSQC_AddRenderEdict(), CSQC_SetGlobals(), EntityFrame_WriteFrame(), Matrix4x4_QuakeToDuke3D(), Mod_BSP_FinalizePortals(), Mod_BSP_LightPoint(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_GenerateLightmaps_CreateLights_ComputeSVBSP(), Mod_GenerateLightmaps_LightmapSample(), Mod_LoadModel(), Mod_Mesh_ComputeBounds(), Mod_Mesh_IndexForVertex(), Mod_Q1BSP_Load(), Mod_Q3BSP_LoadEntities(), R_CanSeeBox(), R_DrawLoc_Callback(), R_Mesh_AddVertex(), R_Shadow_BounceGrid_ConvertPixelsAndUpload(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_DrawLightSprite_TransparentCallback(), R_tcMod_ApplyToMatrix(), R_Viewport_ApplyNearClipPlaneFloatGL(), Sbar_ShowFPS(), SV_ApplyClientMove(), SV_CanSeeBox(), SV_Ent_Create_f(), SV_Ent_Remove_f(), SV_FlyMove(), SV_LinkEdict_TouchAreaGrid_Call(), SV_WalkMove(), V_CalcRefdefUsing(), VectorVectors(), VectorVectorsDouble(), VM_CL_getmousepos(), VM_CL_makestatic(), VM_CL_ParticleThemeToGlobals(), VM_CL_project(), VM_CL_R_SetView(), VM_CL_unproject(), VM_getsurfacepointattribute(), and VM_M_getmousepos().
Definition at line 99 of file mathlib.h.
Referenced by CL_Beam_AddPolygons(), CL_Beam_AddQuad(), CL_Beam_CalculatePositions(), CL_ClientMovement_Physics_PM_AirAccelerate(), CL_MoveLerpEntityStates(), CL_NewParticlesFromEffectinfo(), CL_ParticleEffect_Fallback(), CL_ParticleExplosion(), CL_RelinkBeams(), CL_TraceBox(), CL_UpdateNetworkEntity(), CL_UpdateNetworkEntityTrail(), clippointtosurface(), Collision_CalcEdgeDirsForPolygonBrushFloat(), Collision_CalcPlanesForTriangleBrushFloat(), Collision_ClipExtendPrepare(), Collision_ClipTrace_Box(), Collision_ClipTrace_Line_Sphere(), Collision_NewBrushFromPlanes(), Collision_TraceLineTriangleFloat(), Mod_BSP_FindNonSolidLocation_r_Triangle(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_TraceBrush(), Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_SamplePoint(), Mod_MDLMD2MD3_TraceBox(), Mod_Q1BSP_LoadClipnodes(), Mod_Q1BSP_RoundUpToHullSize(), Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), Mod_Q1BSP_TraceLineAgainstSurfaces(), Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(), Mod_RemoveDegenerateTriangles(), Mod_ShadowMesh_CalcBBox(), PHYS_TestEntityPosition(), Portal_CheckPolygon(), Portal_RecursiveFlowSearch(), R_CalcBeam_Vertex3f(), R_CompleteLightPoint(), R_DrawLoc_Callback(), R_DrawParticle_TransparentCallback(), R_Model_Sprite_Draw_TransparentCallback(), R_Shadow_BounceGrid_Slice(), R_Shadow_BounceGrid_TracePhotons_Shot(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_CalcBBoxSideMask(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_CullFrustumSides(), R_Shadow_SelectLightInView(), R_TrackSprite(), RadiusFromBoundsAndOrigin(), RSurf_PrepareVerticesForBatch(), SetMinMaxSize(), SetMinMaxSizePRVM(), SND_Spatialize_WithSfx(), SV_NudgeOutOfSolid_PivotIsKnownGood(), SV_PushMove(), SV_TraceBox(), SV_UnstickEntity(), SV_WallFriction(), V_CalcRefdefUsing(), VM_CL_findradius(), VM_getsurfacenearpoint(), VM_SV_aim(), VM_SV_droptofloor(), and VM_SV_findradius().
LadyHavoc: builds a [3][4] matrix.
LadyHavoc: calculates pitch/yaw/roll angles from forward and up vectors.
Definition at line 650 of file mathlib.c.
References angles, AngleVectors(), Con_Printf(), cos(), DotProduct, forward, M_PI, PITCH, ROLL, sin(), sqrt(), up, VectorCopy, VectorDistance, VectorNormalize, VectorScale, and YAW.
Referenced by CL_NewParticlesFromEffectinfo(), CL_RotateMoves(), CL_UpdateNetworkEntity(), CL_VM_TransformView(), Matrix4x4_QuakeToDuke3D(), Mod_Decompile_SMD(), R_DecalSystem_SplatEntity(), and VM_vectoangles().
Definition at line 444 of file mathlib.c.
References angles, cos(), forward, M_PI, PITCH, right, ROLL, sin(), up, and YAW.
Referenced by AnglesFromVectors(), CL_ClientMovement_Physics_Swim(), CL_ClientMovement_Physics_Walk(), CL_NewParticlesFromEffectinfo(), CL_RotateMoves(), CL_UpdateEntityShading_GetDirectedFullbright(), CL_UpdateNetworkEntity(), Com_CalcRoll(), R_DecalSystem_SplatEntity(), SV_AirMove(), SV_Physics_Follow(), SV_WallFriction(), SV_WaterMove(), V_CalcRefdefUsing(), VM_CL_makevectors(), and VM_makevectors().
void AngleVectorsDuke3DFLU | ( | const vec3_t | angles, |
vec3_t | forward, | ||
vec3_t | left, | ||
vec3_t | up, | ||
double | maxShearAngle ) |
divVerent: improper matrix version of AngleVectors
Definition at line 552 of file mathlib.c.
References angles, cos(), f, fabs(), forward, M_PI, PITCH, ROLL, sin(), sqrt(), up, x, y, and YAW.
Referenced by Matrix4x4_QuakeToDuke3D().
LadyHavoc: proper matrix version of AngleVectors.
Definition at line 498 of file mathlib.c.
References angles, cos(), forward, M_PI, PITCH, ROLL, sin(), up, and YAW.
Referenced by SV_PushMove(), and VM_CL_RotateMoves().
Definition at line 877 of file mathlib.c.
References i, max, maxs, min, mins, and VectorCopy.
Referenced by Mod_BSP_FinalizePortals(), Mod_Q1BSP_LoadFaces(), and Mod_VBSP_LoadFaces().
int BoxOnPlaneSide_Separate | ( | const vec3_t | emins, |
const vec3_t | emaxs, | ||
const vec3_t | normal, | ||
const vec_t | dist ) |
void BoxPlaneCornerDistances | ( | const vec3_t | emins, |
const vec3_t | emaxs, | ||
const struct mplane_s * | p, | ||
vec_t * | outnear, | ||
vec_t * | outfar ) |
void BoxPlaneCornerDistances_Separate | ( | const vec3_t | emins, |
const vec3_t | emaxs, | ||
const vec3_t | normal, | ||
vec_t * | outnear, | ||
vec_t * | outfar ) |
Definition at line 428 of file mathlib.c.
References normal.
void BoxPlaneCorners | ( | const vec3_t | emins, |
const vec3_t | emaxs, | ||
const struct mplane_s * | p, | ||
vec3_t | outnear, | ||
vec3_t | outfar ) |
void BoxPlaneCorners_Separate | ( | const vec3_t | emins, |
const vec3_t | emaxs, | ||
const vec3_t | normal, | ||
vec3_t | outnear, | ||
vec3_t | outfar ) |
Definition at line 390 of file mathlib.c.
References normal.
returns the smallest integer greater than or equal to "value", or 0 if "value" is too big
Definition at line 292 of file mathlib.c.
References value.
Referenced by Font_LoadSize(), Mod_Q3BSP_LoadLightmaps(), and SndSys_Init().
Definition at line 891 of file mathlib.c.
References floor().
Referenced by R_GetCurrentTexture().
int Math_atov | ( | const char * | s, |
prvm_vec3_t | out ) |
Definition at line 856 of file mathlib.c.
References i, and VectorClear.
Referenced by R_Shadow_DrawModelShadowMaps(), R_Shadow_PrepareModelShadows(), and VM_stov().
float Math_crandomf | ( | randomseed_t * | r | ) |
Definition at line 1059 of file mathlib.c.
References Math_rand64(), n, and r.
unsigned long long Math_rand64 | ( | randomseed_t * | r | ) |
Definition at line 1042 of file mathlib.c.
References mul128(), mul_Lecuyer, and r.
Referenced by Math_crandomf(), Math_randomf(), and Math_randomrangei().
float Math_randomf | ( | randomseed_t * | r | ) |
Definition at line 1053 of file mathlib.c.
References Math_rand64(), n, and r.
Referenced by Math_randomrangef().
float Math_randomrangef | ( | randomseed_t * | r, |
float | minf, | ||
float | maxf ) |
int Math_randomrangei | ( | randomseed_t * | r, |
int | mini, | ||
int | maxi ) |
void Math_RandomSeed_Reset | ( | randomseed_t * | r | ) |
Definition at line 833 of file mathlib.c.
References a, ixtable, and Math_RandomSeed_UnitTests().
Referenced by Host_Init().
void Matrix4x4_Print | ( | const struct matrix4x4_s * | in | ) |
print a matrix to the console
unsigned char NormalToByte | ( | const vec3_t | n | ) |
void PlaneClassify | ( | struct mplane_s * | p | ) |
Definition at line 781 of file mathlib.c.
Definition at line 800 of file mathlib.c.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_Skeletal_BuildTransforms(), and Mod_ZYMOTICMODEL_Load().
Definition at line 824 of file mathlib.c.
References max, maxs, mins, origin, sqrt(), VectorMultiply, and VectorSubtract.
Definition at line 258 of file mathlib.c.
References cos(), DEG2RAD, dir, sin(), VectorCopy, and VectorVectors().
returns vector length
Definition at line 763 of file mathlib.c.
References DotProduct, length, sqrt(), v, and VectorScale.
Referenced by CL_ClientMovement_Physics_CPM_PM_Aircontrol(), CL_ClientMovement_Physics_PM_AirAccelerate(), CL_ClientMovement_Physics_Swim(), CL_ClientMovement_Physics_Walk(), CL_ParticleEffect_Fallback(), CL_RelinkBeams(), DropPunchAngle(), Matrix4x4_QuakeToDuke3D(), R_Shadow_ComputeShadowCasterCullingPlanes(), SV_AirAccelerate(), and SV_AirMove().
LadyHavoc: like AngleVectors, but taking a forward vector instead of angles, useful!
Definition at line 199 of file mathlib.c.
References forward, right, up, VectorNormalize, and VectorSet.
Referenced by R_DrawParticle_TransparentCallback(), RotatePointAroundVector(), and VM_vectorvectors().
void VectorVectorsDouble | ( | const double * | forward, |
double * | right, | ||
double * | up ) |
|
extern |
Definition at line 31 of file mathlib.c.
Referenced by CL_EntityParticles(), and Mod_MDL_AnimateVertices().
|
extern |
Definition at line 26 of file mathlib.c.
Referenced by CDAudio_Play_byName(), CL_LinkNetworkEntity(), CL_ParsePointParticles1(), CL_ParseTempEntity(), CL_ParseTrailParticles(), CL_SelectTraceLine(), CL_TraceBox(), CL_TraceLine(), CL_TracePoint(), CL_UpdateNetworkEntityTrail(), Collision_Cache_ClipLineToGenericEntitySurfaces(), Collision_ClipLineToGenericEntity(), dpvsimpledecode_open(), jam_open(), libavw_decodeframe(), PHYS_UnstickEntityReturnOffset(), R_DrawTextureSurfaceList_GL20(), R_Shadow_EditLights_Spawn_f(), R_Shadow_LoadLightsFile(), S_LocalSoundEx(), VM_CL_setmodel(), VM_CL_setmodelindex(), VM_CL_te_explosion(), VM_CL_te_explosionquad(), VM_CL_te_gunshot(), VM_CL_te_gunshotquad(), VM_CL_te_knightspike(), VM_CL_te_lavasplash(), VM_CL_te_plasmaburn(), VM_CL_te_smallflash(), VM_CL_te_spike(), VM_CL_te_spikequad(), VM_CL_te_superspike(), VM_CL_te_superspikequad(), VM_CL_te_tarexplosion(), VM_CL_te_teleport(), VM_CL_te_wizspike(), VM_SV_setmodel(), and VM_SV_setmodelindex().