PathEngine home | previous: | next: |
Instantiate a content snapshot that was previously saved out to persistant storage.
void loadSnapshot(const char* format, char const * data_Buffer, uint32_t data_BufferEntries, iFaceVertexBuilder& faceVertexBuilder, iSolidObjectsBuilder& solidObjectsBuilder, int32_t& extrudeHeight, int32_t& maxStepHeight, int32_t& maxSlope, iArrayReceiver<const char*>& options) const; |
format |
A C string specifying the format of the data in the buffer.
Currently this can be "xml" or "tok" (lower case). This format string is not retained after the call and can subsequently be safely deleted. | ||
data_Buffer, data_BufferEntries |
(See | ||
faceVertexBuilder | PathEngine will call through to this object to build the face vertex mesh components of the snapshot (if any). | ||
solidObjectsBuilder | PathEngine will call through to this object to build the convex solids components of the snapshot (if any). | ||
extrudeHeight | returns the value saved out for this parameter in the content snapshot. | ||
maxStepHeight | returns the value saved out for this parameter in the content snapshot. | ||
maxSlope | returns the value saved out for this parameter in the content snapshot. | ||
options | Returns the set of attribute and value pairs corresponding to the set of processing options saved out with the snapshot. |
Running 3D content processing against a loaded snapshot should be identical to
running the processing against the original data used to generate the snapshot.
The objects and data buffers set by this method can be passed directly into
iFaceVertexMeshBuilder and iSolidObjectsBuilder derived objects are supplied by the application, and PathEngine will call in to these objects to supply the face vertex mesh and convex solid data that was saved out with the snapshot.
You can either build your own implementations of these interfaces, or (simpler) use the presupplied versions provided in SDKRoot/code/sampleShared/FaceVertexBuilder.h and SDKRoot/code/sampleShared/SolidObjectsBuilder.h.
The snapshot loading functionality is something that is primarily used by PathEngine to troubleshoot issues, or otherwise repeat a 3D content processing operation for technical support or QA purposes, but there can also be situations where this can be useful in the client application.
One potential use, for example, is for importing content snapshots into custom editors or 3rd party content applications, for visualisation and analysis.
The code for this could then look something like the following:
// import a 3D content snapshot cFaceVertexBuilder meshBuilder; // as defined by code in sampleShared cSolidObjectsBuilder solidObjects; // as defined by code in sampleShared int32_t extrudeHeight; int32_t maxStepHeight; int32_t maxSlope; cVectorReceiver<const char*> options; contentProcessing3D.loadSnapshot( format, &fileBuffer.front(), fileBuffer.size(), meshBuilder, solidObjects, extrudeHeight, maxStepHeight, maxSlope, options ); { std::vector<const iFaceVertexMesh*> meshes; meshBuilder.addInterfacePointers(meshes); for(int32_t i = 0; i != meshes.size(); ++i) { ImportFaceVertexMesh(*meshes[i]); } } if(solidObjects) { ImportSolidObjects(*solidObjects); // this can then use iContentProcessing3D::buildHullMeshesForVisualisation(), internally, to convert point clouds to meshes, if desired } |
void loadSnapshot(string format, byte[] data, FaceVertexBuilder faceVertexBuilder, SolidObjectsBuilder solidObjectsBuilder, out int extrudeHeight, out int maxStepHeight, out int maxSlope, out string[] options); |
void loadSnapshot(String format, byte[] data, FaceVertexBuilder faceVertexBuilder, SolidObjectsBuilder solidObjectsBuilder, int_OutArgument extrudeHeight, int_OutArgument maxStepHeight, int_OutArgument maxSlope, Object_OutArgument options); |
Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEngine | next: |