Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To programmatically create a “Fit visible” camera, you will compute its value using the model bounding box. In this sample code below you can see a simple way to compute a fit world view

“Default” camera

  1. A3DMiscComputeBoundingBox will compute a Bounding Box for the model.

  2. Then we compute the center of the bounding box. It will be the camera center.

  3. Finally we make a position for the camera. Here I computed a vector from the center position, but you may adjust the values to find the best fitting for your usage.

  4. We use the camera in the HOOPS Publish sample UserDefinedViews.

...

languagecpp

...

View the sample code in our forum post.

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@23189f
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "KBHP"
labelskb-how-to-article
Page Properties
hiddentrue

Related issues

Jira Legacy
serverId43f371d0-7091-3b3c-9683-94c0b791358d
keySDHP-2364