Commit Graph

521 Commits

Author SHA1 Message Date
Eric Wasylishen b38c04b372 qbsp: clean up brush memory leaks 2017-07-23 13:12:14 -06:00
Eric Wasylishen 7c49d499c2 qbsp: tidy FreeBrushes 2017-07-23 02:48:58 -06:00
Eric Wasylishen 578d24951d qbsp: fix memory corruption in SplitBrush 2017-07-23 01:51:31 -06:00
Eric Wasylishen 9629134612 qbsp: fix some issues with SplitBrush 2017-07-23 01:32:04 -06:00
Eric Wasylishen 3bb22ef22b qbsp: add SplitBrush from q3map (not yet tested) 2017-07-23 00:42:09 -06:00
Eric Wasylishen d246d2a798 qbsp: add FlipWinding 2017-07-22 23:53:33 -06:00
Eric Wasylishen 1859a1c0b5 qbsp: make DivideWinding saner + const 2017-07-22 21:29:04 -06:00
Eric Wasylishen 11a7e7bc88 qbsp: refactor BrushMostlyOnSide to take separate normal/dist 2017-07-22 19:36:55 -06:00
Eric Wasylishen b8dec3ed2b qbsp: add ChopWindingInPlace from q3map 2017-07-22 19:30:51 -06:00
Eric Wasylishen 5158b6d296 qbsp: add BoundBrush (from q3map) 2017-07-22 17:09:03 -06:00
Eric Wasylishen 7ef5ad162d qbsp: add BrushMostlyOnSide (from q3map) 2017-07-22 17:05:09 -06:00
Eric Wasylishen 9868c7f965 qbsp: Add BrushVolume 2017-07-22 16:33:26 -06:00
Eric Wasylishen 7d1dc71069 qbsp: add Face_Plane 2017-07-22 16:31:26 -06:00
Eric Wasylishen bca6a55662 qbsp winding: add WindingArea 2017-07-22 16:31:21 -06:00
Eric Wasylishen 5893c16267 mathlib: add AddPointToBounds, ClearBounds 2017-07-22 16:31:15 -06:00
Eric Wasylishen 0ebbdac5f9 qbsp: refactor FindPlane 2017-07-17 21:24:32 -06:00
Eric Wasylishen 0d0f265f05 mathlib: add VectorClear 2017-07-17 21:20:17 -06:00
Eric Wasylishen a34f3df88d qbsp: surfaces.cc: use std::map for vertex hashing 2017-07-17 16:35:11 -06:00
Eric Wasylishen 8b9f5ea40a qbsp: fix handling of duplicate planes
fixes spurious leak in e1m4.map
2017-07-15 13:51:26 -06:00
Eric Wasylishen 1a15d5f0e9 qbsp: add -leaktest option (from q2) 2017-07-15 12:23:11 -06:00
Eric Wasylishen 0263f95e59 qbsp: add -expand flag from q3map for testing hull1 expansion 2017-07-11 17:54:28 -06:00
Eric Wasylishen be2799578f qbsp: remove dead code (extrafaces) 2017-07-11 00:05:57 -06:00
Eric Wasylishen 240d65f788 qbsp: outside.cc rewrite
- no more recursively traversing portals, as this can overflow the stack
- better outside filling and .pts file generation, inspired by q3map
  (do a bfs from all leafs with entities, storing the number of steps
   from an occupied leaf in each leaf. Then do a dfs from the outside node
   to the first entity we hit.)
- .por file writing was dropped for now, can be re-added later
2017-07-10 12:46:22 -06:00
Eric Wasylishen bb3e296a0d qbsp: FillOutside: count portals yourself 2017-07-09 01:06:49 -06:00
Eric Wasylishen d63aa409cc qbsp: add comment 2017-07-09 00:04:47 -06:00
Eric Wasylishen 01fa4a9f58 qbsp: set up test case for #158 2017-07-08 16:23:08 -06:00
Eric Wasylishen a4e3a3a887 Revert "qbsp: move node_t markfaces list to a std::vector"
This reverts commit 31df408333.
2017-07-05 18:10:56 -07:00
Eric Wasylishen 4853dd40ee mathlib: RotateAboutX/Y/Z: change to double 2017-07-05 15:02:24 -06:00
Eric Wasylishen 117f568cd7 qbsp: don't write unused texinfo.
also cleanup planes writing
2017-07-03 01:58:26 -06:00
Eric Wasylishen 31df408333 qbsp: move node_t markfaces list to a std::vector 2017-07-02 21:03:41 -06:00
Eric Wasylishen 0cba9c5138 qbsp: clarify node->children comment 2017-07-02 20:44:16 -06:00
Eric Wasylishen 97787e9d2c qbsp: add extrafaces argument to MakeFaceEdges 2017-07-02 20:06:41 -06:00
Eric Wasylishen 80380fa7fd qbsp: drop ExportNodePlanes. Planes were already deduplicated by
FindPlanes.
2017-07-01 17:25:02 -06:00
Eric Wasylishen fef1142808 light: add shadowworldonlylist 2017-06-27 13:13:32 -06:00
Eric Wasylishen 78ed70e2a5 light: modelinfo_t: take bsp param 2017-06-27 12:59:17 -06:00
Eric Wasylishen eb7be5cd57 light: add _shadowworldonly key (unimplemented) 2017-06-27 12:57:54 -06:00
Eric Wasylishen 25d6aad5bf light: add _selfshadow as an alias for _shadowself 2017-06-27 12:27:39 -06:00
Eric Wasylishen 4dcfc12f50 light: refactor _shadowself handling 2017-06-26 17:42:50 -06:00
Eric Wasylishen 6e707130be light: rename dynamic shadow stuff to switchshadstyle" for QC,
and "_switchableshadow" for the mapper.
2017-06-26 13:41:24 -06:00
Eric Wasylishen b71f769c0a light: experimental support for switchable bmodel shadows:
Current specs/limitations:
- only supported for sunlight and regular lights
- enabled with "_dynamicshadow" "1"
- writes the lightstyle to a "dynshadowstyle" entity key, hardcoded
- only handles one dynamic occluder for a given lightmap sample
- styled lights passing through a dynamic occluder turn non-styled
2017-06-25 20:06:46 -06:00
Eric Wasylishen 602616451c bsputils: add BSP_GetWorldModel 2017-06-25 14:37:26 -06:00
Eric Wasylishen fb4e089e81 light: accept "_minlight" in worldspawn as an alias for "light"
docs: note that _minlight_color and _mincolor are supported on
worldspawn
2017-06-24 21:31:08 -06:00
Eric Wasylishen 989f0305ba bsputil: add checks for degenerate faces, unused planes/texinfo/verts,
clipnodes
2017-06-21 16:36:12 -06:00
Eric Wasylishen 5aed435937 winding.hh: remove dead code 2017-06-20 17:31:27 -06:00
Eric Wasylishen 4d9b41d3ec mathlib: fix SetPlanePts linkage 2017-06-20 17:07:36 -06:00
Eric Wasylishen 98c5dd2913 mathlib: refactor ProjectPointOntoPlane 2017-06-20 16:01:34 -06:00
Eric Wasylishen af264821b7 mathlib: factor out SetPlanePts 2017-06-20 14:39:15 -06:00
Eric Wasylishen 85d235393e mathlib: add vec3_t version of ProjectPointOntoPlane 2017-06-20 14:29:53 -06:00
Eric Wasylishen 85a6b9095d qbsp: refactor PlaneInvEqual 2017-06-20 13:07:17 -06:00
Eric Wasylishen 37ed11c2ed qbsp: experimental "misc_external_map" entity
"_external_map" - map to load
"_external_map_classname" - classname to switch to (e.g. func_wall)
"_external_map_angle" - rotation angle around Z axis
2017-06-15 03:43:39 -06:00
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