The HOOPS Visualize installation includes simple applications for a variety of GUI technologies. These applications provide a framework for the tutorials discussed later in this guide, and can also serve as containers for prototyping code. This section reviews how to start with a simple HOOPS Visualize application and insert a 'HelloWorld' text string in the scene-graph. Select the GUI technology that you wish to prototype with:
1 MFC - Microsoft Foundation ClassesThe MFC demonstration application can be found in the HOOPS Visualize solution, mfc_simple_vcXX project. Open the file SampleHView.cpp and find the function OnRunMyCode(). After recompiling the project, the following code will be run when you start the application and click the down arrow:
This code does the following:
This tutorial describes how to take the reference ATL control (called the HOOPS 3D Stream Control), and display the text 'Hello World' in the viewport. It assume some familiarity with ATL. Developers are encouraged to read through the HOOPS/ActiveX documentation to get an idea of what the sample ATL control is all about. The source code and project files for the HOOPS 3D Stream Control is located in <hoops>/demo/atl/Hoops3dStreamCtrl/source.
Let's modify the application to display the 'Hello World' text each time a new window is opened. This can be achieved by adding code to the CHoops3dStreamCtrl::InitModel method which does the following:
The modified sample code for:
Generally, the reference control's source code should not be modified to dynamically create graphical primitives. Rather, it should be referenced on a web page to automatically stream in pre-created HSF files, and/or could could be dynamically interacted with from a web page via it's public COM interface. Again, the HOOPS/ActiveX documentation provides details.
This tutorial describes how to take the 'simple' HOOPS/Winforms application and display the text 'Hello World' in the viewport. You may wish to first review the HOOPS/Winforms documentation to get an idea of the structure of the provided application.
There are two HOOPS/Winforms examples, one for VB.Net and one for C#.Net. Their source code and project files are located in <hoops>/demo/csharp/csharp_simple, and <hoops>/demo/visual_basic/vb_simple. Compile and run the one that you're interested in to make sure your development environment is setup correctly.
Let's modify the application to display the 'Hello World' text each time a new window is opened. This can be achieved by adding code to the custom HSimpleModel constructor which does the following:
The sample code would be added to the HSimpleModel::Init method in SimpleHNPanel.cs:
The sample code would be added to the HSimpleModel::Init method in SimpleHNPanel.vb:
This tutorial describes how to take the 'simple' HOOPS/QT application and display the text 'Hello World' in the viewport. You may wish to first review the HOOPS/QT documentation to get an idea of the structure of the provided application.
The source code to the simple HOOPS/Qt application is located in <hoops>/demo/qt/qt_simple_4. Compile and run it to make sure your development environment is set up correctly.
Let's modify the application to display the 'Hello World' text each time a new window is opened. This can be achieved by adding code to the custom HOOPS/QT widget's constructor, which does the following:
The modified SimpleHQWidget constructor would look like the following:
Note that the sample code could have also been inserted in an overloaded method of HBaseModel::Init.
This tutorial describes how to take the 'simple' HOOPS/Java application and display the text 'Hello World' in the viewport. You may wish to first review the HOOPS/Java documentation to get an idea of the structure of the provided application.
The source code to the simple HOOPS/Java application is located in <hoops>/demo/java/java_simple. Follow the steps in the readme.txt file to recompile and run it.
Let's modify the application to display the 'Hello World' text each time a new window is opened. This can be achieved by adding code to the HSimpleModel::Init which does the following:
The modified HSimpleModel::Init method would look like the following:
Note that the sample code could have also been inserted in an overloaded method of HBaseModel::Init.