diff options
author | aap <aap@papnet.eu> | 2020-11-22 00:13:07 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-11-22 00:13:07 +0100 |
commit | 07303c62d12959927cbb72d4beb131f2647350fa (patch) | |
tree | a364e28683c3d90da8aa7766db7e49c6e2f69d93 /src/core/ZoneCull.h | |
parent | neo screen droplets (diff) | |
download | re3-07303c62d12959927cbb72d4beb131f2647350fa.tar re3-07303c62d12959927cbb72d4beb131f2647350fa.tar.gz re3-07303c62d12959927cbb72d4beb131f2647350fa.tar.bz2 re3-07303c62d12959927cbb72d4beb131f2647350fa.tar.lz re3-07303c62d12959927cbb72d4beb131f2647350fa.tar.xz re3-07303c62d12959927cbb72d4beb131f2647350fa.tar.zst re3-07303c62d12959927cbb72d4beb131f2647350fa.zip |
Diffstat (limited to 'src/core/ZoneCull.h')
-rw-r--r-- | src/core/ZoneCull.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/core/ZoneCull.h b/src/core/ZoneCull.h index 9bc07b8c..10742ffb 100644 --- a/src/core/ZoneCull.h +++ b/src/core/ZoneCull.h @@ -12,7 +12,7 @@ public: float maxz; int32 m_indexStart; - int16 m_groupIndexCount[3]; + int16 m_groupIndexCount[3]; // only useful during resolution stage int16 m_numBuildings; int16 m_numTreadablesPlus10m; int16 m_numTreadables; @@ -26,30 +26,35 @@ public: static void DoStuffEnteringZone_OneTreadable(uint16 i); - static bool TestLine(CVector a1, CVector a2); + static bool TestLine(CVector vec1, CVector vec2); + static bool DoThoroughLineTest(CVector vec1, CVector vec2, CEntity *testEntity); float CalcDistToCullZoneSquared(float x, float y); float CalcDistToCullZone(float x, float y) { return Sqrt(CalcDistToCullZoneSquared(x, y)); }; bool IsEntityCloseEnoughToZone(CEntity* entity, bool checkLevel); + bool PointFallsWithinZone(CVector pos, float radius); + bool TestEntityVisibilityFromCullZone(CEntity *entity, float extraDist, CEntity *LODentity); + void FindTestPoints(); void GetGroupStartAndSize(int32 groupid, int32 &start, int32 &size) { switch (groupid) { + case 0: + default: + // buildings + start = m_indexStart; + size = m_groupIndexCount[0]; + break; case 1: + // treadables + 10m start = m_groupIndexCount[0] + m_indexStart; size = m_groupIndexCount[1]; break; case 2: + // treadables start = m_groupIndexCount[0] + m_groupIndexCount[1] + m_indexStart; size = m_groupIndexCount[2]; break; - default: - start = m_indexStart; - size = m_groupIndexCount[0]; - break; } } - - void FindTestPoints() {}; // todo - bool TestEntityVisibilityFromCullZone(CEntity*, float, CEntity*) { return false; }; // todo }; enum eZoneAttribs @@ -121,5 +126,12 @@ public: static void DoVisibilityTestCullZone(int zoneId, bool doIt); static bool DoWeHaveMoreThanXOccurencesOfSet(int32 count, uint16 *set); - static void CompressIndicesArray() {};// todo + static void CompressIndicesArray(); + static bool PickRandomSetForGroup(int32 zone, int32 group, uint16 *set); + static void ReplaceSetForAllGroups(uint16 *set, uint16 setid); + static void TidyUpAndMergeLists(uint16 *extraIndices, int32 numExtraIndices); + + // debug + static bool LoadTempFile(void); + static void SaveTempFile(void); }; |