new PointCloud(options)
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
* |
optional
Point cloud options:
|
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
-
clear()
-
Clears point cloud data
-
each(callback)
-
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. -
remove()
-
Removes from entity.
-
setOpacity(opacity)
-
Set point cloud opacity.
Name Type Description opacity
number Cloud opacity. -
setPoints(points)
-
Adds points to render.
Name Type Description points
Array.<Array.<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
RenderNode Assigned render node. -
setVisibility(visibility)
-
Sets cloud visibility.
Name Type Description visibility
number Visibility flag.