Changed the way distance to Earth is scaled to be in AU

This commit is contained in:
Christian Adamsson
2020-09-21 11:49:51 +02:00
parent dbd20088c5
commit 22fe432cd9
2 changed files with 3 additions and 3 deletions

View File

@@ -425,7 +425,7 @@ RenderableStreamNodes::RenderableStreamNodes(const ghoul::Dictionary& dictionary
, _pFluxNodeskipThreshold(FluxNodeskipThresholdInfo, 0, -20, 10)
, _pRadiusNodeSkipThreshold(RadiusNodeSkipThresholdInfo, 0.f, 0.f, 5.f)
, _pEarthdistGroup({ "Earthfocus" })
, _pDistanceThreshold(DistanceThresholdInfo, 0.0f, 0.0f, 500000000000.0f)
, _pDistanceThreshold(DistanceThresholdInfo, 0.0f, 0.0f, 1.0f)
, _pActiveStreamNumber(ActiveStreamNumberInfo, 0, 0, _numberofStreams)
, _pMisalignedIndex(MisalignedIndexInfo, 0, -5, 20)
, _pFlowColor(

View File

@@ -280,7 +280,7 @@ void CheckdistanceMethod() {
vs_closeToEarth = 0;
//if(distancevec < maxdist){
if(distancevec < distanceThreshold && usingPulse){
if(distancevec < AUtoMeter * distanceThreshold && usingPulse){
vs_closeToEarth = 1;
gl_PointSize = gl_PointSize * 5;
vec4 fluxColor = getTransferFunctionColor(colorTable);
@@ -297,7 +297,7 @@ void CheckdistanceMethod() {
vec4 fluxColor = getTransferFunctionColor(colorTableCMR);
vs_color = vec4(fluxColor.xyz, fluxColorAlpha);
}
if(distance(earthPos, in_position) < distanceThreshold){
if(distance(earthPos, in_position) < AUtoMeter * distanceThreshold){
if(mod(gl_VertexID, nodeSkipEarth) == 0){
DecidehowtoshowClosetoEarth();
}