841 |
case curve_type_nonlinear: |
case curve_type_nonlinear: |
842 |
for (int velocity = 0; velocity < 128; velocity++) { |
for (int velocity = 0; velocity < 128; velocity++) { |
843 |
pVelocityAttenuationTable[velocity] = |
pVelocityAttenuationTable[velocity] = |
844 |
GIG_VELOCITY_TRANSFORM_NONLINEAR((double)(velocity+1),(double)(VelocityResponseDepth+1),(double)VelocityResponseCurveScaling); |
GIG_VELOCITY_TRANSFORM_NONLINEAR(((double)velocity),((double)VelocityResponseDepth),((double)VelocityResponseCurveScaling)); |
845 |
if (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0; |
if (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0; |
846 |
else if (pVelocityAttenuationTable[velocity] < 0.0) pVelocityAttenuationTable[velocity] = 0.0; |
else if (pVelocityAttenuationTable[velocity] < 1e-15) pVelocityAttenuationTable[velocity] = 0.0; |
847 |
} |
} |
848 |
break; |
break; |
849 |
case curve_type_linear: |
case curve_type_linear: |
850 |
for (int velocity = 0; velocity < 128; velocity++) { |
for (int velocity = 0; velocity < 128; velocity++) { |
851 |
pVelocityAttenuationTable[velocity] = |
pVelocityAttenuationTable[velocity] = |
852 |
GIG_VELOCITY_TRANSFORM_LINEAR((double)velocity,(double)(VelocityResponseDepth+1),(double)VelocityResponseCurveScaling); |
GIG_VELOCITY_TRANSFORM_LINEAR(((double)velocity),((double)VelocityResponseDepth),((double)VelocityResponseCurveScaling)); |
853 |
if (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0; |
if (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0; |
854 |
else if (pVelocityAttenuationTable[velocity] < 0.0) pVelocityAttenuationTable[velocity] = 0.0; |
else if (pVelocityAttenuationTable[velocity] < 1e-15) pVelocityAttenuationTable[velocity] = 0.0; |
855 |
} |
} |
856 |
break; |
break; |
857 |
case curve_type_special: |
case curve_type_special: |
858 |
for (int velocity = 0; velocity < 128; velocity++) { |
for (int velocity = 0; velocity < 128; velocity++) { |
859 |
pVelocityAttenuationTable[velocity] = |
pVelocityAttenuationTable[velocity] = |
860 |
GIG_VELOCITY_TRANSFORM_SPECIAL((double)(velocity+1),(double)(VelocityResponseDepth+1),(double)VelocityResponseCurveScaling); |
GIG_VELOCITY_TRANSFORM_SPECIAL(((double)velocity),((double)VelocityResponseDepth),((double)VelocityResponseCurveScaling)); |
861 |
if (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0; |
if (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0; |
862 |
else if (pVelocityAttenuationTable[velocity] < 0.0) pVelocityAttenuationTable[velocity] = 0.0; |
else if (pVelocityAttenuationTable[velocity] < 1e-15) pVelocityAttenuationTable[velocity] = 0.0; |
863 |
} |
} |
864 |
break; |
break; |
865 |
case curve_type_unknown: |
case curve_type_unknown: |