Extending HOOPS Exchange
By default, HOOPS Exchange does not load all functions exposed by the API. Some functions must be explicitly requested in order to access them.
HOOPS Exchange identifies two types of such functions: experimental and extensions. Both are enabled by defining a C macro, either at the compiler level or within the code.
Experimental Functions
Experimental functions are available when A3DAPI_EXPERIMENTAL
is defined.
This macro includes the A3DSDKExperimental.h header file, which is provided along with the standard headers.
When A3DAPI_EXPERIMENTAL
is defined, your compiler will output a message to highlight the use of experimental features.
Since HOOPS Exchange 2024.7.0, we introduce a first experimental feature with T-Junctions Detection and Removal.
Extension Functions
Extension functions are provided for specific use cases that fall outside the usual HOOPS Exchange API scope.
To enable them, define A3DAPI_EXTENSIONS
.
As of HOOPS Exchange 2024.8.0, no extension functions are available.
Example
This code extends the example provided in Initializing HOOPS Exchange, enabling experimental features by defining A3DAPI_EXPERIMENTAL
on line 2.
#define INITIALIZE_A3D_API
#define A3DAPI_EXPERIMENTAL
#include <A3DSDKIncludes.h>
#include <hoops_license.h>
// Usual initialization code
int main(int argc, char* argv[])
{
A3DBool loaded = A3DSDKLoadLibraryA(PATH_TO_A3DLIBS_DIR);
assert(loaded);
A3DStatus result = A3DLicPutUnifiedLicense(HOOPS_LICENSE);
assert(result == A3D_SUCCESS);
result = A3DDllInitialize(A3D_DLL_MAJORVERSION, A3D_DLL_MINORVERSION);
assert(result == A3D_SUCCESS);
// HOOPS Exchange is now ready to use!
A3DDllTerminate();
A3DSDKUnloadLibrary();
return EXIT_SUCCESS;
}
A3DAPI_EXPERIMENTAL
and A3DAPI_EXTENSIONS
must also be defined in any source file that calls one of these additional functions.
For simplicity, you can define the macros at the compiler level using a compiler option such as /D
or -D
.