Class: PointCloud

og.PointCloud

new og.PointCloud(options)

PointCloud object.
Name Type Description
options * optional Point cloud options:
Name Type Description
points Array.<Array.<number, number, number, number, number, number, number, *>> optional Points cartesian coordinates array, where first three is cartesian coordinates, next fourth is a RGBA color, and last is an point properties.
pointSize number optional Point screen size in pixels.
pickingDistance number optional Point border picking size in screen pixels.
Example

Creates point cloud with two ten pixel size points

new og.Entity({
    pointCloud: {
        pointSize: 10,
        points: [
            [0, 0, 0, 255, 255, 255, 255, { 'name': 'White point' }],
            [100, 100, 0, 255, 0, 0, 255, { 'name': 'Red point' }]
        ]
    }
});

Members

readonlyidnumber

Object unic identifier.

pickingDistancenumber

Point picking border size in pixels.

pointSizenumber

Point screen size in pixels.

visibilityboolean

Cloud visibility.

Methods

TODO
TODO
Clears point cloud data
Each point iterator.
Name Type Description
callback callback

getPoint(index){*}

Returns specific point by index.
Name Type Description
index number Point index.
Returns:
Type Description
* Specific point

getVisibility(){boolean}

Returns:
Type Description
boolean Point cloud visibily.
TODO
Removes from entity.
TODO

setOpacity(opacity)

Set point cloud opacity.
Name Type Description
opacity number Cloud opacity.
TODO

setPointPosition()

TODO

setPoints(points)

Adds points to render.
Name Type Description
points Array.<Array.<number, number, number, number, number, number, number, *>> Point cloud array.
Example
var points = [[0, 0, 0, 255, 255, 255, 255, { 'name': 'White point' }], [100, 100, 0, 255, 0, 0, 255, { 'name': 'Red point' }]];

setRenderNode(renderNode)

Assign rendering scene node.
Name Type Description
renderNode og.scene.RenderNode Assigned render node.

setVisibility(visibility)

Sets cloud visibility.
Name Type Description
visibility number Visibility flag.