diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-11-14 21:13:32 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-11-15 23:36:54 +0100 |
commit | 9bb8ebaa1011dc1dc70e3d5bf70c9a55c44b976c (patch) | |
tree | 3dcbab653ba34fa1fdc273887bd377603c4ff4f2 /src/collision/VuCollision.h | |
parent | car AI revision (diff) | |
download | re3-9bb8ebaa1011dc1dc70e3d5bf70c9a55c44b976c.tar re3-9bb8ebaa1011dc1dc70e3d5bf70c9a55c44b976c.tar.gz re3-9bb8ebaa1011dc1dc70e3d5bf70c9a55c44b976c.tar.bz2 re3-9bb8ebaa1011dc1dc70e3d5bf70c9a55c44b976c.tar.lz re3-9bb8ebaa1011dc1dc70e3d5bf70c9a55c44b976c.tar.xz re3-9bb8ebaa1011dc1dc70e3d5bf70c9a55c44b976c.tar.zst re3-9bb8ebaa1011dc1dc70e3d5bf70c9a55c44b976c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/collision/VuCollision.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/collision/VuCollision.h b/src/collision/VuCollision.h new file mode 100644 index 00000000..29ca4cbf --- /dev/null +++ b/src/collision/VuCollision.h @@ -0,0 +1,32 @@ +#pragma once + + +struct VuTriangle +{ + // Compressed int16 but unpacked +#ifdef GTA_PS2 + uint128 v0; + uint128 v1; + uint128 v2; + uint128 plane; +#else + int32 v0[4]; + int32 v1[4]; + int32 v2[4]; + int32 plane[4]; +#endif +}; + +#ifndef GTA_PS2 +extern int16 vi01; +extern CVuVector vf01; +extern CVuVector vf02; +extern CVuVector vf03; +#endif + +extern "C" { +void LineToTriangleCollision(const CVuVector &p0, const CVuVector &p1, const CVuVector &v0, const CVuVector &v1, const CVuVector &v2, const CVuVector &plane); +void LineToTriangleCollisionCompressed(const CVuVector &p0, const CVuVector &p1, VuTriangle &tri); +void SphereToTriangleCollision(const CVuVector &sph, const CVuVector &v0, const CVuVector &v1, const CVuVector &v2, const CVuVector &plane); +void SphereToTriangleCollisionCompressed(const CVuVector &sph, VuTriangle &tri); +} |