mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Fix a couple of point cloud related problems
* crash that occurs when loading an empty dataset * trying to access outside of range when sampling color or size values
This commit is contained in:
@@ -1072,12 +1072,12 @@ std::vector<float> RenderablePointCloud::createDataSlice() {
|
||||
}
|
||||
|
||||
// Colors
|
||||
if (_hasColorMapFile) {
|
||||
if (_hasColorMapFile && colorParamIndex > -1) {
|
||||
result.push_back(e.data[colorParamIndex]);
|
||||
}
|
||||
|
||||
// Size data
|
||||
if (_hasDatavarSize) {
|
||||
if (_hasDatavarSize && sizeParamIndex > -1) {
|
||||
// @TODO: Consider more detailed control over the scaling. Currently the value
|
||||
// is multiplied with the value as is. Should have similar mapping properties
|
||||
// as the color mapping
|
||||
|
||||
Reference in New Issue
Block a user