The sandboxes are fully functional applications shipped with HOOPS Native Platform (HNP) which facilitate learning about the major capabilities of the HOOPS ecosystem. They can also be used as starting points for your own applications or as models which demonstrate how to work with HNP. Working through these applications and understanding the source code will help you grasp the fundamentals and get started quickly.

Two sandbox implementations are provided with HNP:

  • MFC Sandbox (C++)

  • WPF Sandbox (C#)

Only the MFC Sandbox is discussed in this tutorial, but the WPF Sandbox is similar enough that you should be able to follow along if you are using C#. The sandbox explained here is only available on Windows, although others exist for a variety of platforms.

HOOPS Native Platform uses the HOOPS Visualize HPS API for rendering and HOOPS Exchange for model loading and translation. The HPS API abstracts these separate libraries into a single unified API. This GUI-independent API provides for the visualization requirements of most modern engineering applications as well as functionality for viewing, interaction, CAD file import and export, model structure browsing, and more. The HOOPS Exchange portion of this API is referred to as the “Exchange Sprocket”, which can simply be thought of as a plug-in or module.

For users who want to focus on immediate integration, please see the sample code available for both HOOPS Visualize and HOOPS Exchange.

This guide will walk you through the MFC Sandbox code so you can see how all the components work together in a basic application. If you want to follow along, you can find the sandbox project at <HNP_INSTALL_DIR>/samples/visualize/mfc_sandbox. You may also find it beneficial to have the HPS Programming Guide open and available for reference as you read on. Please note that if you want to build and run the MFC Sandbox, you will need the MFC libraries installed on your machine.

Throughout this walkthrough, you will see code snippets which the sandbox uses to implement the functionality being discussed. At the top left of each code snippet box, you’ll see a filename which is where you can find the snippet.


You’re encouraged to open these files in an editor or IDE to follow along and get a better feel for how the code is structured.