Constructor
new PointCloud(optionsopt)
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | * | <optional> | Point cloud options: Properties
|
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
pickingScale :number
Point picking border size in pixels.
Type:
- number
pointSize :number
Point screen size in pixels.
Type:
- number
visibility :boolean
Cloud visibility.
Type:
- boolean
Methods
_deleteBuffers()
Delete buffers
(protected) _update()
Update gl buffers.
clear()
Clears point cloud data
getPoint(index) → {Poi}
Returns specific point by index.
Parameters:
| Name | Type | Description |
|---|---|---|
index | number | Point index. |
Returns:
Specific point
- Type:
- Poi
getVisibility() → {boolean}
Returns:
Point cloud visibility.
- Type:
- boolean
remove()
Removes from entity.
setPoints(points)
Adds points to render.
Parameters:
| Name | Type | Description |
|---|---|---|
points | Array.<Poi> | 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.
Parameters:
| Name | Type | Description |
|---|---|---|
renderNode | RenderNode | Assigned render node. |
setVisibility(visibility)
Sets cloud visibility.
Parameters:
| Name | Type | Description |
|---|---|---|
visibility | boolean | Visibility flag. |