Commit Graph

207 Commits (master)

Author SHA1 Message Date
elsid 63e984ba24
Use normalized path in BulletShapeManager 3 months ago
Dave Corley 5bca2919c2 CLEANUP: Don't assign invalid extents when loading bounding boxes 6 months ago
elsid 79b73e45a1
Replace std::filesystem::path by std::string and std::string_view in nif code
It's used only for error reporting.
10 months ago
psi29a 5d53eb7566 Merge branch 'russianroulette' into 'master'
BulletNifLoader: Handle NiSkinPartition, reduce false-positive collision generation for NiSwitchNode children

See merge request OpenMW/openmw!3634
1 year ago
Alexei Kotov 754c5a8e2a Restore animated collision shape rescaling 1 year ago
Alexei Kotov b93291840e BulletNifLoader: Handle NiSkinPartition
Add NiSkinPartition recovery helper method
1 year ago
Alexei Kotov 6e7661ca87 BulletNifLoader: Handle only the first child of NiSwitchNode and NiFltAnimationNode
To prevent duplicated collisions in general cases when the node states are similar or only one child is ever active.
For NiLODNode this is definitely not going to work
1 year ago
Alexei Kotov 9a43ca2d00 Move NiGeometry triangulation to NiGeometry 1 year ago
Alexei Kotov c7d5ea9fbf Improve BulletNifLoader handling of extra data
Only handle extra data for the root node(s)
Properly handle MRK flag editor marker filtering
Fix BSXFlags test
1 year ago
Alexei Kotov 2c1db92d04 Don't use Bounding Box node bounds as the original collision shape
Bounding Box node bounds are not used for non-actor collision in Morrowind and the generated box isn't actually used for actor collision in OpenMW
Preserving btBoxShape cloning code because it might get used in the future
1 year ago
Alexei Kotov 9405e5cb3c BulletNifLoader: Replicate node bounds handling more closely 1 year ago
Alexei Kotov 40313019ef BulletNifLoader updates
Refactor root node, visual collision type and filename handling
Only handle BSXFlags for the root, handle BSXFlags collision flag and absence
Properly distinguish collision node and autogenerated flag
1 year ago
Alexei Kotov af24d3fd3c Nth revision of NifLoader geometry handling
Handle BSSegmentedTriShape
1 year ago
Alexei Kotov eb8242946a Improve node record consistency with NifTools 1 year ago
Alexei Kotov bff9231c3b Refactor NiGeometry/BSTriShape
Don't pass invalid geometry data links to the loaders
1 year ago
Alexei Kotov deb051639e Refactor NiBoundingVolume 1 year ago
Alexei Kotov 0fe095303f Rename Controller->NiTimeController, update NiTimeController and related code 1 year ago
Alexei Kotov a7cc4e6ba6 Rename Node->NiAVObject and update everything directly related
Update NiNode
Simplify RootCollisionNode handling in BulletNifLoader
1 year ago
Alexei Kotov ef896faa90 Rename Named->NiObjectNET and update everything directly related to it
BulletNifLoader: properly check if the node has animation controllers
Flatten extra data linked list
1 year ago
Alexei Kotov 89774716fb Modernize NiGeometryData 1 year ago
Alexei Kotov cfd37dbcc6 Modernize NiTriShapeData 1 year ago
Alexei Kotov eba0ab444b Modernize NiTriStripsData 1 year ago
Alexei Kotov fda6b0b4f8 Modernize NiUVData, NiLinesData, NiTriBasedGeomData 1 year ago
Alexei Kotov 2edf3399e2 Modernize extra data records 1 year ago
psi29a c290754077 Revert "Merge branch 'loadSSEAlchemyTable' into 'master'"
This reverts merge request !3267
1 year ago
alekulyn d2896945e8 Load SSE alchemy table 1 year ago
Alexei Kotov 3f252eab5d Copy triangle data from NiSkinPartition 1 year ago
Alexei Dobrohotov 2de8c6b3c0 Don't discard collision for the entire tree if BSXFlags marker flag is set 1 year ago
Petr Mikheev 19fb9f8e14 Handle editor marker bit in BSXFlags 2 years ago
Petr Mikheev fd90a8c9b4 Hide Nif nodes with name "EditorMarker". 2 years ago
Alexei Dobrohotov 562461a659 Unify collision shape transformations 2 years ago
Alexei Dobrohotov 2277bdc1ae Improve btTriangleMesh abuse (bug #6027, part 2) 2 years ago
Alexei Kotov 7fd9b27b54 Don't combine static node collision geometry (bug #6027) 2 years ago
Alexei Kotov c8430ee6c8 Clean up fillTriangleMesh for NiTriStrips 2 years ago
Alexei Kotov 434b4deda1 Don't use xkf if xnif is merely the base model (bug #5371) 2 years ago
elsid 843753da14
Remove unused includes 2 years ago
elsid 0688b6de40
Separate record list reading from its state
To make it possible to set record list state independently from reading NIF
file.
2 years ago
elsid c338c1e5d3
Add Nif::FileView as read only interface for Nif::NIFFile
To make sure interface is scoped to what users require.
2 years ago
elsid f2fb3d6de8
Separate NIFFileReader from NIFFile
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.

Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
elsid 948e2f5db9
Do not use collision shapes with visual only collision to generate navmesh
These collision shapes are not used for actors movement physics simulation.
2 years ago
elsid 5dc612aa54
Replace ciCompareLen with ciStartsWith where possible
`ciCompareLen(a, b, b.size()) == 0` expression is an equivalent of checking for
equality of `a` prefix with size `b.size()` with `b`.

`ciCompareLen(a, b, a.size()) == 0` is also the same thing but `a` is a prefix
`b` should start with.
2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
Petr Mikheev 8b8c304953 Treat empty `RootCollisionNode` in NIF as NCC flag and generate CameraOnly collision shape 3 years ago
elsid b4f12aace1
Explicitly ignore result of std::unique_ptr::release call
components/nifbullet/bulletnifloader.cpp:206:13: warning: the value returned by this function should be used [bugprone-unused-return-value]
            boxShape.release();
            ^~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:232:13: warning: the value returned by this function should be used [bugprone-unused-return-value]
            child.release();
            ^~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:233:13: warning: the value returned by this function should be used [bugprone-unused-return-value]
            mStaticMesh.release();
            ^~~~~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:240:9: warning: the value returned by this function should be used [bugprone-unused-return-value]
        mStaticMesh.release();
        ^~~~~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:246:9: warning: the value returned by this function should be used [bugprone-unused-return-value]
        mAvoidStaticMesh.release();
        ^~~~~~~~~~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:411:9: warning: the value returned by this function should be used [bugprone-unused-return-value]
        childMesh.release();
        ^~~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:425:9: warning: the value returned by this function should be used [bugprone-unused-return-value]
        childShape.release();
        ^~~~~~~~~~~~~~~~~~~~
3 years ago
elsid 72bda2bd10
Avoid redundant initialization
components/nifbullet/bulletnifloader.cpp:79:24: warning: Value stored to 'a' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
        unsigned short a = strip[0], b = strip[0], c = strip[1];
                       ^   ~~~~~~~~
3 years ago
elsid bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
3 years ago
Alexei Kotov e673f9fa76 Clean up NIF flags 3 years ago