Commit Graph

46 Commits (a2d86a9fa495ed08435bb0393aaf5fae188b68df)

Author SHA1 Message Date
puvvadar a2d86a9fa4
Merge branch 'development' into math_string_converters 4 years ago
puvvadar e481f6bfcf Fix math string unit test failures
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
puvvadar 4e6bd3d25c Consolidate various to_string implementations for math classes
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
Chris Burel 664403c5de Mark benchmark state variables in for loops as unused in benchmarks
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Esteban Papp 09fd52ef73
AzCore Math tests produce errors that need to be disabled in debug (#6678)
* Tests produce errors that need to be disabled in debug

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* PR suggestion

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Benjamin Jillich 79dd65e1cc
Quaternion shortest equivalent (#6472)
* Added new helper functions to get the shortest equivalent of the rotation. In case the w component of the quaternion is negative the rotation is > 180° and taking the longer path. The quaternion will be inverted in that case to take the shortest path of rotation.
* Added unit test.
* Renamed the angle parameter of the CreateRotationX/Y/Z() functions into angleInRadians.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Benjamin Jillich d20aa935ba
Quaternion to scaled-axis angle representation (and back) helpers (#6421)
Direct conversion helpers for quaternion to the scaled axis-angle representation and back without the need to convert them first to the axis-angle format and manually scale (or normalize on the way back). This also avoids having to deal with the special case of an identity representation which is 0,0,0 in the scaled axis-angle format while our convention for axis-angle is 0,1,0 for the axis and 0 for the angle.

Added unit tests that check the conversion round-trips from quaternion -> (scaled) axis-angle -> quaternion as well as comparing the scaled axis-angle representations from the direct helper functions as well as the axis-angle while manually scaling/normalizing.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Esteban Papp 3f6246ccbe Removes recording of memory records through the MemoryDriller
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 47de333e94 Removes m_enableDrilling
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop 5bd751531d
Update return type for viewport screen functions (#5803)
* update return type for viewport screen functions

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add tests for AZ::Matrix3x4::CreateFromMatrix4x4 and add TransformPoint to Matrix3x4

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update NDC -> Ndc

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates following review feedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates and improvements following PR feedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add forward declaration of Matrix3x4 type

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update where forward declarations are defined for Matrix3x4

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
bosnichd 19acf94606
Remove the legacy ViewSystem and some other tangentially related legacy code. (#5558)
Signed-off-by: bosnichd <bosnichd@amazon.com>
4 years ago
Esteban Papp aad2c214a4 Merge branch 'development' into cmake/warn_virtual
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
hultonha 6cc9a33845
Add a new implementation for cone/ray intersect to simplify code and fix issue with current implementation (#3902)
* add a new implementation for cone/ray intersect to simplify and fix existing issue

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* move new ray/cone intersection function to AzToolsFramework - repond to PR comments

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* updates following PR feedback

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add additional comment to give more context to the intersection function

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update google test expect usage

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
Esteban Papp 2e79451280 Fixes AzCore for MSVC
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Artur K 567c0ae24d
Modernization + AZStd::function compare fix. (#3680)
* Modernization + small fix.

Modernize ( `bool`/`override`/other) code in AzCore, AzFramework, AzQtComponents, AzToolsFramework, etc.
Replaced a `bind` or two, use `using` in a few places as well.

Fix nullptr comparison of AZStd::function.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Apply review-based changes

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Esteban Papp d4ee5423a9 Code/Framework/AzCore
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp b96b99363c Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 9245a31196 more fixes for Code
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 61f7fe5dc5 Merge branch 'development' into cmake/AddressSanitizer
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 68b04fa6c1 Merge branch 'development' into cmake/AddressSanitizer
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Legacy/CryCommon/LegacyAllocator.h
4 years ago
Esteban Papp f8e99cd7dd Merge branch 'development' into cmake/SPEC-2513_w4244
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/CryEditDoc.cpp
#	Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp
#	Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp
#	Gems/PhysXDebug/Code/Source/SystemComponent.cpp
4 years ago
Jeremy Ong a5f072f7a9 Remove statistics profiler
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Esteban Papp dd80a3ebae Linux and non-unity build fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp e29479552b alignment fix
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste 58f8b563d0 fix them all
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Mike Balfour 6d563e2e19
[GHI 2178] Vegetation Debugger info was sometimes getting culled (#2209)
* [GHI 2178] Fixed missing vegetation info
The entity debug drawing culling system was removing it due to the level entity not having an AABB.  Since this component can draw infinitely far, it just needed a max AABB.
With the culling fixed, it made another culling problem evident - a bug in the font code where it wasn't culling 3D text rendered behind the camera.  Now it is.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fix problem with debug rendering not immediately showing up.
When using FloatMax for the AABB, it causes math overflows with the initial camera frustrum.  Changing to max/2.0f is sufficient to avoid the overflows.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed normals on mesh raycasts.
The normals needed to be normalized after transformation, and didn't need the non-uniform scale applied to them, since they're normals.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed the bug that prevented max-size AABBs from working with ShapeIntersection::Overlap.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
Esteban Papp 5d7aae9bd8
SPEC-2513 Fixes to enable w4459 (#1107)
* fixing w4459

* Fixes for nounity

* putting OLD_APARAM_USER in a common place to avoid duplicated declarations
5 years ago
pruiksma 1924937150 Fixes from PR review 5 years ago
pruiksma ab84a43a83 Update to HaltonSequence to make it easier to fill your own custom structures with halton sequences. 5 years ago
greerdv 5ef515813e fix another test 5 years ago
greerdv 76202e4000 fix azcore tests 5 years ago
greerdv 945f55378e merge from main 5 years ago
pruiksma 35ef2004a6 Halton sequence added to AzCore/Math/Random.h with unit tests. This work is in support of ATOM-13988 for generating sub-pixel camera offsets for TAA jitter. 5 years ago
greerdv 7def4741cd merge from main 5 years ago
Aaron Ruiz Mora f770e4aa7a
Unifying operators in Matrix3x3, Matrix3x4 and Matrix4x4
- Add operators +, -, * and / too all matrix classes
- Add RetrieveScaleSq and GetReciprocalScaled to all matrix classes
- Add unit tests to all matrix classes
- Fix a bug that causes release configuration not to compile.
5 years ago
Aaron Ruiz Mora 70bd3ea0ff
Performance pass to Cloth CPU Skinning
- Added operator+(Matrix3x4), operator*(float), RetrieveScaleSq and GetReciprocalScaled to Matrix3x4. Used by Cloth CPU Linear Skinning. These operation will be performant as they use SIMD.
- Modified so there are no virtual functions calls at vertex level.
- Caching indices to simplify the loop when applying skinning.
- Caching static variables Matrix3x4 zero and DualQuaternion zero to avoid creating it for every vertex.
- Removing branching to skip joints when the weight is zero, these cases are rarely and this improves performance by removing branching from loops at vertex level.
- Changing skinning influences so it's a continuous block of memory.
- Caching the vector size() if a variable instead of directly using it in a for loop.
5 years ago
greerdv b113f09a71 first pass of changing transform to use float for scale internally rather than Vector3 5 years ago
greerdv 12cbba5fad adding test for Aabb::MultiplyByScale 5 years ago
greerdv d8169e08fb merging from main 5 years ago
greerdv 217009de2b adding tests for transforming Aabb with Matrix3x4 and fixing bug in implementation 5 years ago
alexpete 8469c9ca0a Integrating github/staging through commit 5f214be 5 years ago
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 5 years ago
alexpete a10351f38d Initial commit 5 years ago