View Module

Types

A3DPDFSectionDisplayData

A3DPDFViewData

A3DPDFEProjectionMode

Fields

kA3DPDFOrthographicMode

kA3DPDFPerspectiveMode

Functions

A3DStatus

A3DPDFViewCreate

A3DStatus

A3DPDF3DArtworkAddView

A3DStatus

A3DPDF3DArtworkGetViews

A3DStatus

A3DPDFViewGetExternalName

Detailed Description

group a3d_pdf_view_module

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.

Type Documentation

enum A3DPDFEProjectionMode

Projection mode: type of projection.

Version

6.0

Values:

enumerator kA3DPDFOrthographicMode

Orthographic projection.

enumerator kA3DPDFPerspectiveMode

Perspective projection.

Function Documentation

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.

Version

4.1

Parameters
  • pDoc[inout] The Document object to work with.

  • pViewData[in] The view parameters.

  • ppView[out] The View object created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

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.

Version

4.1

Parameters
  • p3DArtwork[inout] The 3D Artwork object to work with.

  • pView[in] The View to be stored on the 3D Annot.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

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.

Version

4.1

Parameters
  • p3DArtwork[in] The 3D Artwork object to work with.

  • puiNbViews[out] The size of the following array of views.

  • pppViews[out] The array of pointer on views objects created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

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.

When

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

Version

4.1

Parameters
  • pView[in] The View object to work with. This object can be retrieved using the function A3DPDF3DArtworkGetViews

  • ppcViewId[out] The identifier as a string.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code