HOOPS Visualize Documentation

< Home

< Tutorials

< Support Portal

SAMPLE CODE

The following is a list of code samples available to HOOPS Visualize developers. These samples are short snippets that demonstrate a specific functional topic. The source code for each sample is distributed as part of the Visualize package. The sample sources are located at <hps_install_dir>/samples/code/. To run a specific sample, you must first build the samples project. Then, execute the program and specify the sample name on the command line. Optionally, you can provide a driver to use as well.

For example, to run the "bloom_silhouette" sample using the OpenGL2 driver:

hps_samples.exe -t bloom_silhouette -d OpenGL2


bloom_silhouette
bloom_silhouette.cpp
bloom_silhouette.cs

This sample shows the user how to:

See also: Programming Guide section 8.4 and section 8.9


complex_clip_regions
complex_clip_regions.cpp
complex_clip_regions.cs

This sample shows the user how to:

See also: Programming Guide section 3.5


conditional_styles_and_includes
conditional_styles_and_includes.cpp
conditional_styles_and_includes.cs

This sample shows the user how to:

See also: Programming Guide section 4.3


custom_event
custom_event.cpp
custom_event.cs

This sample shows the user how to:

See also: Programming Guide section 10.2


database_search
database_search.cpp
database_search.cs

This sample shows the user how to:

See also: Programming Guide section 1.1


This sample shows the user how to:
  • Walk the component structure of a CADModel
  • Highlight a specific instance of a component
  • Highlight all instances of a component
  • Build a KeyPath
  • Define a named style used for highlighting
See also: Programming Guide section 1.2.1, section 6.4

This sample shows the user how to:
  • Import an Exchange file and check for exceptions
  • Traverse the component structure of a CADModel
  • Obtain a component from a selection event
  • Highlight a selected component
  • Define named styles and glyphs
See also: Programming Guide section 6.1, section 6.4, section 4.3, section 4.5

This sample shows the user how to:
  • Load an Exchange file and check for IO exceptions
  • Walk down a component structure
  • Verify the type of a component
  • Defining named styles
  • Highlighting PMIs and geometry referenced by a particular PMI component
  • Hide components using highlighting
  • Use a KeyPath to operate on a particular instance of geometry
See also: Programming Guide section 1.2.1, section 6.4

This sample shows the user how to:
  • Load an Exchange file through Exchange and check for Exchange IO exceptions
  • Output a 3D PDF file through Publish and check for Exchange IO exceptions
See also: Programming Guide section 9.3, section 9.4

hardcopy_export
hardcopy_export.cpp
hardcopy_export.cs

This sample shows the user how to:


hidden_line
hidden_line.cpp
hidden_line.cs

This sample shows the user how to:

See also: Programming Guide section 8.7


hidden_line_advanced
hidden_line_advanced.cpp
hidden_line_advanced.cs

This sample shows the user how to:

See also: Programming Guide section 8.7


highlighting
highlighting.cpp
highlighting.cs

This sample shows the user how to:

See also: Programming Guide section 4.3 and section 6.4


image_background
image_background.cpp
image_background.cs

This sample shows the user how to:

See also: Programming Guide section 4.1, section 3.3


image_io
image_io.cpp
image_io.cs

This sample shows the user how to:

See also: Programming Guide section 8.3


image_output
image_output.cpp
image_output.cs

This sample shows the user how to:

See also: Programming Guide section 7.2


insert cube
insert_cube.cpp
insert_cube.cs

This sample shows the user how to:

See also: Programming Guide section 2.1


interpolation
interpolation.cpp
interpolation.cs

This sample shows the user how to:

See also: Programming Guide section 5.1, section 8.6


lightweight_subwindow
lightweight_subwindow.cpp
lightweight_subwindow.cs

This sample shows the user how to:


mask_transforms
mask_transforms.cpp
mask_transforms.cs

This sample shows the user how to:

See also: Programming Guide section 3.2.6


meshes
meshes.cpp
meshes.cs

This sample shows the user how to:

See also: Programming Guide section 2.2


priority
priority.cpp
priority.cs

This sample shows the user how to:

See also: Programming Guide section 8.7.1


publish_widgets
publish_widgets.cpp
publish_widgets.cs

This sample shows the user how to:

See also: Programming Guide section 9.6


quickmoves
quickmoves.cpp
quickmoves.cs

This sample shows the user how to:

See also: Programming Guide section 6.3


render_modes
render_modes.cpp
render_modes.cs

This sample shows the user how to:

See also: Programming Guide section 8.5


segment_attributes
segment_attributes.cpp
segment_attributes.cs

This sample shows the user how to:

See also: Programming Guide section 1.1.3, section 3.3


select_by_point
select_by_point.cpp
select_by_point.cs

This sample shows the user how to:

See also: Programming Guide section 6.3, "selection" sample


shell_attributes
shell_attributes.cpp
shell_attributes.cs

This sample shows the user how to:

See also: Programming Guide section 2.1


selection
selection.cpp
selection.cs

This sample shows the user how to:

See also: Programming Guide section 6.3, section 6.4, section 4.3, section 4.5


spotlight
spotlight.cpp
spotlight.cs

This sample shows the user how to:

See also: Programming Guide section 2.4


subshell_attributes
sub_shell_attributes.cpp
sub_shell_attributes.cs

This sample shows the user how to:

See also: Programming Guide section 5.5.1


textures
textures.cpp
textures.cs

This sample shows the user how to:

See also: Programming Guide section 4.1, section 5.1.1, section 5.3