Commit Graph

521 Commits

Author SHA1 Message Date
Eric Wasylishen 7545119593 mathlib: change RotateAboutZ to double 2017-06-15 03:30:10 -06:00
Eric Wasylishen ceab425885 map.cc: factor out plane-points setting code 2017-06-15 03:30:02 -06:00
Eric Wasylishen 8d2a257729 wad.cc: factor out .wad file opening 2017-06-15 03:29:55 -06:00
Eric Wasylishen 77f3da30bf qbsp: add func_detail_fence 2017-06-09 15:13:13 -06:00
Eric Wasylishen d01b740b5b qbsp: add -omitdetailwall and -omitdetailillusionary 2017-06-07 14:12:02 -06:00
Eric Wasylishen 44445becb8 qbsp: rename "_nosurfacefragment" to func_detail_wall 2017-06-05 16:22:15 -06:00
Eric Wasylishen 3ca83ea46e qbsp: add logging for func_detail_illusionary and _nosurfacefragment 2017-06-05 14:37:40 -06:00
Eric Wasylishen ac78efed98 qbsp: func_detail rewrite.
- Fix corrupt VIS issues when using func_detail
- func_detail no longer seals the map.
- add func_detail_illusionary entity type
- add func_detail key "_nosurfacefragment"
2017-06-05 14:09:31 -06:00
Eric Wasylishen ea099775ef qbsp, light: allow _shadow -1 to disable shadows from func_detail 2017-06-05 14:01:12 -06:00
Eric Wasylishen e3da31b308 writebsp.cc: Assert we never write a private contents type to the bsp 2017-06-05 14:00:01 -06:00
Eric Wasylishen 30fb5ef446 qbsp.hh: clarify detail_separator comments 2017-06-01 19:40:00 -06:00
Eric Wasylishen 213e4b9f7d qbsp: add a -nodetail switch, for debugging func_detail issues 2017-05-31 23:23:53 -06:00
Eric Wasylishen f5d4cd9202 qbsp: add -forceprt1 option for generating a PRT1 to load in editors
This is for previewing the portals between clusters, since no editors
can load PRT2.
2017-05-31 23:18:04 -06:00
Eric Wasylishen 8f4b506608 qbsp: refactor cmake setup 2017-04-28 13:04:51 -06:00
Eric Wasylishen 64efc77055 qbsp: expose some stuff in qbsp.hh 2017-04-28 13:04:44 -06:00
Eric Wasylishen 3ec36f6550 qbsp: use common/cmdlib 2017-04-26 15:08:49 -06:00
Eric Wasylishen 157c3eeb4f common: cmdlib: Add IsAbsolutePath from qbsp 2017-04-26 15:04:53 -06:00
Eric Wasylishen 32eaa99d40 qbsp: rename our plane_t to qbsp_plane_t 2017-04-26 14:55:26 -06:00
Eric Wasylishen 8c89e128c7 qbsp: drop internal mathlib 2017-04-26 14:51:27 -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 03396787b2 common: mathlib: add VectorLengthSq 2017-04-26 14:21:19 -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 0a64905df8 common: fix msvc build errors 2017-04-24 00:34:37 -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 d12f703cb6 common: qvec: additional const hacky accessor for [col][row] access 2017-04-23 22:27:32 -06:00
Eric Wasylishen 1f5288c321 common: qvec: hacky accessor for [col][row] access 2017-04-23 22:27:27 -06:00
Eric Wasylishen af8f4912b5 common: qvec: add component-wise qv::pow, qv::min, qv::max 2017-04-23 22:27:22 -06:00
Eric Wasylishen 779b2045c2 common: add qclamp macro 2017-04-23 22:27:16 -06:00
Eric Wasylishen ff3a2f58f0 common: qvec: add qv::epsilonEqual 2017-04-23 22:27:11 -06:00
Eric Wasylishen 48e057b31a common: add qv::to_string 2017-04-23 20:57:35 -06:00
Eric Wasylishen 7014757cb9 common: try fixing build error on Linux 2017-04-23 20:48:56 -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 6344e0723c common: add some stuff to qvec 2017-04-23 15:22:35 -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 ed09b4af8d common: qvec: add qplane. fix dot(). 2017-04-23 01:40:23 -06:00
Eric Wasylishen 56513cdb8e common: add DistToLine 2017-04-23 01:39:59 -06:00
Eric Wasylishen 24e579e251 common: first draft of qmat 2017-04-22 22:36:24 -06:00
Eric Wasylishen b8f5a4f8e1 common: change mesh_t to use qvec3f 2017-04-22 20:39:50 -06:00
Eric Wasylishen 1f7bd69385 qbsp: optimize FindTexinfo 2017-04-22 16:59:14 -06:00
Eric Wasylishen fbaee78379 common: qvec: hack to allow including in qbsp 2017-04-22 15:55:31 -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 60418ce9a7 light: add maximum switchable lights to log message 2017-04-22 11:53:55 -06:00
Eric Wasylishen 43798edcfe qbsp: split out winding.hh 2017-04-20 20:09:24 -06:00
Eric Wasylishen 9034eb107a qbsp: move remaining headers to include directory 2017-04-20 19:52:06 -06:00
Eric Wasylishen c34d958d7a qbsp: split up qbsp.hh 2017-04-20 19:44:10 -06:00
Eric Wasylishen f4c9b6c1a7 mathlib: expand qvec constructors 2017-04-20 12:32:37 -06:00
Eric Wasylishen e0d555ffc8 mathlib: vs2013 compatibility 2017-04-20 01:21:27 -06:00
Eric Wasylishen d374a01b5a mathlib: octree: change to storing in a std::vector 2017-04-20 00:59:00 -06:00
Eric Wasylishen b378ce9085 mathlib: add missing include 2017-04-19 19:53:18 -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 10386581a6 light: make bounce of styled lights opt in with "_bouncestyled" worldspawn key 2017-03-27 16:44:04 -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 8a83e3d351 light: BounceLightsForFaceNum(): return indices so we have 1 main copy of the bounce lights 2017-03-15 13:22:43 -06:00
Eric Wasylishen c2c3e915e6 light: fix leak of lightsurf->realfacenums 2017-03-15 13:22:35 -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 33fbe56e12 light: save poly edge planes for bouncelights 2017-03-15 10:59:31 -06:00
Eric Wasylishen 1d66039b2c light: save poly for bouncelights 2017-03-15 10:59:25 -06:00
Eric Wasylishen 154158ddba light: BounceLightsForFaceNum: avoid an unnecessary std::vector copy 2017-03-15 10:59:16 -06:00
Eric Wasylishen 686696c362 light: Palette_GetColor: return glm vector 2017-03-12 15:41:52 -06:00
Eric Wasylishen 102bdc49f0 light: drop IntersectSingleModel api 2017-03-12 15:06:07 -06:00
Eric Wasylishen 0eb6864744 mathlib: add GLM_PolyRandomPoint 2017-03-12 12:58:36 -06:00
Eric Wasylishen ccb6ea27b1 light: some temporary api compatibility stuff 2017-03-12 12:58:30 -06:00
Eric Wasylishen 63e8f42c87 light: ray stream api: allow getting hit face 2017-03-07 13:37:52 -07: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 553f02d582 light: restore performance of bounce lighting 2017-03-06 22:50:20 -07:00
Eric Wasylishen 48a6314dfb light: bounce styled lights 2017-03-05 20:05:34 -07:00
Eric Wasylishen 461afbc15d light: remove ltface2.cc/hh 2017-03-01 13:20:09 -07:00
Eric Wasylishen b163f766bb light: drop unneeded light2.cc/hh 2017-02-27 19:10:55 -07:00
Eric Wasylishen 34947ced9c light: delete RotationAboutLineSegment 2017-02-27 19:06:28 -07:00
Eric Wasylishen 69d5669773 light: delete some dead code 2017-02-27 17:43:56 -07:00
Eric Wasylishen 97a00f0f41 light: avoid recomputing things in CalcPointNormal 2017-02-26 22:58:08 -07:00
Eric Wasylishen 6c946038ee light: move edgeToFaceMap_t stuff to phong.hh/cc 2017-02-25 14:44:59 -07:00
Eric Wasylishen 22b5684c23 light: save the actual face number of each sample point 2017-02-24 21:05:59 -07:00
Eric Wasylishen 29c7f79a0b light: misc stuff 2017-02-23 20:53:10 -07:00
Eric Wasylishen d88581e2da light: add GLM_ProjectPointOntoPlane 2017-02-22 01:40:58 -07:00
Eric Wasylishen cafadddb62 light: expose faceextents_t in header 2017-02-21 22:59:40 -07:00
Eric Wasylishen 8ab0ef9687 mathlib: redo bilinear interpolation 2017-02-21 21:19:07 -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 29ecd209a2 add comment 2017-02-20 14:33:46 -07:00
Eric Wasylishen d40c6b9912 mathlib: add bilinear interpolation 2017-02-20 14:32:31 -07:00
Eric Wasylishen c4f3897f47 light: Adjust epsilon 2017-02-16 15:57:24 -07:00
Eric Wasylishen 6f66473836 light: add mangle_from_vec 2017-02-14 23:45:38 -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 7300aacdff light: Add -debugoccluded 2017-02-11 22:22:26 -07:00
Eric Wasylishen 1957fb1489 light: expose WorldToTexCoord_HighPrecision() in header 2017-02-11 15:45:50 -07:00
Eric Wasylishen 5fe4f23371 light: add a debug mode for showing contributing faces 2017-02-11 15:45:30 -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 1f40e3a58f light: extra field for contrib faces 2017-02-10 15:52:12 -07:00
Eric Wasylishen a9f99076fd common: add GLM_ClosestPointOnPolyBoundary 2017-02-10 15:52:12 -07:00
Eric Wasylishen 87868275de light: clean CalcPoints 2017-02-10 15:52:12 -07:00
Eric Wasylishen 71a3dd769a light: clean up LightFace() function 2017-02-10 15:52:12 -07:00
Eric Wasylishen d30c970d8b light: always call MakeEdgeToFaceMap 2017-02-10 15:52:12 -07:00
Eric Wasylishen b9d0de0ec8 light: expose some stuff in the light2 header 2017-02-10 15:52:12 -07:00
seth 10df0bf88e Merge remote-tracking branch 'upstream/master' 2017-02-10 16:53:17 -05:00
Eric Wasylishen 8acbea291c light: remove unused struct 2017-02-09 14:19:08 -07:00
Eric Wasylishen bd0556cf22 light: switch to new Face_Centroid 2017-02-09 00:17:22 -07:00
Eric Wasylishen f09cadbc76 light: switch to new world space <-> texture space code 2017-02-08 17:51:22 -07:00
Eric Wasylishen 70644907e0 Revert "light: move Lightmap_Soften into WriteLightmaps"
This reverts commit bc2d734e9a.
2017-02-08 17:10:26 -07:00
Eric Wasylishen 90bf0134de common: move vec3_t_to_glm() to mathlib.hh 2017-02-08 15:01:03 -07:00
Eric Wasylishen bc2d734e9a light: move Lightmap_Soften into WriteLightmaps 2017-02-08 02:23:21 -07:00
Eric Wasylishen 3acc48269e light: add lanczos filter 2017-02-07 14:27:51 -07:00
Eric Wasylishen 4813bf6aa2 common: remove unused function 2017-02-07 11:44:02 -07:00
Eric Wasylishen 1211fd86d1 light: move bounce to its own file 2017-02-07 00:51:05 -07:00
Eric Wasylishen c7756496cd light: move phong shading code to its own file 2017-02-07 00:06:29 -07:00
Eric Wasylishen 9246454bfc light: refactor some more stuff to GLM 2017-02-06 23:00:48 -07:00
Eric Wasylishen f018b7324d light: refactor phong shading to use GLM 2017-02-06 22:50:56 -07:00
Eric Wasylishen 7fdb77188c light: work-in-progress stuff 2017-02-06 21:57:49 -07:00
seth e68e38a08f Merge remote-tracking branch 'upstream/master'
Fixed conflicts
2017-02-05 14:06:24 -05:00
seth 4a119e2098 Added _bouncescale to light sources 2017-02-05 13:47:47 -05: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 4ec1d92191 light: dirt_off_radius, dirt_on_radius 2017-01-30 16:11:56 -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 186485ec47 light: revert ee89d41b6d since it's now handled within the trace code 2016-11-03 18:27:40 -06:00
Eric Wasylishen 91fcfe5b9a light: use glass texture colors to tint rays 2016-11-03 02:26:53 -06:00
Eric Wasylishen ee89d41b6d light: light passing through glass lights up the back side, scaled by (1-alpha) 2016-11-02 21:35:11 -06:00
Eric Wasylishen ed708f5154 light: allow both _mincolor and _minlight_color on bmodels 2016-11-02 18:05:44 -06:00
Eric Wasylishen 731e46d005 light: fix extended texinfo array type 2016-11-02 17:29:18 -06:00
Eric Wasylishen fbeba25bd1 light: read _mincolor from .texinfo file 2016-11-02 17:23:25 -06: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 64ec89312d common: Add Q_assert_unreachable() 2016-10-17 18:16:23 -06:00
Eric Wasylishen d9bb0be32e light: move Face_Contents to common 2016-10-17 17:37:28 -06:00
Eric Wasylishen 57834c438b light: add "_lightignore" model key 2016-09-20 16:15:12 -06:00
Eric Wasylishen 46a56df19f light: add -bouncelightsdebug switch to render bounce lights 2016-09-20 00:04:02 -06:00
Eric Wasylishen 801d9652c0 common: add util function to get a face number 2016-09-20 00:01:15 -06:00
Eric Wasylishen 722f753d8d light: remove some unused vis-testing stuff 2016-09-19 19:21:04 -06:00