Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Error C2079 in basevolume.h
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=529
Page 1 of 1

Author:  iamtheben [ Wed Aug 14, 2013 7:04 am ]
Post subject:  Error C2079 in basevolume.h

Hello,

I'm getting the following error
Code:
error C2079: 'PolyVox::BaseVolume<_VoxelType>::m_tBorderValue' uses undefined class 'PolyVox::MaterialDensityPair<Type,NoOfMaterialBits,NoOfDensityBits>' d:\stuff\polyvox\polyvoxcore\include\polyvoxcore\basevolume.h


When calling
Code:
PolyVox::saveVolume<PolyVox::LargeVolume<VoxelType>>(outstream, *volData);


VoxelType is a typedef of MaterialDensity44, I have tried using that instead and MaterialDensity<uint8_t,4,4>, and both gave the same error.

I've also tried using 2.2.1 instead of the latest development build and get the same error.

I'm not sure what I'm doing wrong so hopefully someone can shed some light on this.
The full error from the build output is:
Code:
1>d:\stuff\polyvox\polyvoxcore\include\polyvoxcore\basevolume.h(210): error C2079: 'PolyVox::BaseVolume<_VoxelType>::m_tBorderValue' uses undefined class 'PolyVox::MaterialDensityPair<Type,NoOfMaterialBits,NoOfDensityBits>'
1>          with
1>          [
1>              _VoxelType=VoxelType
1>          ]
1>          and
1>          [
1>              Type=uint8_t,
1>              NoOfMaterialBits=4,
1>              NoOfDensityBits=4
1>          ]
1>          d:\stuff\polyvox\polyvoxcore\include\polyvoxcore\largevolume.h(158) : see reference to class template instantiation 'PolyVox::BaseVolume<_VoxelType>' being compiled
1>          with
1>          [
1>              _VoxelType=VoxelType
1>          ]
1>          d:\stuff\polyvox\polyvoxutil\include\polyvoxutil\serialization.inl(302) : see reference to class template instantiation 'PolyVox::LargeVolume<VoxelType>' being compiled
1>          with
1>          [
1>              VoxelType=VoxelType
1>          ]
1>          c:\users\ben\documents\visual studio 2012\projects\voxworld\voxworld\chunkio.cpp(25) : see reference to function template instantiation 'bool PolyVox::saveVolume<PolyVox::LargeVolume<VoxelType>>(std::ostream &,VolumeType &,PolyVox::VolumeSerializationProgressListener *)' being compiled
1>          with
1>          [
1>              VoxelType=VoxelType,
1>              VolumeType=PolyVox::LargeVolume<VoxelType>
1>          ]


Thanks!

Author:  David Williams [ Wed Aug 14, 2013 10:02 pm ]
Post subject:  Re: Error C2079 in basevolume.h

Actually I would recommend you don't use the 'saveVolume()' function as it is deprecated in the last release and removed completely from the development branch in Git (it's odd that you say you tested the development branch..?).

PolyVox does not really have any volume serialization functionality at the moment and there's no short term plan to add this. You should probably serialize to your own format by iterating over the volume data and writing out the voxel values yourself.

That said, it is possible to use the LargeVolume paging mechanism to achieve serialization (this is what we do in Cubiquity) but it's not quite final, only works for LargeVolume, and is largely undocumented.

Author:  iamtheben [ Wed Aug 14, 2013 10:56 pm ]
Post subject:  Re: Error C2079 in basevolume.h

Ah well, more work for me I suppose.

I think I may have forgotten to remove all the old files when updating to the latest build, hence why those file were still around. I'll delete the entire source and recompile.

Thanks David!

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/