Commit Graph

220 Commits

Author SHA1 Message Date
Eric Wasylishen 5893c16267 mathlib: add AddPointToBounds, ClearBounds 2017-07-22 16:31:15 -06:00
Eric Wasylishen 2710f9b1a1 qbsp: remove/comment dead code 2017-07-11 00:07:32 -06:00
Eric Wasylishen 4853dd40ee mathlib: RotateAboutX/Y/Z: change to double 2017-07-05 15:02:24 -06:00
Eric Wasylishen 602616451c bsputils: add BSP_GetWorldModel 2017-06-25 14:37:26 -06:00
Eric Wasylishen 4d9b41d3ec mathlib: fix SetPlanePts linkage 2017-06-20 17:07:36 -06:00
Eric Wasylishen af264821b7 mathlib: factor out SetPlanePts 2017-06-20 14:39:15 -06:00
Eric Wasylishen c1f3a0f2e4 mathlib: ClosestPointOnLineSegment: handle degenerate line segment 2017-06-15 03:30:43 -06:00
Eric Wasylishen 7545119593 mathlib: change RotateAboutZ to double 2017-06-15 03:30:10 -06:00
Eric Wasylishen 157c3eeb4f common: cmdlib: Add IsAbsolutePath from qbsp 2017-04-26 15:04:53 -06:00
Eric Wasylishen e0564e8c2a common: mathlib: don't need #define ANGLEEPSILON 2017-04-26 14:29:07 -06:00
Eric Wasylishen ca58e90e15 common: remove EQUAL_EPSILON from mathlib.hh 2017-04-26 14:25:55 -06:00
Eric Wasylishen 902c45c946 all: make VectorCompare take an explicit epsilon 2017-04-26 14:20:45 -06:00
Eric Wasylishen 15cc98eb27 common: move SignedDegreesBetweenUnitVectors from qbsp, add test 2017-04-26 14:04:33 -06:00
Eric Wasylishen b1f86d7ac1 common: implement buildMeshFromBSP 2017-04-24 02:01:16 -06:00
Eric Wasylishen 5eb4fd8790 common: make Face_Plane_E return a plane3f 2017-04-24 01:54:25 -06:00
Eric Wasylishen a7df1994dc common: fix up Face_Plane to remove unnecessary distance calc 2017-04-24 01:47:46 -06:00
Eric Wasylishen 68b084a6c3 replace glm with qvec 2017-04-24 00:26:49 -06:00
Eric Wasylishen 122b5ff51c common: qmat: use NaN to indicate no inverse 2017-04-24 00:19:47 -06:00
Eric Wasylishen 48e057b31a common: add qv::to_string 2017-04-23 20:57:35 -06:00
Eric Wasylishen 1c1c105abb common: switch away from glm::closestPointOnLine 2017-04-23 20:51:02 -06:00
Eric Wasylishen e5ec45cbe2 common: remove last use of glm::quat 2017-04-23 20:34:21 -06:00
Eric Wasylishen fab993ad8d common: add some rotation matrices 2017-04-23 19:59:57 -06:00
Eric Wasylishen 7887318def common: move vec_from_mangle and mangle_from_vec to mathlib 2017-04-23 19:31:00 -06:00
Eric Wasylishen eeb00bf74c common: tidy qmat 2017-04-23 17:41:19 -06:00
Eric Wasylishen 8a4d1ff218 common: add 4x4 (from mesa) and 2x2 matrix inverse 2017-04-23 15:58:51 -06:00
Eric Wasylishen fd8eafddee common: add ClosestPointOnLine[Segment] 2017-04-23 14:06:58 -06:00
Eric Wasylishen 0358bc07b8 common: mesh_t: first draft of tjunc fixing 2017-04-23 02:06:20 -06:00
Eric Wasylishen 3f067e001a common: add DistToLineSegment 2017-04-23 02:05:19 -06:00
Eric Wasylishen 56513cdb8e common: add DistToLine 2017-04-23 01:39:59 -06:00
Eric Wasylishen b8f5a4f8e1 common: change mesh_t to use qvec3f 2017-04-22 20:39:50 -06:00
Eric Wasylishen 28081f50c6 common: make float/double versions of aabb3 2017-04-22 15:11:41 -06:00
Eric Wasylishen ee7181521d fix build 2017-04-22 13:54:12 -06:00
Eric Wasylishen c1189abccd common: split up new octree/mesh/aabb/qvec stuff 2017-04-22 13:29:32 -06:00
Eric Wasylishen d374a01b5a mathlib: octree: change to storing in a std::vector 2017-04-20 00:59:00 -06:00
Eric Wasylishen 5b63ddbeba mathlib: octree, aabb_t rework 2017-04-19 14:02:30 -06:00
Eric Wasylishen 055b5061f1 light: start a mesh_t class 2017-04-19 14:02:19 -06:00
Eric Wasylishen 30d9a53341 light: move FractionOfLine to mathlib 2017-03-18 23:26:16 -06:00
Eric Wasylishen 3e7b4448c1 mathlib: add GLM_PolyArea 2017-03-18 23:26:10 -06:00
Eric Wasylishen 880ad3b381 bpsutil, common, light, vis: bounds check bsp->dfaces access 2017-03-18 16:31:52 -06:00
Eric Wasylishen 29884e2b4a bsputils: add bounds checking to Face_GetNum 2017-03-18 16:17:01 -06:00
Eric Wasylishen aa10d2da93 common: add std::vector<glm::vec3> polylib::GLM_WindingPoints(const winding_t *w) 2017-03-15 10:59:46 -06:00
Eric Wasylishen 0eb6864744 mathlib: add GLM_PolyRandomPoint 2017-03-12 12:58:36 -06:00
Eric Wasylishen 902fe7073c mathlib: add RotateFromUpToSurfaceNormal 2017-03-07 13:13:24 -07:00
Eric Wasylishen 3ba1859be4 mathlib: CosineWeightedHemisphereSample 2017-03-07 12:45:54 -07:00
Eric Wasylishen 97a00f0f41 light: avoid recomputing things in CalcPointNormal 2017-02-26 22:58:08 -07:00
Eric Wasylishen 5630257164 light: catch nan's in normal interpolation 2017-02-26 20:48:47 -07:00
Eric Wasylishen d88581e2da light: add GLM_ProjectPointOntoPlane 2017-02-22 01:40:58 -07:00
Eric Wasylishen 044bd4c9c0 mathlib: PointsAlongLine: make into template 2017-02-21 21:18:22 -07:00
Eric Wasylishen 8067e0fa45 mathlib: add PointsAlongLine 2017-02-21 21:18:16 -07:00
Eric Wasylishen 71fbd17ea8 Revert "common: GLM_MakeInwardFacingEdgePlanes: handle non-convex poly"
This reverts commit bef9dd63d2.
2017-02-16 15:47:36 -07:00
Eric Wasylishen bef9dd63d2 common: GLM_MakeInwardFacingEdgePlanes: handle non-convex poly 2017-02-14 20:51:36 -07:00
Eric Wasylishen 52523c8208 mathlib: expose GLM_MakeInwardFacingEdgePlane() 2017-02-13 13:33:48 -07:00
Eric Wasylishen 2a17b4bccf build fix 2017-02-12 11:54:52 -07:00
Eric Wasylishen 3a20d5410b common: add shrink and clip poly funcs 2017-02-12 00:20:38 -07:00
Eric Wasylishen b33cb75bb3 common: add missing tuple include 2017-02-11 11:56:35 -07:00
Eric Wasylishen b54f893942 common: add GLM_InterpolateNormal 2017-02-11 11:02:37 -07:00
Eric Wasylishen 8ed7544063 light: fix up barycentric coords code, add tests 2017-02-11 11:02:28 -07:00
Eric Wasylishen 9aae46bd1c light: adjust Light_PointInSolid to take a model param 2017-02-10 15:54:07 -07:00
Eric Wasylishen a9f99076fd common: add GLM_ClosestPointOnPolyBoundary 2017-02-10 15:52:12 -07:00
Eric Wasylishen bd0556cf22 light: switch to new Face_Centroid 2017-02-09 00:17:22 -07:00
Eric Wasylishen 90bf0134de common: move vec3_t_to_glm() to mathlib.hh 2017-02-08 15:01:03 -07:00
Eric Wasylishen f95e8445ef common: fix build error on windows (M_PI->Q_PI) 2017-02-07 21:36:24 -07:00
Eric Wasylishen 3acc48269e light: add lanczos filter 2017-02-07 14:27:51 -07:00
Eric Wasylishen 9246454bfc light: refactor some more stuff to GLM 2017-02-06 23:00:48 -07:00
Eric Wasylishen 7fdb77188c light: work-in-progress stuff 2017-02-06 21:57:49 -07:00
Eric Wasylishen 9330d2c087 light: rename Face_MakeInwardFacingEdgePlanes() to Face_AllocInwardFacingEdgePlanes()
do memory allocation inside the function.
2017-02-01 14:38:42 -07:00
Eric Wasylishen be3c84ec98 light: add a EdgePlanes_PointInside() function to bsputils.{hh,cc} 2017-02-01 14:38:42 -07:00
Eric Wasylishen c035907ff8 light: move Face_MakeInwardFacingEdgePlanes() to bsputils.{hh,cc} 2017-02-01 14:38:42 -07:00
Eric Wasylishen 29b420c7dd light: move Light_PointInSolid to bsputils.{hh,cc} 2017-02-01 14:38:42 -07:00
Eric Wasylishen b46cba40a4 light: entity warnings: print bbox for bmodel entities
fixes https://github.com/ericwa/tyrutils-ericw/issues/120
2016-11-24 17:10:15 -07:00
Eric Wasylishen cefadfa1f4 build: fix on MSVC 2013 2016-10-17 19:25:27 -07:00
Eric Wasylishen a6468984bf all: finish c++ification 2016-10-17 19:52:17 -06:00
Eric Wasylishen d9bb0be32e light: move Face_Contents to common 2016-10-17 17:37:28 -06:00
Eric Wasylishen 801d9652c0 common: add util function to get a face number 2016-09-20 00:01:15 -06:00
Eric Wasylishen 494f9bb050 common: make Q_assert inline 2016-09-18 15:44:04 -06:00
Eric Wasylishen 857b4402ad light: change assertions to Q_assert (so they are all enabled in release builds) 2016-09-18 15:41:56 -06:00
Eric Wasylishen b2fb764e36 common: new assertion macro used in all builds (debug/release) 2016-09-18 15:39:16 -06:00
Eric Wasylishen 33093151c6 common: ClipWinding: fix constness 2016-09-10 15:32:50 -06:00
Eric Wasylishen 687b1b20f6 light: bsp backend: fix and simplify Face_Contents to only look at texture names. it was broken when -splitspecial was used. 2016-09-09 13:04:53 -06:00
Eric Wasylishen 4fb903bd8e common: add more AABB functions 2016-08-09 17:56:55 -06:00
Eric Wasylishen 79525b9aee common: mathlib: add UniformPointOnSphere 2016-08-09 17:20:51 -06:00
Eric Wasylishen 0c63d61a60 common: mathlib: use EQUAL_EPSILON in AABBsDisjoint 2016-08-09 16:41:11 -06:00
Eric Wasylishen 0b6578e4b3 common: mathlib: add some AABB functions 2016-08-09 16:27:51 -06:00
Eric Wasylishen d3070a18a4 common: build fix (M_PI -> Q_PI) 2016-08-09 16:05:43 -06:00
Eric Wasylishen 4be2fe289e common: add RandomDir 2016-08-09 15:29:23 -06:00
Eric Wasylishen 68e1736ad1 light: move more stuff to bsputils.cc 2016-08-07 23:07:20 -06:00
Eric Wasylishen 486606eb88 light: rename GetSurfaceVertex to Face_VertexAtIndex 2016-08-07 22:57:45 -06:00
Eric Wasylishen 1a0fb22e40 light: move some helper functions to common/bsputils.{h,cc} 2016-08-07 22:55:44 -06:00
Eric Wasylishen 939778bd23 build: add snprintf wrapper from QuakeSpasm (vs2013 compat) 2016-08-06 15:47:40 -07:00
Eric Wasylishen 292d35879b build: restore mingw support 2016-08-05 04:07:01 -04:00
Eric Wasylishen 8429017ea4 common: add message to LoadBSPFile 2016-07-23 16:19:53 -06:00
Eric Wasylishen 335f54aa09 common: remove setting stack side for pthreads 2016-07-15 16:14:48 -06:00
Eric Wasylishen 78810fa765 common: fix COM_Parse const-ness 2016-07-06 17:06:28 -06:00
Eric Wasylishen afbc17d1ea qbsp, common: raise BOGUS_RANGE to 65536 2016-06-09 01:18:35 -06:00
Eric Wasylishen e0f8213cc9 common: add userinfo param to DiceWinding 2016-05-19 23:55:12 -06:00
Eric Wasylishen 4ea6b2ec00 common: fix broken WindingPlane 2016-05-19 23:53:14 -06:00
Eric Wasylishen 7715310afe common: add AllocWindingEdges, FreeWindingEdges, PointInWindingEdges 2016-05-19 22:02:45 -06:00
Eric Wasylishen 2cdc5e7c68 common: actually move WindingFromFace to polylib 2016-05-19 15:18:33 -06:00
Eric Wasylishen 45010089f3 light, common: move WindingFromFace to bspfile.c/h 2016-05-19 15:07:31 -06:00
Eric Wasylishen fff12697e5 light: move DicePatch to polylib.c 2016-05-19 15:03:21 -06:00