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

Got compile errors in file "Raycast.inl"!
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=527
Page 1 of 1

Author:  pumpkin_zch2u [ Fri Aug 09, 2013 9:56 am ]
Post subject:  Got compile errors in file "Raycast.inl"!

Currently I am trying to port my project to Polyvox 0.2.1. And doing my voxel picking thing. As posted here http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=492.

But when I compile my source code, I get following errors in file "Raycast.inl"!

Code:
1>------ Build started: Project: Basic, Configuration: Debug Win32 ------
1>Build started 8/9/2013 5:46:27 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\Basic.unsuccessfulbuild".
1>CustomBuild:
1>  Moc'ing OpenGLWidget.h...
1>ClCompile:
1>  moc_OpenGLWidget.cpp
1>  OpenGLWidget.cpp
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(74): error C2825: 'VolumeType': must be a class or namespace when followed by '::'
1>          D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(176) : see reference to function template instantiation 'PolyVox::RaycastResult PolyVox::raycastWithEndpoints<VolumeType,Callback>(VolumeType *,const PolyVox::Vector3DFloat &,const PolyVox::Vector3DFloat &,Callback &)' being compiled
1>          with
1>          [
1>              VolumeType=PolyVox::SimpleVolume<uint8_t> *,
1>              Callback=RaycastIntersectionFinder
1>          ]
1>          OpenGLWidget.cpp(439) : see reference to function template instantiation 'PolyVox::RaycastResult PolyVox::raycastWithDirection<PolyVox::SimpleVolume<VoxelType>*,RaycastIntersectionFinder>(VolumeType *,const PolyVox::Vector3DFloat &,const PolyVox::Vector3DFloat &,Callback &)' being compiled
1>          with
1>          [
1>              VoxelType=uint8_t,
1>              VolumeType=PolyVox::SimpleVolume<uint8_t> *,
1>              Callback=RaycastIntersectionFinder
1>          ]
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(74): error C2039: 'Sampler' : is not a member of '`global namespace''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(74): error C2146: syntax error : missing ';' before identifier 'sampler'
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(74): error C3861: 'sampler': identifier not found
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(109): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(109): error C2228: left of '.setPosition' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(113): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(124): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(124): error C2228: left of '.movePositiveX' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(125): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(125): error C2228: left of '.moveNegativeX' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(132): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(132): error C2228: left of '.movePositiveY' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(133): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(133): error C2228: left of '.moveNegativeY' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(140): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(140): error C2228: left of '.movePositiveZ' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(141): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(141): error C2228: left of '.moveNegativeZ' must have class/struct/union
1>          type is ''unknown-type''
1>  main.cpp
1>  window.cpp
1>  Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:12.23
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



I really donnot know what's wrong!

Attachments:
OpenGLWidget.h [3.74 KiB]
Downloaded 247 times
RaycastIntersectionFinder.cpp [290 Bytes]
Downloaded 256 times
RaycastIntersectionFinder.h [851 Bytes]
Downloaded 246 times

Author:  pumpkin_zch2u [ Fri Aug 09, 2013 10:02 am ]
Post subject:  Re: Got compile errors in file "Raycast.inl"!

this 4 files are voxel picking related. are there any bugs there? Currently I am not sure whether the Callback is on its right way!

Attachments:
OpenGLWidget.cpp [21.52 KiB]
Downloaded 259 times

Author:  pumpkin_zch2u [ Fri Aug 09, 2013 10:22 am ]
Post subject:  Re: Got compile errors in file "Raycast.inl"!

I have just check that there are new files added to the .2.1 source named "Picking.inl" within "develop" Branch. May be it can Solve my problem!
https://bitbucket.org/volumesoffun/polyvox/src/7c74e1faff18592dcfe66ae629858fb1c9b69520/library/PolyVoxCore/include/PolyVoxCore/Picking.inl?at=develop

Author:  David Williams [ Sat Aug 10, 2013 7:20 am ]
Post subject:  Re: Got compile errors in file "Raycast.inl"!

Which version of Visual Studio are you using? The released version of PolyVox 0.2.1 should work with 2008 and 2010, but the code in develop branch is currently only tested with 2010.

Do the examples work for you? Perhaps you are not sure because of the Qt5 problems?

You should indeed look at Picking.h/inl. These provide a simpler interface where you do not have to specify a callback function. Instead you just have to provide an example of an empty voxel.

Author:  Dynasty [ Sun Aug 11, 2013 2:02 am ]
Post subject:  Re: Got compile errors in file "Raycast.inl"!

I have compiled polyvox on Visual Studio 2012 as well

Author:  pumpkin_zch2u [ Sun Aug 11, 2013 2:11 am ]
Post subject:  Re: Got compile errors in file "Raycast.inl"!

David Williams wrote:
Which version of Visual Studio are you using? The released version of PolyVox 0.2.1 should work with 2008 and 2010, but the code in develop branch is currently only tested with 2010.

Do the examples work for you? Perhaps you are not sure because of the Qt5 problems?

You should indeed look at Picking.h/inl. These provide a simpler interface where you do not have to specify a callback function. Instead you just have to provide an example of an empty voxel.


Thank you David,the picking.h/inl works now. I am using VC++2010. The problem above is really wired.

Anyway it works.

Author:  David Williams [ Mon Aug 12, 2013 8:04 am ]
Post subject:  Re: Got compile errors in file "Raycast.inl"!

Dynasty wrote:
I have compiled polyvox on Visual Studio 2012 as well


Interesting... did you get the examples to compile? When I tested it I couldn't build the A* pathfinder example due to the use of std::function. Apparently there is a known bug in VS2012 here, so I was actually planning to replace the std::function with more standard callbacks.

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