IPointCloudCreator81
This interface provides the methods for adding points to a point cloud layer and finalizing the point cloud creation process. Once the point cloud is complete, you can load it into TerraExplorer, using either ICreator.CreatePointCloudModel or ICreator.CreatePointCloudModelAsync. See “Creating a Point Cloud Model Asynchronously” for a full example of how to create a point cloud model, add points, load it, and fly to it.
|
|
Methods |
|
|
|
Adds points to the point cloud. |
|
|
|
Finishes point cloud creation. |
AddPointsAsync
Adds points to the point cloud asynchronously. Each point is defined by a quadruplet of x, y, z coordinates, and color in hexadecimal format.
§ In JavaScript, use the Float64Array object (not supported in Internet Explorer). E.g.,
var typedArray = [ 0, 0, 1500, 0x8000FFFF, 1, 0, 1500, 0x8000FFFF, 2, 0, 1500, 0x8000FFFF];
var obj = newFloat64Array(typedArray);
§ In C++, pass a SafeArray.
|
JavaScript |
|
|
AddPointsAsync ( inXYZColor) |
|
|
C# |
|
|
ITerraExplorerAsync81 AddPointsAsync ( object inXYZColor) |
|
|
C++ |
|
|
HRESULT AddPointsAsync ( VARIANT inXYZColor, ITerraExplorerAsync81** pVal) |
|
Parameters
inXYZColor
An array of numeric values representing the points added to the point cloud, arranged as quadruplets of x, y, z (double type) and color (Hexadecimal: 0xaabbggrr).
Return Value
pVal
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
· Allows for handling the various stages of the asynchronous operation, from tracking progress to managing rejection/error, and finally resolving the operation (using OnProgress, OnReject, and OnResolve respectively).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
FinishAsync
Finish point cloud creation and return file path of created CPT point cloud model.
|
JavaScript |
|
|
FinishAsync |
|
|
C# |
|
|
ITerraExplorerAsync81 FinishAsync() |
|
|
C++ |
|
|
HRESULT FinishAsync (ITerraExplorerAsync81** pVal) |
|
Return Value
pVal
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
· Upon resolution of the operation, passes a string containing the path to the created point cloud CPT file, to the OnResolve callback.
· Allows for handling the various stages of the asynchronous operation, from tracking progress to managing rejection/error, and finally resolving the operation (using OnProgress, OnReject, and OnResolve respectively).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.