|
| 1 | +/** |
| 2 | +* @file llconvexdecomposition.cpp |
| 3 | + |
| 4 | +* @brief Inner implementation of LLConvexDecomposition interface |
| 5 | +* |
| 6 | +* $LicenseInfo:firstyear=2011&license=lgpl$ |
| 7 | +* Second Life Viewer Source Code |
| 8 | +* Copyright (C) 2011, Linden Research, Inc. |
| 9 | +* |
| 10 | +* This library is free software; you can redistribute it and/or |
| 11 | +* modify it under the terms of the GNU Lesser General Public |
| 12 | +* License as published by the Free Software Foundation; |
| 13 | +* version 2.1 of the License only. |
| 14 | +* |
| 15 | +* This library is distributed in the hope that it will be useful, |
| 16 | +* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | +* Lesser General Public License for more details. |
| 19 | +* |
| 20 | +* You should have received a copy of the GNU Lesser General Public |
| 21 | +* License along with this library; if not, write to the Free Software |
| 22 | +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 23 | +* |
| 24 | +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA |
| 25 | +* $/LicenseInfo$ |
| 26 | +*/ |
| 27 | + |
| 28 | +#include "llconvexdecompositionvhacd.h" |
| 29 | +#include "llconvexdecomposition.h" |
| 30 | + |
| 31 | +bool LLConvexDecomposition::s_isInitialized = false; |
| 32 | + |
| 33 | +// static |
| 34 | +bool LLConvexDecomposition::isFunctional() |
| 35 | +{ |
| 36 | + return LLConvexDecompositionVHACD::isFunctional(); |
| 37 | +} |
| 38 | + |
| 39 | +// static |
| 40 | +LLConvexDecomposition* LLConvexDecomposition::getInstance() |
| 41 | +{ |
| 42 | + if ( !s_isInitialized ) |
| 43 | + { |
| 44 | + return nullptr; |
| 45 | + } |
| 46 | + else |
| 47 | + { |
| 48 | + return LLConvexDecompositionVHACD::getInstance(); |
| 49 | + } |
| 50 | +} |
| 51 | + |
| 52 | +// static |
| 53 | +LLCDResult LLConvexDecomposition::initSystem() |
| 54 | +{ |
| 55 | + LLCDResult result = LLConvexDecompositionVHACD::initSystem(); |
| 56 | + if ( result == LLCD_OK ) |
| 57 | + { |
| 58 | + s_isInitialized = true; |
| 59 | + } |
| 60 | + return result; |
| 61 | +} |
| 62 | + |
| 63 | +// static |
| 64 | +LLCDResult LLConvexDecomposition::initThread() |
| 65 | +{ |
| 66 | + return LLConvexDecompositionVHACD::initThread(); |
| 67 | +} |
| 68 | + |
| 69 | +// static |
| 70 | +LLCDResult LLConvexDecomposition::quitThread() |
| 71 | +{ |
| 72 | + return LLConvexDecompositionVHACD::quitThread(); |
| 73 | +} |
| 74 | + |
| 75 | +// static |
| 76 | +LLCDResult LLConvexDecomposition::quitSystem() |
| 77 | +{ |
| 78 | + return LLConvexDecompositionVHACD::quitSystem(); |
| 79 | +} |
| 80 | + |
| 81 | + |
0 commit comments