diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h index 3452a1f0..d48abdfe 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h @@ -145,7 +145,11 @@ namespace PolyVox class LargeVolume : public Volume { public: +#if defined(_MSC_VER) //DIRTY HACK!!! + class Sampler : public Volume::Sampler< LargeVolume > +#else class Sampler : public Volume::template Sampler< LargeVolume > +#endif { public: Sampler(LargeVolume* volume); @@ -203,7 +207,7 @@ namespace PolyVox private: //The current volume - LargeVolume* mVolume; + //LargeVolume* mVolume; //The current position in the volume int32_t mXPosInVolume; diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl index 9e667fa1..97798d80 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolumeSampler.inl @@ -36,8 +36,10 @@ namespace PolyVox { template LargeVolume::Sampler::Sampler(LargeVolume* volume) - :mVolume(volume) + //:mVolume(volume) { + //Dodgy doing this - need to find how to call base constructor + mVolume = volume; } template diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.h b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.h index 91c89e79..0fa08c2c 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolume.h @@ -38,7 +38,11 @@ namespace PolyVox { public: #ifndef SWIG +#if defined(_MSC_VER) //DIRTY HACK!!! + class Sampler : public Volume::Sampler< RawVolume > +#else class Sampler : public Volume::template Sampler< RawVolume > +#endif { public: Sampler(RawVolume* volume); @@ -92,7 +96,7 @@ namespace PolyVox private: //The current volume - RawVolume* mVolume; + //RawVolume* mVolume; //The current position in the volume int32_t mXPosInVolume; diff --git a/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl index e0f9bfff..99c4bc6a 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/RawVolumeSampler.inl @@ -31,13 +31,15 @@ namespace PolyVox { template RawVolume::Sampler::Sampler(RawVolume* volume) - :mVolume(volume) - ,mXPosInVolume(0) + //:mVolume(volume) + :mXPosInVolume(0) ,mYPosInVolume(0) ,mZPosInVolume(0) ,mCurrentVoxel(0) ,m_bIsCurrentPositionValid(false) { + //Dodgy doing this - need to find how to call base constructor + mVolume = volume; } template diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h index 7391b61c..eba5177a 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h @@ -60,7 +60,11 @@ namespace PolyVox uint8_t m_uSideLengthPower; }; +#if defined(_MSC_VER) //DIRTY HACK!!! + class Sampler : public Volume::Sampler< SimpleVolume > +#else class Sampler : public Volume::template Sampler< SimpleVolume > +#endif { public: Sampler(SimpleVolume* volume); @@ -118,7 +122,7 @@ namespace PolyVox private: //The current volume - SimpleVolume* mVolume; + //SimpleVolume* mVolume; //The current position in the volume int32_t mXPosInVolume; diff --git a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl index 3190a8d2..54161735 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/SimpleVolumeSampler.inl @@ -36,8 +36,10 @@ namespace PolyVox { template SimpleVolume::Sampler::Sampler(SimpleVolume* volume) - :mVolume(volume) + //:mVolume(volume) { + //Dodgy doing this - need to find how to call base constructor + mVolume = volume; } template diff --git a/library/PolyVoxCore/include/PolyVoxCore/Volume.h b/library/PolyVoxCore/include/PolyVoxCore/Volume.h index cc6a436d..b85eb701 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Volume.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Volume.h @@ -88,7 +88,7 @@ namespace PolyVox inline VoxelType peekVoxel1px1py1pz(void) const; protected: - DerivedVolumeType* m_pDerivedVolume; + DerivedVolumeType* mVolume; }; #endif