Constructor
new PointHelper(renderer, geometryName, shaderName, options)
- Source:
Properties:
Name | Type | Description |
---|---|---|
opts |
Object | An object containing options. |
indices |
Array.<Number> | Indices associated with the data. |
octree |
Lore.Octree | The octree associated with the point cloud. |
filters |
Object | A map mapping filter names to Lore.Filter instances associated with this helper class. |
pointSize |
Number | The scaled and constrained point size of this data. |
pointScale |
Number | The scale of the point size. |
rawPointSize |
Number | The point size before scaling and constraints. |
dimensions |
Object | An object with the properties min and max, each a 3D vector containing the extremes. |
Creates an instance of PointHelper.
Parameters:
Name | Type | Description |
---|---|---|
renderer |
Lore.Renderer | An instance of Lore.Renderer. |
geometryName |
String | The name of this geometry. |
shaderName |
String | The name of the shader used to render the geometry. |
options |
Object | An object containing options. |
Methods
addFilter(name, filter) → {Lore.PointHelper}
- Source:
Add a filter to this point helper.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the filter. |
filter |
Lore.FilterBase | A filter instance. |
Returns:
Itself.
- Type
- Lore.PointHelper
getCenter() → {Lore.Vector3f}
- Source:
Get the center (average) of the point cloud.
Returns:
The center (average) of the point cloud.
- Type
- Lore.Vector3f
getCutoff() → {Number}
- Source:
Get the current cutoff value.
Returns:
The current cutoff value.
- Type
- Number
getDimensions() → {Object}
- Source:
Returns an object containing the dimensions of this point cloud.
Returns:
An object with the properties min and max, each a 3D vector containing the extremes.
- Type
- Object
getFilter(name) → {Lore.FilterBase}
- Source:
Get a filter by name.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of a filter. |
Returns:
A filter instance.
- Type
- Lore.FilterBase
getHue(index) → {Number}
- Source:
Get the hue for a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | An index. |
Returns:
The hue of the specified index.
- Type
- Number
getMaxLength(x, y, z) → {Number}
- Source:
Get the max length of the length of three arrays.
Parameters:
Name | Type | Description |
---|---|---|
x |
Array | |
y |
Array | |
z |
Array |
Returns:
The length of the largest array.
- Type
- Number
getPointScale() → {Number}
- Source:
Get the global point scale.
Returns:
The global point size.
- Type
- Number
getPointSize() → {Number}
- Source:
Get the global point size.
Returns:
The global point size.
- Type
- Number
getPosition(index) → {Number}
- Source:
Get the position for a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | An index. |
Returns:
The position of the specified index.
- Type
- Number
getSaturation(index) → {Number}
- Source:
Get the saturation for a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | An index. |
Returns:
The saturation of the specified index.
- Type
- Number
getSize(index) → {Number}
- Source:
Get the size for a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | An index. |
Returns:
The size of the specified index.
- Type
- Number
initPointSize() → {Lore.PointHelper}
- Source:
Initialize the point size based on the current zoom.
Returns:
Itself.
- Type
- Lore.PointHelper
removeFilter(name) → {Lore.PointHelper}
- Source:
Remove a filter by name.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the filter to be removed. |
Returns:
Itself.
- Type
- Lore.PointHelper
setColors(colors) → {Lore.PointHelper}
- Source:
Set the colors (HSS) for the points.
Parameters:
Name | Type | Description |
---|---|---|
colors |
TypedArray | An array containing the HSS values. |
Returns:
Itself.
- Type
- Lore.PointHelper
setCutoff(cutoff) → {Lore.PointHelper}
- Source:
Set the cutoff value.
Parameters:
Name | Type | Description |
---|---|---|
cutoff |
Number | A cutoff value. |
Returns:
Itself.
- Type
- Lore.PointHelper
setFogDistance(fogStart, fogEnd) → {Lore.PointHelper}
- Source:
Sets the fog start and end distances, as seen from the camera.
Parameters:
Name | Type | Description |
---|---|---|
fogStart |
Number | The start distance of the fog. |
fogEnd |
Number | The end distance of the fog. |
Returns:
Itself.
- Type
- Lore.PointHelper
setHSS(hue, saturation, size, length)
- Source:
Set the HSS values. Sets all indices to the same values.
Parameters:
Name | Type | Description |
---|---|---|
hue |
Number | A hue value. |
saturation |
Number | A saturation value. |
size |
Number | A size value. |
length |
Number | The length of the arrays. |
setHSSFromArrays(hue, saturation, size, length)
- Source:
Set the HSS values.
Parameters:
Name | Type | Description |
---|---|---|
hue |
TypedArray | An array of hue values. |
saturation |
TypedArray | An array of saturation values. |
size |
TypedArray | An array of size values. |
length |
Number | The length of the arrays. |
setHue(hue)
- Source:
Set the hue. If a number is supplied, all the hues are set to the supplied number.
Parameters:
Name | Type | Description |
---|---|---|
hue |
TypedArray | Number | The hue to be set. If a number is supplied, all hues are set to its value. |
setPointScale(pointScale) → {Lore.PointHelper}
- Source:
Sets the global point scale.
Parameters:
Name | Type | Description |
---|---|---|
pointScale |
Number | The global point size. |
Returns:
Itself.
- Type
- Lore.PointHelper
setPointSize(size) → {Number}
- Source:
Set the global point size.
Parameters:
Name | Type | Description |
---|---|---|
size |
Number | The global point size. |
Returns:
The threshold for the raycaster.
- Type
- Number
setPositions(positions) → {Lore.PointHelper}
- Source:
Set the positions of points in this point cloud.
Parameters:
Name | Type | Description |
---|---|---|
positions |
TypedArray | The positions (linear array). |
Returns:
Itself.
- Type
- Lore.PointHelper
setPositionsXYZ(x, y, z, length) → {Lore.PointHelper}
- Source:
Set the positions of points in this point clouds.
Parameters:
Name | Type | Description |
---|---|---|
x |
TypedArray | An array containing the x components. |
y |
TypedArray | An array containing the y components. |
z |
TypedArray | An array containing the z components. |
length |
Number | The length of the arrays. |
Returns:
Itself.
- Type
- Lore.PointHelper
setPositionsXYZHSS(x, y, z, hue, saturation, size) → {Lore.PointHelper}
- Source:
Set the positions and the HSS (Hue, Saturation, Size) values of the points in the point cloud.
Parameters:
Name | Type | Description |
---|---|---|
x |
TypedArray | An array containing the x components. |
y |
TypedArray | An array containing the y components. |
z |
TypedArray | An array containing the z components. |
hue |
TypedArray | An array containing the hues of the data points. |
saturation |
TypedArray | An array containing the saturations of the data points. |
size |
TypedArray | An array containing the sizes of the data points. |
Returns:
Itself.
- Type
- Lore.PointHelper
setRGB(r, g, b) → {Lore.PointHelper}
- Source:
Set the hue from an rgb values.
Parameters:
Name | Type | Description |
---|---|---|
r |
TypeArray | An array containing the red components of the colors. |
g |
TypeArray | An array containing the green components of the colors. |
b |
TypeArray | An array containing the blue components of the colors. |
Returns:
Itself.
- Type
- Lore.PointHelper
setSaturation(hue)
- Source:
Set the saturation. If a number is supplied, all the saturations are set to the supplied number.
Parameters:
Name | Type | Description |
---|---|---|
hue |
TypedArray | Number | The saturation to be set. If a number is supplied, all saturations are set to its value. |
setSize(hue)
- Source:
Set the size. If a number is supplied, all the sizes are set to the supplied number.
Parameters:
Name | Type | Description |
---|---|---|
hue |
TypedArray | Number | The size to be set. If a number is supplied, all sizes are set to its value. |
updateColor(index, color) → {Lore.PointHelper}
- Source:
Update the color (HSS) at a specific index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | The index of the data point. |
color |
Lore.Color | An instance of Lore.Color containing HSS values. |
Returns:
Itself.
- Type
- Lore.PointHelper
updateColors(colors) → {Lore.PointHelper}
- Source:
Update the colors (HSS) for the points.
Parameters:
Name | Type | Description |
---|---|---|
colors |
TypedArray | An array containing the HSS values. |
Returns:
Itself.
- Type
- Lore.PointHelper
updatePointSize()
- Source:
Updates the displayed point size.