Summary
The XStream® HDVR® SDK supports saving the mesh geometry contained in an IVertexCallListContext or hdrcVertexCallListContext object to an OBJ, PLY, or STL file. More information about these file formats may be found in the Mesh File Types section.
Saving Mesh Data
In the C++ API, mesh saving is supported through the IPolygonUtilContext::SaveOBJ(), IPolygonUtilContext::SaveSTL(), and IPolygonUtilContext::SavePLY() methods. These methods take as input parameters an IVertexCallListContext object containing the mesh data, and the file name for saving the data.
// Create an IPolygonUtilContext object
IPolygonUtilContext *pPolygonUtil;
pServerContext->CreatePolygonUtil(&pPolygonUtil);
// Using an existing IVertexCallListContext object with geometry to save
pPolygonUtil->SaveOBJ("C:/Data/SampleObject.obj", pVertexCallList);
In the Java/.NET API, mesh saving is supported through the hdrcPolygonUtilContext.saveOBJ(), hdrcPolygonUtilContext.saveSTL(), and hdrcPolygonUtilContext.savePLY() methods. These methods take as input parameters an hdrcVertexCallListContext object containing the mesh data, and the file name for saving the data.
// Create an hdrcPolygonUtilContext object
hdrcPolygonUtilContext polygonUtil;
polygonUtil = serverContext.createPolygonUtil();
// Using an existing hdrcVertexCallListContext object with geometry to save
polygonUtil.saveOBJ("C:/Data/SampleObject.obj", vertexCallList);