Commit Graph

12 Commits

Author SHA1 Message Date
Richard TalbotWatkin
d197407b42 Major optimizations to the BSP building process, and BSP Undo.
#jira UE-16405 - Hitch occurs when undoing BSP manipulations

Summary of changes:
- Added 'fuzzy map' for quick look up of nearly equal FVectors, improving the BSP rebuild algorithm from O(n^4) to O(n*m) where m is much smaller than n.
- Added 'fuzzy map' for quick look up of nearly equal FPlanes, improving plane merging from O(n^2) to O(n).
- Changed TTransArrays in UModel to regular arrays, to remove a lot of transaction modifies during BSP rebuild.
- UModel array allocations are now allocated upfront where possible, instead of constant dynamic resizing.
- Optimized algorithm used by UModelComponent::GenerateElements to reduce allocations and simplify map lookups.
- Removed call to ULevel::CommitModelSurfaces in UModelComponent::PostEditUndo, which was causing an enormous amount of unnecessary work on each undo operation.  It is now done, as ever, by UWorld::Tick.

#reviewedby Matt.Kuhlenschmidt

[CL 2600444 by Richard TalbotWatkin in Main branch]
2015-06-25 09:42:17 -04:00
Richard TalbotWatkin
117c5af950 Fixed issue where BSP surface transforms could get broken when applying them to geometry surfaces which are out of sync with the owner Brush (because Auto Build BSP is disabled).
#jira UE-15373 - Rotating brushes and UVs cause materials to stretch on BSPs

[CL 2568322 by Richard TalbotWatkin in Main branch]
2015-05-28 07:24:12 -04:00
PaulEremeeff
3d878d5a79 PR #996: Fixing PVS-Studio warnings (Contributed by PaulEremeeff)
I have reviewed each change carefully, but it is a large change and I could have missed something! Here is a summary of the types of changes in this CL:
 * Made nullptr checks consistent (the plurality of the changes are of this type)
 * Completed switch statements (IE, switch did not explicitly handle default case, but had unhandled enum entries - this is the second most popular type of fix)
 * Removed unused variables
 * Removed redundant initializations
 * WidgetNavigationCustomization.cpp was fixed by the owner
 * integers converted to floats where result was stored in a float
 * Removed redundent null checks (e.g. before delete statements)
 * Renamed variables to prevent non-obvious shadowing
 * Fixed use of bitwise & when checking for equality to an enum entry (which is often 0)
 * Fixes for some copy paste errors (e.g. FoliageEdMode.cpp)

[CL 2498053 by Dan Oconnor in Main branch]
2015-03-31 20:12:31 -04:00
Richard TalbotWatkin
448dccf028 Fixed issues with BSP surface texture transform when the parent brush is scaled or rotated.
#jira UE-8963 - UV scale is reset when new BSP is added on top of another
#jira UE-11368 - uv scale of materials on hollow BSP does not persist after building geometry

- Fixed a bug in FPoly::Scale where the texture was being scaled in the wrong direction.
- Corrected UEditorEngine::polyUpdateMaster so that the "master poly" Base (UV offset) and UV directions take into account any transform on the parent Brush.

#reviewedby Matt.Kuhlenschmidt

[CL 2477538 by Richard TalbotWatkin in Main branch]
2015-03-12 17:20:29 -04:00
Richard TalbotWatkin
d2d22eabb2 Fixed assert when building a brush with a spiral arrangement of vertices.
#jira UE-1430 - CRITICAL: Regression: CRASH: pressing enter to close geometry made with Pen tool

[CL 2403501 by Richard TalbotWatkin in Main branch]
2015-01-12 11:19:13 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Richard TalbotWatkin
18eb86a4ca Allowed BSP scale to affect the transform scale, instead of immediately transforming the vertices.
#jira UE-1291 - EDITOR: Snap To Scale Grid: Adjusting the Scale Grid Snap Value highlights functionality problems scale distance is not uniform

[CL 2359772 by Richard TalbotWatkin in Main branch]
2014-11-14 03:15:34 -05:00
Richard TalbotWatkin
95b71ab70e Allow numeric translation and rotation for geometry brushes
#github Github pull request #516

[CL 2359748 by Richard TalbotWatkin in Main branch]
2014-11-14 02:45:36 -05:00
Mikolaj Sieluzycki
d43e69c4b9 Prepare cpp files for header cleanup.
#codereview Robert.Manuszewski

[CL 2356854 by Mikolaj Sieluzycki in Main branch]
2014-11-12 04:43:54 -05:00
Mikolaj Sieluzycki
59df49651b Engine private PCH cleanup.
#codereview Robert.Manuszewski

[CL 2348191 by Mikolaj Sieluzycki in Main branch]
2014-11-04 06:12:25 -05:00
Dmitry Rekman
39949dcaaf Compiler warning fixes from PR 185.
This is a subset of changes (compiler warning fixes needed to compile Linux editor) from pull request 185 by sbc100, 3dluvr, wshearn, abarbu et al: https://github.com/EpicGames/UnrealEngine/pull/185
- Remove superfluous expressions without side effect.

[CL 2085579 by Dmitry Rekman in Main branch]
2014-05-29 17:09:44 -04:00
Tim Sweeney
324683ce78 Engine source (Main branch up to CL 2026164) 2014-03-14 14:13:41 -04:00