Compilation environment
SDK is compiled with XCode 14
The SDK is provided as universal macOS binary in 2 versions
- x64 bits Debug version
- x64 bits release version
The demo version of the SDK only contains the debug version.
As a result it is really much slower thant the release but allows to perform all implementation to make a POC.
Preprocessor directives
You need to define some preprocessor directives in the compiler to use the SDK.
- CRUNCHERSDK_DLL_USE must be defined as preprocessor directive.
Includes and namespace
- #include "common_cpp_type.h" must be the first include to use
- #include "3dtype.h" is required as soon as you use 3d related stuff
The code is encapsulated in mootools namespace. You may use USE_MOOTOOLS_NAMESPACE is you want to use that namespace automatically.
Otherwise mootools:: must be placed before any SDK name (ie mootools::C3DIo)
File format support
Support of 3D formats is performed through libPolygonCruncherSDKIO.moox. This file is a dynamic library.
If you need to have 3D I/O file support, you must provide this library with your software.
- Sketchup
Sketchup format can be read using the required provided SketchUpAPI.framework. Put the SketchUpAPI.framework in your application executable path to take advantage of the format.
This framework is included in Sketchup\SketchUpAPI.framework folder of the SDK as a zip file.
If the framework is not available, the format support is removed from the supported format list. You can still use other format provided by libPolygonCruncherSDKIO.moox.
Running the application
You must provide libPolygonCruncherSDK.dylib next your application path. You can optionnaly provide libPolygonCruncherSDKIO.moox
Note: MacOS is looking for:
- libfbxsdk.dylib in @executable_path folder
- libPolygonCruncherSDK.dylib in @loader_path folder
You application might have different requirement, particularly if the SDK is used by a library which is not located in the executable path folder.
Under XCode you may use the following script in your Build phases > Run Script to perform this task automatically:
cp "${MOOTOOLS_SDK_DIR}/fbx/libfbxsdk.dylib" "${TARGET_BUILD_DIR}/libfbxsdk.dylib"
if [
"$CONFIGURATION" ==
"Debug" ];
then
echo "Debug config detected, copying files"
cp "${MOOTOOLS_SDK_DIR}/SDK/bin/macos_debug/libPolygonCruncherSDK.dylib" "${TARGET_BUILD_DIR}/libPolygonCruncherSDK.dylib"
else
echo "Release config detected, copying files"
"${MOOTOOLS_SDK_DIR}/SDK/bin/macos_release/libPolygonCruncherSDK.dylib" "${TARGET_BUILD_DIR}/libPolygonCruncherSDK.dylib"
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27