mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-19 19:39:30 -06:00
windows fix
This commit is contained in:
@@ -4,27 +4,27 @@
|
||||
"cdfs" : [
|
||||
{
|
||||
"name" : "CCMC-00:00:00",
|
||||
"path" : "../../GM_CDF/3d__var_1_e20000101-000000-000.out.cdf",
|
||||
"path" : "${OPENSPACE_DATA}/../../GM_CDF/3d__var_1_e20000101-000000-000.out.cdf",
|
||||
"date" : "2000-01-01T00:00:00.00"
|
||||
},
|
||||
{
|
||||
"name" : "CCMC-00:30:00",
|
||||
"path" : "../../GM_CDF/3d__var_1_e20000101-003000-000.out.cdf",
|
||||
"path" : "${OPENSPACE_DATA}/../../GM_CDF/3d__var_1_e20000101-003000-000.out.cdf",
|
||||
"date" : "2000-01-01T00:30:00.00"
|
||||
},
|
||||
{
|
||||
"name" : "CCMC-01:00:00",
|
||||
"path" : "../../GM_CDF/3d__var_1_e20000101-010000-000.out.cdf",
|
||||
"path" : "${OPENSPACE_DATA}/../../GM_CDF/3d__var_1_e20000101-010000-000.out.cdf",
|
||||
"date" : "2000-01-01T10:00:00.00"
|
||||
},
|
||||
{
|
||||
"name" : "CCMC-01:30:00",
|
||||
"path" : "../../GM_CDF/3d__var_1_e20000101-013000-000.out.cdf",
|
||||
"path" : "${OPENSPACE_DATA}/../../GM_CDF/3d__var_1_e20000101-013000-000.out.cdf",
|
||||
"date" : "2000-01-01T01:30:00.00"
|
||||
},
|
||||
{
|
||||
"name" : "CCMC-02:00:00",
|
||||
"path" : "../../GM_CDF/3d__var_1_e20000101-020000-000.out.cdf",
|
||||
"path" : "${OPENSPACE_DATA}/../../GM_CDF/3d__var_1_e20000101-020000-000.out.cdf",
|
||||
"date" : "2000-01-01T02:00:00.00"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -578,7 +578,7 @@ void IswaManager::addCdfFiles(std::string path){
|
||||
path = absPath(path);
|
||||
if(FileSys.fileExists(path)){
|
||||
|
||||
std::string basePath = path.substr(0, path.find_last_of("/\\"));
|
||||
//std::string basePath = path.substr(0, path.find_last_of("/\\"));
|
||||
std::ifstream jsonFile(path);
|
||||
|
||||
if (jsonFile.is_open()){
|
||||
@@ -604,7 +604,7 @@ void IswaManager::addCdfFiles(std::string path){
|
||||
std::string path = cdf["path"];
|
||||
std::string date = cdf["date"];
|
||||
|
||||
_cdfInformation[groupName].push_back({name, basePath+"/"+path, groupName, date, fieldlineSeedsIndexFile});
|
||||
_cdfInformation[groupName].push_back({name, path, groupName, date, fieldlineSeedsIndexFile});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void Histogram::changeRange(float minValue, float maxValue){\
|
||||
for(int i=0; i<_numBins; i++){
|
||||
float unNormalizedValue = i*(oldMax-oldMin)+oldMin;
|
||||
float normalizedValue = (unNormalizedValue - _minValue) / (_maxValue - _minValue); // [0.0, 1.0]
|
||||
int binIndex = std::min( floor(normalizedValue * _numBins), _numBins - 1.0 ); // [0, _numBins - 1]
|
||||
int binIndex = std::min( (float)floor(normalizedValue * _numBins), _numBins - 1.0f ); // [0, _numBins - 1]
|
||||
|
||||
newData[binIndex] = oldData[i];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user