Constructor
new PointCloud(optionsopt)
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | * | <optional> | Point cloud options: Properties
|
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
pickingScale :number
Point picking border size in pixels.
- number
pointSize :number
Point screen size in pixels.
- number
visibility :boolean
Cloud visibility.
- boolean
Methods
_deleteBuffers()
Delete buffers
(protected) _update()
Update gl buffers.
bindScene(scene)
Assign rendering scene node.
| Name | Type | Description |
|---|---|---|
scene | Scene | Assigned render node. |
clear()
Clears point cloud data
getPoint(index) → {IPoint}
Returns specific point by index.
| Name | Type | Description |
|---|---|---|
index | number | Point index. |
Point at the given index.
- Type:
- IPoint
getVisibility() → {boolean}
Point cloud visibility.
- Type:
- boolean
remove()
Removes from entity.
setOpacity(opacity)
Sets opacity for all points in the cloud.
| Name | Type | Description |
|---|---|---|
opacity | number | Opacity value in range [0..1]. |
setPoints(points)
Adds points to render.
| Name | Type | Description |
|---|---|---|
points | Array.<Poi> | Point cloud array. |
var points = [[0, 0, 0, 255, 255, 255, 255, { 'name': 'White point' }], [100, 100, 0, 255, 0, 0, 255, { 'name': 'Red point' }]];setVisibility(visibility)
Sets cloud visibility.
| Name | Type | Description |
|---|---|---|
visibility | boolean | Visibility flag. |