Open main menu

CDOT Wiki β

Changes

XB PointStream

235 bytes removed, 18:03, 28 December 2010
Parser Interface
*/
load(path)
 
 
////// Getters
/*
@returns {String} parser version
*/
getVersion()version
/*
@returns {Number} the number of points parsed so far by the parser.
*/
getNumParsedPoints()numParsedPoints
/*
@returns {Number} the total number of points in the resource or -1 if unknown.
*/
getNumTotalPoints()numTotalPoints
/*
Get the progress of the parser, how much it has parsed so far.
@returns {Number} value from between 0 to 1 or -1 if unknown.
*/
getProgress()progress
/*
@returns {Number} the number of bytes in the resource or -1 if unknown.
*/
getFileSize()fileSize
</pre>
<pre>
/*
This The following example only demonstrates syntax. It hasn't been testedhow XB PointStream might use a particular parser.
*/
function parseCallback(parser){
 
// Get the version string of the parser
parser.version;
 
// Get the number of parsed points so far
parser.numParsedPoints;
 
// Get the total number of points in the point cloud.
parser.numTotalPoints;
 
// Progress of downloading the point cloud between zero and one.
parser.progress;
 
// File size of the resource in bytes.
parser.fileSize;
}
1
edit