Module to access and create Views in a 3D Annot. More...

Data Structures

struct  A3DPDFSectionDisplayData
 Structure to define settings for the cross sections display. These settings are used by HOOPS Publish at PDF creation on every native views that have a clipping plane defined. These settings are not used at runtime with clipping plane created by Javascript. More...
 
struct  A3DPDFViewData
 Structure to define a Camera View. More...
 

Enumerations

enum  A3DPDFEProjectionMode {
  kA3DPDFOrthographicMode = 0,
  kA3DPDFPerspectiveMode = 1
}
 Projection mode: type of projection. More...
 

Functions

A3DStatus A3DPDF3DArtworkAddView (A3DPDF3DArtwork *p3DArtwork, const A3DPDFView *pView)
 Adds a view on the 3D Annot. More...
 
A3DStatus A3DPDF3DArtworkGetViews (A3DPDF3DArtwork *p3DArtwork, A3DUns32 *puiNbViews, A3DPDFView ***pppViews)
 Returns the views objects stored in the artwork. More...
 
A3DStatus A3DPDFViewCreate (A3DPDFDocument *pDoc, const A3DPDFViewData *pViewData, A3DPDFView **ppView)
 Function to create a camera view. More...
 
A3DStatus A3DPDFViewGetExternalName (A3DPDFView *pView, A3DUTF8Char **ppcViewId)
 Returns the identifier of the view. More...
 

Detailed Description

Module to access and create Views in a 3D Annot.

This module describes the functions and structures that allow you to define 3D views on a 3D Annot.

Enumeration Type Documentation

◆ A3DPDFEProjectionMode

Projection mode: type of projection.

Version
6.0
Enumerator
kA3DPDFOrthographicMode 

Orthographic projection.

kA3DPDFPerspectiveMode 

Perspective projection.

Function Documentation

◆ A3DPDFViewCreate()

A3DStatus A3DPDFViewCreate ( A3DPDFDocument pDoc,
const A3DPDFViewData pViewData,
A3DPDFView **  ppView 
)

Function to create a camera view.

The View object is primarily created with this function, and it should be stored in the 3D Artwork with the function A3DPDF3DArtworkAddView.

Parameters
[in,out]pDocThe Document object to work with.
[in]pViewDataThe view parameters.
[out]ppViewThe View object created.
Returns
A3D_SUCCESS in case of success or an error code
Return values

◆ A3DPDF3DArtworkAddView()

A3DStatus A3DPDF3DArtworkAddView ( A3DPDF3DArtwork p3DArtwork,
const A3DPDFView pView 
)

Adds a view on the 3D Annot.

The view is a PDF object and can be activated with PDF actions.

Parameters
[in,out]p3DArtworkThe 3D Artwork object to work with.
[in]pViewThe View to be stored on the 3D Annot.
Returns
A3D_SUCCESS in case of success or an error code
Return values

◆ A3DPDF3DArtworkGetViews()

A3DStatus A3DPDF3DArtworkGetViews ( A3DPDF3DArtwork p3DArtwork,
A3DUns32 puiNbViews,
A3DPDFView ***  pppViews 
)

Returns the views objects stored in the artwork.

The function returns an array of pointer on views objects. The views returned can be issued from native CAD file, or could have been created with A3DPDF3DArtworkAddView function. Alternatively if no default view is defined, HOOPS Publish automatically creates one. This automatic view is returned at the end of the array. Note that the views are created during the 3D annotation creation (A3DPDF3DAnnotCreate), and the automatic view during the 3D annotation insertion (A3DPDFPageInsert3DAnnot). Consequently, this function should be called after the call to A3DPDFPageInsert3DAnnot to be sure to get the whole list of views.

Parameters
[in]p3DArtworkThe 3D Artwork object to work with.
[out]puiNbViewsThe size of the following array of views.
[out]pppViewsThe array of pointer on views objects created.
Returns
A3D_SUCCESS in case of success or an error code
Return values

◆ A3DPDFViewGetExternalName()

A3DStatus A3DPDFViewGetExternalName ( A3DPDFView pView,
A3DUTF8Char **  ppcViewId 
)

Returns the identifier of the view.

The identifier may be used by JavaScript or PDF actions to activate a view. It can also be used to generate poster. The function returns a string.

Memory Management

When A3DPDFViewGetExternalName returns A3D_SUCCESS, ppcViewId can be freed by calling A3DPDFViewGetExternalName with pView set to nullptr

Parameters
[in]pViewThe View object to work with. This object can be retrieved using the function A3DPDF3DArtworkGetViews
[out]ppcViewIdThe identifier as a string.
Returns
A3D_SUCCESS in case of success or an error code
Return values