3D Artwork Module
Types
Functions
Detailed Description
- group a3d_pdf_3Dartwork_module
Module to define a 3D Artwork to add in a 3D Annotation.
This module describes the functions and structures that allow you to define 3D data in the page.
Function Documentation
-
A3DStatus A3DPDF3DArtworkCreate(A3DPDFDocument *pDoc, const A3DPDF3DArtworkData *p3DArtworkData, A3DPDF3DArtwork **pp3DArtwork)
Function to create the 3D Artwork of the 3D Annot.
- Deprecated:
This function is deprecated. Please use A3DPDF3DArtworkCreate2 instead.
The 3D Artwork object is primarily created with this function, and it should be stored on the 3D Annot through the structure A3DPDF3DAnnotData.
- Version
4.1
- Parameters:
pDoc – [inout] The Document object to work with.
p3DArtworkData – [in] The 3D Artwork parameters.
pp3DArtwork – [out] The 3D Artwork object created.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkCreate2(A3DPDFDocument *pDoc, const A3DPDF3DArtworkData2 *p3DArtworkData, A3DPDF3DArtwork **pp3DArtwork)
Function to create the 3D Artwork of the 3D Annot.
The 3D Artwork object is primarily created with this function, and it should be stored on the 3D Annot through the structure A3DPDF3DAnnotData.
- Version
8.1
- Parameters:
pDoc – [inout] The Document object to work with.
p3DArtworkData – [in] The 3D Artwork parameters.
pp3DArtwork – [out] The 3D Artwork object created.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkGetBoundingSphere(A3DPDF3DArtwork *p3DArtwork, A3DDouble *pdRadius, A3DVector3dData *pCenter)
Get the bounding sphere of the default view of the 3D Artwork.
- Version
5.1
- Parameters:
p3DArtwork – [in] The 3D Artwork object to work with
pdRadius – [out] The radius of the bounding sphere.
pCenter – [out] The center of the bounding sphere.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkAddResourceFromFile(A3DPDF3DArtwork *p3DArtwork, const A3DUTF8Char *pcFullFileName, const A3DUTF8Char *pcResourceName)
Adds a resource to the 3D Artwork, to be consumed by 3D javascript. The function has to be called after the 3D annot has been created with A3DPDF3DAnnotCreate. The resource added in the 3D annotation is to be consumed by javascript stored on 3D context. For example, the following code inserts the geometry in the u3d file into the scene. A new node is created in the model tree that can be moved to an apropriate position.
var axesResource = new Resource("pdf://TS3D_Axes.u3d"); scene.addModel(axesResource); g_axes = scene.nodes.getByName("Axes");
- Version
24.0
- Parameters:
p3DArtwork – [in] The 3D Artwork object to work with
pcFullFileName – [in] The file name of the resource file. The file format is deducted from file extension. Only 3D formats, U3D and PRC are supported.
pcResourceName – [in] The name of the resource. This name is used in javascript to access to the resource.
- Return values:
A3D_SUCCESS –
- Returns:
A3D_SUCCESS in case of success or an error code