Getting HOOPS Exchange Extensions

A subset of HOOPS Exchange functions are not exposed using package-provided headers and require your project to provide a specific header file to get them. This file is called A3DSDKExtensions.h.

If you have been given such file, you can extend HOOPS Exchange with it by placing it in any of your project folders that is part of your compiler’s include directories.

Then, upon initializing HOOPS Exchange, add the macro definition A3DAPI_EXTENSIONS right next to INITIALIZE_A3D_API and the additional functions will be available the same way as any other function of the API.

#define INITIALIZE_A3D_API
#define A3DAPI_EXTENSIONS
#include <A3DSDKIncludes.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 ready to use!

  A3DDllTerminate();
  A3DSDKUnloadLibrary();

  return EXIT_SUCCESS;
}

A3DAPI_EXTENSIONS is also required in any source file that calls one of the extended functions.

For simplicity’s sake, it remains possible to define this macro at compiler level. That is using a compiler option such as /D or -D.