From 373dc625f82b47096893add42c4472e4a57ab7eb Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 9 Feb 2022 22:23:03 +0100 Subject: Moved third-party libraries to a separate subdirectory --- Opcode/OPC_SweepAndPrune.h | 86 ---------------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 Opcode/OPC_SweepAndPrune.h (limited to 'Opcode/OPC_SweepAndPrune.h') diff --git a/Opcode/OPC_SweepAndPrune.h b/Opcode/OPC_SweepAndPrune.h deleted file mode 100644 index cbb87ac..0000000 --- a/Opcode/OPC_SweepAndPrune.h +++ /dev/null @@ -1,86 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/* - * OPCODE - Optimized Collision Detection - * Copyright (C) 2001 Pierre Terdiman - * Homepage: http://www.codercorner.com/Opcode.htm - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains an implementation of the sweep-and-prune algorithm (moved from Z-Collide) - * \file OPC_SweepAndPrune.h - * \author Pierre Terdiman - * \date January, 29, 2000 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Include Guard -#ifndef __OPC_SWEEPANDPRUNE_H__ -#define __OPC_SWEEPANDPRUNE_H__ - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * User-callback, called by OPCODE for each colliding pairs. - * \param id0 [in] id of colliding object - * \param id1 [in] id of colliding object - * \param user_data [in] user-defined data - * \return TRUE to continue enumeration - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - typedef BOOL (*PairCallback) (udword id0, udword id1, void* user_data); - - class SAP_Element; - class SAP_EndPoint; - class SAP_Box; - - class OPCODE_API SAP_PairData - { - public: - SAP_PairData(); - ~SAP_PairData(); - - bool Init(udword nb_objects); - - void AddPair(udword id1, udword id2); - void RemovePair(udword id1, udword id2); - - void DumpPairs(Pairs& pairs) const; - void DumpPairs(PairCallback callback, void* user_data) const; - private: - udword mNbElements; //!< Total number of elements in the pool - udword mNbUsedElements; //!< Number of used elements - SAP_Element* mElementPool; //!< Array of mNbElements elements - SAP_Element* mFirstFree; //!< First free element in the pool - - udword mNbObjects; //!< Max number of objects we can handle - SAP_Element** mArray; //!< Pointers to pool - // Internal methods - SAP_Element* GetFreeElem(udword id, SAP_Element* next, udword* remap=null); - inline_ void FreeElem(SAP_Element* elem); - void Release(); - }; - - class OPCODE_API SweepAndPrune - { - public: - SweepAndPrune(); - ~SweepAndPrune(); - - bool Init(udword nb_objects, const AABB** boxes); - bool UpdateObject(udword i, const AABB& box); - - void GetPairs(Pairs& pairs) const; - void GetPairs(PairCallback callback, void* user_data) const; - private: - SAP_PairData mPairs; - - udword mNbObjects; - SAP_Box* mBoxes; - SAP_EndPoint* mList[3]; - // Internal methods - bool CheckListsIntegrity(); - }; - -#endif //__OPC_SWEEPANDPRUNE_H__ \ No newline at end of file -- cgit v1.1