Skip to content

Commit

Permalink
#Fix data interface for quantizedDirections in gridvolume
Browse files Browse the repository at this point in the history
  • Loading branch information
diiigle committed Dec 6, 2017
1 parent e1172d5 commit 277326f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/volume/gridvolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ class GridDataSource : public VolumeDataSource {
break;
case EQuantizedDirections:
format = "qdir";
if (m_channels != 3)
if (m_channels != 2)
Log(EError, "Encountered an unsupported quantized direction "
"volume data file (%i channels, only 3 are supported)",
"volume data file (%i channels, only 2 are supported)",
m_channels);
break;
default:
Expand Down Expand Up @@ -579,7 +579,7 @@ class GridDataSource : public VolumeDataSource {

bool supportsFloatLookups() const { return m_channels == 1; }
bool supportsSpectrumLookups() const { return m_channels == 3; }
bool supportsVectorLookups() const { return m_channels == 3; }
bool supportsVectorLookups() const { return (m_volumeType == EFloat32 && m_channels == 3) || (m_volumeType == EQuantizedDirections && m_channels == 2); }
Float getStepSize() const { return m_stepSize; }

Float getMaximumFloatValue() const {
Expand Down

0 comments on commit 277326f

Please sign in to comment.