It is currently Sat Aug 22, 2020 1:53 pm


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: PolyVox in c#
PostPosted: Thu Mar 29, 2012 7:33 pm 

Joined: Thu Mar 29, 2012 7:26 pm
Posts: 14
Hey everyone. I downloaded PolyVox and ran the MakeCSharpBindings.bat file and added all the .cs files to my c# project. I was trying to use the tutorial at http://www.volumesoffun.com/polyvox/doc ... rial1.html
but I noticed that the .cs files that are created don't have BaseVolume, which has the getWidth() method, and so I can't get any further in the tutorial. Is there any other place this functionality exists? I really want to use PolyVox with c#. Thanks.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox in c#
PostPosted: Thu Mar 29, 2012 7:51 pm 

Joined: Wed Feb 29, 2012 12:35 am
Posts: 25
Hello!
I think on that tutorial they use SimpleVolume, so you may be looking for something like SimpleVolume.cs


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox in c#
PostPosted: Thu Mar 29, 2012 8:09 pm 

Joined: Thu Mar 29, 2012 7:26 pm
Posts: 14
Hey. In the converted c# files, simplevolume.cpp became SurfaceExtractorSimpleVolumeMaterial8.cs. And this class doesn't have getwidth().


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox in c#
PostPosted: Fri Mar 30, 2012 9:43 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I admit that the bindings are not in good shape, unfortunatly we don't use them ourselves and so they tend to break when we make changes to the library and don't update them. You may need some C++/SWIG knowledge to get them working. That said:

mathius777 wrote:
...simplevolume.cpp became SurfaceExtractorSimpleVolumeMaterial8.cs...


I don't think this is true. SimpleVolume should become SimpleVolumeMaterial8 and SimpleVolumeDensity8, as defined in SimpleVolume.i. What you have identified is actually a surface extractor which operates on a SimpleVolumeMaterial8.

Leave surface extraction aside for a moment, and see if you can just get SimpleVolumeMaterial8 to work. I would expect getWidth() etc to be inherited from the base class but I haven't tested it.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox in c#
PostPosted: Fri Mar 30, 2012 10:47 am 

Joined: Thu Mar 29, 2012 7:26 pm
Posts: 14
You're right I posted the wrong thing, my bad. I was using SimpleVolumeDensity8, which doesnt have getwidth. So it is basically up to me to make the bindings. I can live with that. I just wanted to make sure I wasn't missing something, thanks.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox in c#
PostPosted: Fri Mar 30, 2012 11:46 am 

Joined: Thu Mar 29, 2012 7:26 pm
Posts: 14
A more important thing to ask is why SurfaceTriangle.h doesn't exist anywhere. It is used in SurfaceEdg.cpp, but this .h doesn't exist anywhere, and it's needed to compile the library. Same with SurfaceVertex.h in the same .cpp


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox in c#
PostPosted: Fri Mar 30, 2012 11:59 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
As far as I can see, SurfaceTriangle/SurfaceEdge/SurfaceVertex are no longer part of PolyVox. The source code still exists on disk (and should be removed as it is confusing) but it is never included into the library. The files which are included into the library are controlled by the CMakeLists.txt which you can see here.

Note that SurfaceMesh is still used, but the other Surface*** classes are not.

Edit: I've now removed these old files from the repository, so this should prevent confusion in the future. Don't update though - Git master is rather unstable at the moment.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net