It is currently Sat Aug 22, 2020 3:46 pm


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: SurfaceExtractor Parameter Error
PostPosted: Sat Jul 23, 2011 3:18 am 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
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);

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: SurfaceExtractor Parameter Error
PostPosted: Sat Jul 23, 2011 12:58 pm 
User avatar

Joined: Wed Jan 26, 2011 3:20 pm
Posts: 203
Location: Germany
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: SurfaceExtractor Parameter Error
PostPosted: Sat Jul 23, 2011 2:34 pm 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
Wow.... :? I assumed my other arguments were correct because they were not highlighted by the intellisense....

That worked. I suppose I learned my lesson don't rely on intellisense!

Thanks for the help!

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: SurfaceExtractor Parameter Error
PostPosted: Sun Jul 24, 2011 11:39 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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