Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
SurfaceExtractor Parameter Error http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=247 |
Page 1 of 1 |
Author: | GM_Riscvul [ Sat Jul 23, 2011 3:18 am ] |
Post subject: | SurfaceExtractor Parameter Error |
I am having a terrible time trying to get the surface extractor to work, and I was hoping someone here might be able to help me. Visual Studio claims the first parameter I'm passing and the expected parameter are exactly the same yet throws an error and says what I am passing is not what the surface extractor is expecting. Quote: No instance of constructor ... matches the argument list I don't understand what I could be doing wrong. My volume is created using a pointer so I should be able to pass the pointer. I have to create my volume this way because I am using classes. Does anyone know what my error is? Thanks Code: Ogre::ManualObject* WorldManager::createManObj(Region reg, Ogre::SceneManager* mSceneMgr, string name, LargeVolume<MaterialDensityPair44> * volData)
{ //Extract the surface // only need single extractor since will extract single mesh first SurfaceMesh<PositionMaterialNormal>* MaterialAll = new SurfaceMesh<PositionMaterialNormal>(); SurfaceMesh<PositionMaterialNormal>* mesh = new SurfaceMesh<PositionMaterialNormal>(); SurfaceExtractor<LargeVolume, MaterialDensityPair44> surfaceExtractor(volData, reg, &MaterialAll); |
Author: | ker [ Sat Jul 23, 2011 12:58 pm ] |
Post subject: | Re: SurfaceExtractor Parameter Error |
your third argument "MaterialAll" is already a pointer... getting the address of that returns a SurfaceMesh** and tries to stuff that into the surface extractor. |
Author: | GM_Riscvul [ Sat Jul 23, 2011 2:34 pm ] |
Post subject: | Re: SurfaceExtractor Parameter Error |
Wow.... ![]() That worked. I suppose I learned my lesson don't rely on intellisense! Thanks for the help! |
Author: | David Williams [ Sun Jul 24, 2011 11:39 am ] |
Post subject: | Re: SurfaceExtractor Parameter Error |
GM_Riscvul wrote: I suppose I learned my lesson don't rely on intellisense! Furthermore, don't just rely on the message in the 'Errors and Warnings' window. If you select the message in this window and then switch to the 'Output' window you get a more detailed message where it would actually list the different types in the example above. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |