Jonathan
097b564cc6
remove bspbrush_t::original; it is no longer required since mapbrush_t is what the output is being written to
...
use some explicit types (bspbrush_t::ptr for pointer, bspbrush_t::container for container of pointers, and bspbrush_t::make_ptr to create one) so that we can swap it out with different pointers easier later
swap out bspbrush_t::ptr from unique_ptr to shared_ptr; it's not important yet, but it does not increase compilation time and will allow us to pass things to functions like SplitBrush without destroying the original as long as we still have a reference to it somewhere (important for ChopBrushes)
add get_positive_plane to mapface_t
instead of creating a whole copy of the bspbrush_t list, BrushBSP now just creates copies of the shared_ptrs which are then filtered down the tree; the originals are never modified by SplitBrushList and friends, only split into new brushes, so this is safe from what I can tell
portals now directly reference the mapface_ts
original_brushes now directly reference the mapbrush_ts
early exit in `BrushBSP` if brush list is empty (moved to top)
2022-08-10 16:02:16 -04:00
Jonathan
faf9173f10
remove file_order; we can infer this from the pointers now
...
remove unnecessary early microbrush check, use microbrush option value on later one
2022-08-10 02:22:32 -04:00
Jonathan
bca6bda7c3
move `visible` to mapface_t since we only need to store one boolean for it
2022-08-10 01:29:34 -04:00
Jonathan
f8f0e903a2
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-10 01:14:59 -04:00
Eric Wasylishen
c9a1d9f096
qbsp: don't store leafnode->volume once the leaf is created
2022-08-09 23:14:20 -06:00
Jonathan
74dcb1454e
remove mapface_t::visible, it's unused
2022-08-10 00:55:10 -04:00
Jonathan
834838ed72
move lmshift to mapface_t
...
store original mapface_t that a face_t was generated from
2022-08-10 00:53:58 -04:00
Jonathan
70f015a36c
move func_areaportal and lmshift from bspbrush_t to mapbrush_t
2022-08-10 00:48:55 -04:00
Jonathan
c0cec4e1ba
Rewrite of 697e3325f8
2022-08-10 00:11:17 -04:00
Jonathan
44eff2d7b1
throw in percent logging for MakeTreePortals
...
when node_t converts to leaf, destroy anything on it by re-initializing it
2022-08-09 20:33:49 -04:00
Jonathan
d6411cef01
remove AssertNoPortals - it's impossible for it to ever hit, and it's kind of expensive (~150ms for 60k portals)
2022-08-09 19:22:42 -04:00
Jonathan
ffeecd550f
clear tree when it's no longer required
2022-08-09 17:02:59 -04:00
Jonathan
697e3325f8
go back to vector for brush lists
2022-08-09 16:00:51 -04:00
Jonathan
b37917c9ca
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-09 14:57:46 -04:00
Jonathan
5e6dc9d274
parallelize free
2022-08-09 14:57:42 -04:00
Eric Wasylishen
67a376ad18
qbsp: BuildTree_r: avoid copying node->volume
2022-08-09 00:51:18 -06:00
Eric Wasylishen
55bdc88f9d
polylib: use tbb::scalable_allocator for winding std::vector storage
2022-08-09 00:23:43 -06:00
Eric Wasylishen
f3b9de57c6
build: add tbbmalloc
2022-08-09 00:19:39 -06:00
Eric Wasylishen
30b529b70f
qbsp: keep a pool of node_t's in tree_t in a tbb::concurrent_vector
...
rather than using std::unique_ptr recursively in nodes
2022-08-08 23:43:36 -06:00
Jonathan
189f70ca30
add in-place versions of union and expand to help with inlining
2022-08-08 22:43:10 -04:00
Jonathan
1c6b2e5a95
fix duplicate plane test
2022-08-08 21:27:42 -04:00
Jonathan
426668701e
clip_back/clip_front to match ChopWindingInPlace
...
simplify constructors for winding heap
use std::vector again for mapentity_t since it's being copied because of the std::list
2022-08-08 21:08:27 -04:00
Jonathan
8b7a1c21c9
use vector instead of raw heap for winding_storage_heap_t
2022-08-08 20:09:41 -04:00
Jonathan
5b56ecfb28
remove extraneous warnings when they don't matter
2022-08-08 16:01:16 -04:00
Jonathan
e5602358c1
Merge branch 'brushbsp-plane3-bevel' of https://github.com/ericwa/ericw-tools into brushbsp-plane3-bevel
2022-08-08 15:50:31 -04:00
Jonathan
b3fbf8841d
allow update_bounds to tell the caller that a brush may have been destroyed
2022-08-08 15:50:23 -04:00
Eric Wasylishen
9cb0d9b52c
testqbsp: add test for the previously missing face in base1
2022-08-08 00:16:09 -06:00
Jonathan
712dd24cff
Merge branch 'brushbsp-plane3-bevel' of https://github.com/ericwa/ericw-tools into brushbsp-plane3-bevel
2022-08-08 01:30:04 -04:00
Jonathan
a9b1fa2461
speed up SplitBrush a tiny bit by reserving side count
2022-08-08 01:29:56 -04:00
Eric Wasylishen
29e7d5117c
cmake: override BUILD_WITH_PEDANTIC_WARNINGS so pareto doesn't force /WX on debug builds
2022-08-07 23:28:01 -06:00
Jonathan
2abdeb2616
remove Face_Plane since we can directly access the real plane now
...
speed up CreateBrushWindings slightly since we know where the inverted plane is stored
2022-08-08 01:06:50 -04:00
Jonathan
d2cfc0d025
use planenum in SplitBrush and friends
2022-08-08 01:01:49 -04:00
Jonathan
f490878e97
remove old plane lock stuff
...
use spatial hash for planes
2022-08-08 00:58:56 -04:00
Jonathan
6787e60e14
Merge branch 'brushbsp-plane3-bevel' of https://github.com/ericwa/ericw-tools into brushbsp-plane3-bevel
...
# Conflicts:
# include/qbsp/map.hh
2022-08-08 00:40:09 -04:00
Jonathan
f5ef0f90f4
spatial hash using pareto for vertex positions
2022-08-08 00:39:53 -04:00
Eric Wasylishen
3ca9d23f1c
qbsp: rewrite plane_hash to fix test failure on macOS
2022-08-07 21:19:31 -06:00
Jonathan
d9a3abfba7
remove blocksize now that midplane is working
...
don't re-fetch plane being exported since we know its id already
2022-08-07 21:48:22 -04:00
Jonathan
f64dc82ce2
Merge branch 'brushbsp-plane3-bevel' of https://github.com/ericwa/ericw-tools into brushbsp-plane3-bevel
2022-08-07 19:39:35 -04:00
Jonathan
7593834e06
fix map.planes being stomped on export
2022-08-07 19:39:29 -04:00
Jonathan
eb355c1d21
adjust errors
...
remove unnecessary line in debug code
2022-08-07 19:12:37 -04:00
Eric Wasylishen
12abfb93cf
qbsp: add fmt formatters for aabb_t, plane_type_t, qplane3, qbsp_plane_t
2022-08-07 16:58:52 -06:00
Eric Wasylishen
0357db911c
qbsp: remove unnecessary copy in SplitBrushList
2022-08-07 15:42:43 -06:00
Eric Wasylishen
cf653b5b56
qbsp: MakeNodePortal: don't crash if w is empty
...
for consistency with qbsp3
2022-08-07 01:42:09 -06:00
Jonathan
4ec30e02a2
remove "brushes" from mapentity_t - it is now local to the ProcessEntity process
...
"node_t::original_brushes" is now only used during construction and cleared on Prune; original_mapbrushes is used to track the map brushes on nodes post-construction
calculate and cache contents on mapbrush_t
2022-08-06 19:28:17 -04:00
Jonathan
4c15e6f717
don't bother displaying "processing hull" for q2
2022-08-06 17:42:38 -04:00
Jonathan
335db1c0e4
move map_source_location to parser as parser_source_location since the locations actually come from there rather than from the map; now the parser keeps track of the location, so it's a bit easier to follow
2022-08-05 23:17:15 -04:00
Jonathan
c6fabb290d
clean up stat printing a bit
2022-08-05 09:08:33 -04:00
Jonathan
33a23a99c2
Revert "tests: update aabb_contains to account for new behaviour"
...
This reverts commit ef613a69a9 .
2022-08-05 07:01:20 -04:00
Jonathan
c611153b78
Merge branch 'brushbsp-plane3-bevel' of https://github.com/ericwa/ericw-tools into brushbsp-plane3-bevel
2022-08-05 06:59:45 -04:00
Jonathan
a1faa97f3f
fix aabb::contains
2022-08-05 06:58:29 -04:00