Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 39 additions & 29 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1496,41 +1496,19 @@
<map>
<key>platforms</key>
<map>
<key>darwin64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>f290b000b31f9e36f2489946cbc99f5e</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/59995/563653/llphysicsextensions_stub-1.0.542456-darwin64-542456.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
</map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>711f4ec769e4b5f59ba25ee43c11bcbc</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4724/14846/llphysicsextensions_stub-1.0.504712-linux64-504712.tar.bz2</string>
</map>
<key>name</key>
<string>linux64</string>
</map>
<key>windows64</key>
<key>common</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>2e5f1f7046a49d8b0bc295aa878116bc</string>
<string>bc41438b10ac6474cf5560465a3662a64f9e65a81342e4c33f18f6694581c7ee28c9ee6f091c36e80a0b1e10c68205be71eb5f8e40fef115d2c744fc2bbfcb43</string>
<key>hash_algorithm</key>
<string>blake2b</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/60043/564063/llphysicsextensions_stub-1.0.542456-windows-542456.tar.bz2</string>
<string>https://github.com/AlchemyViewer/llphysicsextensions_stub/releases/download/v1.0-cb4900e/llphysicsextensions_stub-1.0-common-17836965684.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
<string>common</string>
</map>
</map>
<key>license</key>
Expand All @@ -1540,7 +1518,7 @@
<key>copyright</key>
<string>Copyright (c) 2010, Linden Research, Inc.</string>
<key>version</key>
<string>1.0.542456</string>
<string>1.0</string>
<key>name</key>
<string>llphysicsextensions_stub</string>
</map>
Expand Down Expand Up @@ -2966,6 +2944,38 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>description</key>
<string>Discord Social SDK</string>
</map>
<key>vhacd</key>
<map>
<key>platforms</key>
<map>
<key>common</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>140d8fc952a10edb5f2d72ab405336019ef32cadfa64f0cfce76c9de4bc6268cbc87cc8cd89d3417fb78b531d441701afc8d016bafe4bd275df2707f7daf1387</string>
<key>hash_algorithm</key>
<string>blake2b</string>
<key>url</key>
<string>https://github.com/AlchemyViewer/3p-vhacd/releases/download/v4.1.0-r2/vhacd-4.1.0-r2-common-18166921729.tar.zst</string>
</map>
<key>name</key>
<string>common</string>
</map>
</map>
<key>license</key>
<string>BSD</string>
<key>license_file</key>
<string>LICENSES/vhacd.txt</string>
<key>copyright</key>
<string>Copyright (c) 2011, Khaled Mamou</string>
<key>version</key>
<string>4.1.0-r2</string>
<key>name</key>
<string>vhacd</string>
<key>description</key>
<string>Voxelized Hierarchical Approximate Convex Decomposition</string>
</map>
</map>
<key>package_description</key>
<map>
Expand Down
3 changes: 3 additions & 0 deletions indra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ add_subdirectory(cmake)
add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
add_subdirectory(${LIBS_OPEN_PREFIX}llappearance)
add_subdirectory(${LIBS_OPEN_PREFIX}llcharacter)
if (NOT HAVOK AND NOT HAVOK_TPV)
add_subdirectory(${LIBS_OPEN_PREFIX}llconvexdecomposition)
endif ()
add_subdirectory(${LIBS_OPEN_PREFIX}llcommon)
add_subdirectory(${LIBS_OPEN_PREFIX}llcorehttp)
add_subdirectory(${LIBS_OPEN_PREFIX}llimage)
Expand Down
1 change: 1 addition & 0 deletions indra/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ set(cmake_SOURCE_FILES
UI.cmake
UnixInstall.cmake
Variables.cmake
VHACD.cmake
ViewerMiscLibs.cmake
VisualLeakDetector.cmake
LibVLCPlugin.cmake
Expand Down
8 changes: 7 additions & 1 deletion indra/cmake/LLPhysicsExtensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ if (HAVOK)
use_prebuilt_binary(llphysicsextensions_source)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
target_compile_definitions( llphysicsextensions_impl INTERFACE LL_HAVOK=1 )
elseif (HAVOK_TPV)
use_prebuilt_binary(llphysicsextensions_tpv)
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv)
if(WINDOWS)
target_link_libraries( llphysicsextensions_impl INTERFACE ${ARCH_PREBUILT_DIRS}/llphysicsextensions_tpv.lib)
else()
target_link_libraries( llphysicsextensions_impl INTERFACE ${ARCH_PREBUILT_DIRS}/libllphysicsextensions_tpv.a)
endif()
target_compile_definitions( llphysicsextensions_impl INTERFACE LL_HAVOK=1 )
else (HAVOK)
use_prebuilt_binary(llphysicsextensions_stub)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
Expand Down
9 changes: 9 additions & 0 deletions indra/cmake/VHACD.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- cmake -*-
include(Prebuilt)

add_library(ll::vhacd INTERFACE IMPORTED)

use_system_binary(vhacd)
use_prebuilt_binary(vhacd)

target_include_directories(ll::vhacd SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/vhacd/)
39 changes: 39 additions & 0 deletions indra/llconvexdecomposition/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- cmake -*-

project(llconvexdecomposition)

include(00-Common)
include(LLCommon)
include(LLMath)
include(VHACD)

set(llconvexdecomposition_SOURCE_FILES
llconvexdecomposition.cpp
llconvexdecompositionvhacd.cpp
)

set(llconvexdecomposition_HEADER_FILES
CMakeLists.txt
llconvexdecomposition.h
llconvexdecompositionvhacd.h
)

set_source_files_properties(${llconvexdecomposition_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)

list(APPEND llconvexdecomposition_SOURCE_FILES ${llconvexdecomposition_HEADER_FILES})

add_library (llconvexdecomposition ${llconvexdecomposition_SOURCE_FILES})
target_include_directories(llconvexdecomposition INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})

target_link_libraries(llconvexdecomposition
llcommon
llmath
ll::vhacd)

if(WINDOWS)
target_compile_options(llconvexdecomposition PRIVATE /bigobj)
endif()

# Add tests

83 changes: 83 additions & 0 deletions indra/llconvexdecomposition/llconvexdecomposition.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* @file llconvexdecomposition.cpp
* @author falcon@lindenlab.com
* @brief Inner implementation of LLConvexDecomposition interface
*
* $LicenseInfo:firstyear=2011&license=lgpl$
* Second Life Viewer Source Code
* Copyright (C) 2011, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/

#include "linden_common.h"

#include "llconvexdecompositionvhacd.h"
#include "llconvexdecomposition.h"

bool LLConvexDecomposition::s_isInitialized = false;

// static
bool LLConvexDecomposition::isFunctional()
{
return LLConvexDecompositionVHACD::isFunctional();
}

// static
LLConvexDecomposition* LLConvexDecomposition::getInstance()
{
if ( !s_isInitialized )
{
return nullptr;
}
else
{
return LLConvexDecompositionVHACD::getInstance();
}
}

// static
LLCDResult LLConvexDecomposition::initSystem()
{
LLCDResult result = LLConvexDecompositionVHACD::initSystem();
if ( result == LLCD_OK )
{
s_isInitialized = true;
}
return result;
}

// static
LLCDResult LLConvexDecomposition::initThread()
{
return LLConvexDecompositionVHACD::initThread();
}

// static
LLCDResult LLConvexDecomposition::quitThread()
{
return LLConvexDecompositionVHACD::quitThread();
}

// static
LLCDResult LLConvexDecomposition::quitSystem()
{
return LLConvexDecompositionVHACD::quitSystem();
}


Loading