GM_Riscvul wrote:
I do not have manipulation implemented but it would be very easy to add. If you are interested I can go into more detail on that, but it sounds like you want more of an overview.
Once generation and rendering are in place you can use setvoxel to manipulate the terrain. If you want the user to click a location use polyVox's provided raycasting classes.
Thanks for the response. I did find your project and it looks great, but I've been running into trouble building it - errors below. Which version of visual studio did you use, 2010? I've previously worked with metaballs to add or subtract terrain, is this any different? Can you explain further on the 2 quotes above? Thank you! and great work btw
And the errors I get when building it -
Code:
1>------ Build started: Project: WorldCraft, Configuration: Debug Win32 ------
1> WorldManager.cpp
1> WorldCraft.cpp
1> StdAfx.cpp
1> Perlin.cpp
1>PolyVoxCore.lib(MeshDecimator.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported in function "private: void __thiscall std::bitset<6>::_Xran(void)const " (?_Xran@?$bitset@$05@std@@ABEXXZ)
1>PolyVoxCore.lib(MeshDecimator.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function "private: void __thiscall std::bitset<6>::_Xran(void)const " (?_Xran@?$bitset@$05@std@@ABEXXZ)
1>PolyVoxCore.lib(MeshDecimator.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
1>PolyVoxCore.lib(MeshDecimator.obj) : warning LNK4217: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported in function "public: virtual char const * __thiscall std::logic_error::what(void)const " (?what@logic_error@std@@UBEPBDXZ)
1>MeshManager.obj : error LNK2019: unresolved external symbol "public: __thiscall PolyVox::Region::Region(class PolyVox::Vector<3,int> const &,class PolyVox::Vector<3,int> const &)" (??0Region@PolyVox@@QAE@ABV?$Vector@$02H@1@0@Z) referenced in function "public: void __thiscall MeshManager::operator()(void)" (??RMeshManager@@QAEXXZ)
1>WorldManager.obj : error LNK2001: unresolved external symbol "public: __thiscall PolyVox::Region::Region(class PolyVox::Vector<3,int> const &,class PolyVox::Vector<3,int> const &)" (??0Region@PolyVox@@QAE@ABV?$Vector@$02H@1@0@Z)
1>MeshManager.obj : error LNK2019: unresolved external symbol "public: class PolyVox::Vector<3,int> const & __thiscall PolyVox::Region::getLowerCorner(void)const " (?getLowerCorner@Region@PolyVox@@QBEABV?$Vector@$02H@2@XZ) referenced in function "public: virtual bool __thiscall MeshManager::frameRenderingQueued(struct Ogre::FrameEvent const &)" (?frameRenderingQueued@MeshManager@@UAE_NABUFrameEvent@Ogre@@@Z)
1>WorldManager.obj : error LNK2001: unresolved external symbol "public: class PolyVox::Vector<3,int> const & __thiscall PolyVox::Region::getLowerCorner(void)const " (?getLowerCorner@Region@PolyVox@@QBEABV?$Vector@$02H@2@XZ)
1>MeshManager.obj : error LNK2019: unresolved external symbol "public: void __thiscall PolyVox::Region::setUpperCorner(class PolyVox::Vector<3,int> const &)" (?setUpperCorner@Region@PolyVox@@QAEXABV?$Vector@$02H@2@@Z) referenced in function "public: __thiscall PolyVox::SurfaceExtractor<class PolyVox::LargeVolume,class PolyVox::MaterialDensityPair<unsigned char,4,4> >::SurfaceExtractor<class PolyVox::LargeVolume,class PolyVox::MaterialDensityPair<unsigned char,4,4> >(class PolyVox::LargeVolume<class PolyVox::MaterialDensityPair<unsigned char,4,4> > *,class PolyVox::Region,class PolyVox::SurfaceMesh<class PolyVox::PositionMaterialNormal> *)" (??0?$SurfaceExtractor@VLargeVolume@PolyVox@@V?$MaterialDensityPair@E$03$03@2@@PolyVox@@QAE@PAV?$LargeVolume@V?$MaterialDensityPair@E$03$03@PolyVox@@@1@VRegion@1@PAV?$SurfaceMesh@VPositionMaterialNormal@PolyVox@@@1@@Z)
1>WorldManager.obj : error LNK2001: unresolved external symbol "public: void __thiscall PolyVox::Region::setUpperCorner(class PolyVox::Vector<3,int> const &)" (?setUpperCorner@Region@PolyVox@@QAEXABV?$Vector@$02H@2@@Z)
1>MeshManager.obj : error LNK2019: unresolved external symbol "public: class PolyVox::Vector<3,int> const & __thiscall PolyVox::Region::getUpperCorner(void)const " (?getUpperCorner@Region@PolyVox@@QBEABV?$Vector@$02H@2@XZ) referenced in function "public: __thiscall PolyVox::SurfaceExtractor<class PolyVox::LargeVolume,class PolyVox::MaterialDensityPair<unsigned char,4,4> >::SurfaceExtractor<class PolyVox::LargeVolume,class PolyVox::MaterialDensityPair<unsigned char,4,4> >(class PolyVox::LargeVolume<class PolyVox::MaterialDensityPair<unsigned char,4,4> > *,class PolyVox::Region,class PolyVox::SurfaceMesh<class PolyVox::PositionMaterialNormal> *)" (??0?$SurfaceExtractor@VLargeVolume@PolyVox@@V?$MaterialDensityPair@E$03$03@2@@PolyVox@@QAE@PAV?$LargeVolume@V?$MaterialDensityPair@E$03$03@PolyVox@@@1@VRegion@1@PAV?$SurfaceMesh@VPositionMaterialNormal@PolyVox@@@1@@Z)
1>WorldManager.obj : error LNK2001: unresolved external symbol "public: class PolyVox::Vector<3,int> const & __thiscall PolyVox::Region::getUpperCorner(void)const " (?getUpperCorner@Region@PolyVox@@QBEABV?$Vector@$02H@2@XZ)
1>MeshManager.obj : error LNK2019: unresolved external symbol "public: void __thiscall PolyVox::Region::shift(class PolyVox::Vector<3,int> const &)" (?shift@Region@PolyVox@@QAEXABV?$Vector@$02H@2@@Z) referenced in function "public: void __thiscall PolyVox::SurfaceExtractor<class PolyVox::LargeVolume,class PolyVox::MaterialDensityPair<unsigned char,4,4> >::execute(void)" (?execute@?$SurfaceExtractor@VLargeVolume@PolyVox@@V?$MaterialDensityPair@E$03$03@2@@PolyVox@@QAEXXZ)
1>MeshManager.obj : error LNK2019: unresolved external symbol "public: bool __thiscall PolyVox::Region::containsPoint(class PolyVox::Vector<3,int> const &,unsigned char)const " (?containsPoint@Region@PolyVox@@QBE_NABV?$Vector@$02H@2@E@Z) referenced in function "public: void __thiscall PolyVox::LargeVolume<class PolyVox::MaterialDensityPair<unsigned char,4,4> >::Sampler::setPosition(int,int,int)" (?setPosition@Sampler@?$LargeVolume@V?$MaterialDensityPair@E$03$03@PolyVox@@@PolyVox@@QAEXHHH@Z)
1>WorldManager.obj : error LNK2001: unresolved external symbol "public: bool __thiscall PolyVox::Region::containsPoint(class PolyVox::Vector<3,int> const &,unsigned char)const " (?containsPoint@Region@PolyVox@@QBE_NABV?$Vector@$02H@2@E@Z)
1>MeshManager.obj : error LNK2019: unresolved external symbol "private: bool __thiscall PolyVox::MeshDecimator<class PolyVox::PositionMaterialNormal>::canCollapseNormalEdge(unsigned int,unsigned int)" (?canCollapseNormalEdge@?$MeshDecimator@VPositionMaterialNormal@PolyVox@@@PolyVox@@AAE_NII@Z) referenced in function "private: bool __thiscall PolyVox::MeshDecimator<class PolyVox::PositionMaterialNormal>::canCollapseEdge(unsigned int,unsigned int)" (?canCollapseEdge@?$MeshDecimator@VPositionMaterialNormal@PolyVox@@@PolyVox@@AAE_NII@Z)
1>MeshManager.obj : error LNK2019: unresolved external symbol "unsigned char __cdecl PolyVox::logBase2(unsigned int)" (?logBase2@PolyVox@@YAEI@Z) referenced in function "public: void __thiscall PolyVox::Block<class PolyVox::MaterialDensityPair<unsigned char,4,4> >::initialise(unsigned short)" (?initialise@?$Block@V?$MaterialDensityPair@E$03$03@PolyVox@@@PolyVox@@QAEXG@Z)
1>WorldManager.obj : error LNK2001: unresolved external symbol "unsigned char __cdecl PolyVox::logBase2(unsigned int)" (?logBase2@PolyVox@@YAEI@Z)
1>MeshManager.obj : error LNK2019: unresolved external symbol "bool __cdecl PolyVox::isPowerOf2(unsigned int)" (?isPowerOf2@PolyVox@@YA_NI@Z) referenced in function "public: void __thiscall PolyVox::Block<class PolyVox::MaterialDensityPair<unsigned char,4,4> >::initialise(unsigned short)" (?initialise@?$Block@V?$MaterialDensityPair@E$03$03@PolyVox@@@PolyVox@@QAEXG@Z)
1>WorldManager.obj : error LNK2001: unresolved external symbol "bool __cdecl PolyVox::isPowerOf2(unsigned int)" (?isPowerOf2@PolyVox@@YA_NI@Z)
1>WorldManager.obj : error LNK2019: unresolved external symbol "public: void __thiscall PolyVox::Region::setLowerCorner(class PolyVox::Vector<3,int> const &)" (?setLowerCorner@Region@PolyVox@@QAEXABV?$Vector@$02H@2@@Z) referenced in function "public: void __thiscall PolyVox::LargeVolume<class PolyVox::MaterialDensityPair<unsigned char,4,4> >::resize(class PolyVox::Region const &,unsigned short)" (?resize@?$LargeVolume@V?$MaterialDensityPair@E$03$03@PolyVox@@@PolyVox@@QAEXABVRegion@2@G@Z)
1>PolyVoxCore.lib(MeshDecimator.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) referenced in function __catch$?reserve@?$vector@UIntVertex@?$MeshDecimator@VPositionMaterial@PolyVox@@@PolyVox@@V?$allocator@UIntVertex@?$MeshDecimator@VPositionMaterial@PolyVox@@@PolyVox@@@std@@@std@@QAEXI@Z$0
1>PolyVoxCore.lib(MeshDecimator.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<struct PolyVox::MeshDecimator<class PolyVox::PositionMaterial>::IntVertex> >::~_Container_base_aux_alloc_empty<class std::allocator<struct PolyVox::MeshDecimator<class PolyVox::PositionMaterial>::IntVertex> >(void)" (??1?$_Container_base_aux_alloc_empty@V?$allocator@UIntVertex@?$MeshDecimator@VPositionMaterial@PolyVox@@@PolyVox@@@std@@@std@@IAE@XZ)
1>PolyVoxCore.lib(MeshDecimator.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<struct PolyVox::MeshDecimator<class PolyVox::PositionMaterial>::IntVertex> >::_Container_base_aux_alloc_empty<class std::allocator<struct PolyVox::MeshDecimator<class PolyVox::PositionMaterial>::IntVertex> >(class std::allocator<struct PolyVox::MeshDecimator<class PolyVox::PositionMaterial>::IntVertex>)" (??0?$_Container_base_aux_alloc_empty@V?$allocator@UIntVertex@?$MeshDecimator@VPositionMaterial@PolyVox@@@PolyVox@@@std@@@std@@IAE@V?$allocator@UIntVertex@?$MeshDecimator@VPositionMaterial@PolyVox@@@PolyVox@@@1@@Z)
1>C:\Users\Andrew\Desktop\senior-project-voxel-terrain-generation\Debug\WorldCraft.exe : fatal error LNK1120: 13 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========