PROGRAMMING GUIDE
In a 3D PDF, all entities in the 3D model are structured in a node tree representation called a 'scene graph'. It is visible in the Adobe Reader in a dedicated navigation panel ("Model Tree"), and can also be accessed programmatically through 3D JavaScript functions. Thus, the scene graph is the accessible part of the 3D content from the PDF part of the document, and a key point is to understand the relationship between 3D entities and nodes in the scene graph.
Scene graph nodes are identified by a unique name, which may differ from the name displayed to the user. The situation is different depending on the format of the 3D stream inside the PDF:
Not all PRC entities are represented in the scene graph. Regarding the model structure, only two kind of entities have corresponding nodes:
Warning: Product Occurrence structure may define instances of a shared sub-product structure (see the documentation on product prototypes). This kind of structure defines a lot of product occurrences that won't lead to a node in the scene graph. It is important to have a good understanding of the prototype architecture to predict the scene graph representation of the structure.
HOOPS Publish contains functions to get the unique names defined by Adobe Reader from PRC entities. They are the function A3DAsmModelFileExportToPrcFile which should use the final A3DRWParamsPrcWriteHelper argument; and the two functions A3DEntityGetPDFNodeIdFromWrite and A3DRWParamsPrcWriteHelperFree.
Basically, the PRC first needs to be created and written to a physical file, with an helper object. Then, the model file will be traversed and entities will be interrogated with this object. Finally, the helper object will need to be deleted.
The steps required to get unique names from PRC entities are illustrated with the sample PublishPRCCube. The sample also implements product occurrence traversal for a use case with shared occurrences and prototypes.