Looks ok. Is this a trick question? :gulp:
The best way to know is to run the code. If it works then it's right ;-)
Looks ok. Is this a trick question? :gulp:
The best way to know is to run the code. If it works then it's right ;-)
I tried with that code now, but its selecting all the polygons.
oh I see the problem. You have a semicolon after the 2nd if condition. Remove that!
if (mgIsPolyConcave(rec));
should be:
if (mgIsPolyConcave(rec))
the way it's written now "nothing" happens if the polygon is concave (empty statement) and the next line ALWAYS happens (it's outside of the if).
Thank ypu so much...
This works fine..
static mgbool ccvfaces (mgrec* db, mgrec* parent, mgrec* rec, void* userData)
{
toolrec* toolRec = (toolrec*)userData;
if (mgGetCode(rec) == fltPolygon)
{
if (mgIsPolyConcave(rec))
{
mgSelectOne(rec);
}
}
return MG_TRUE;
}
Good...
Sorry to nag (and we are glad to help) but I would suggest you embrace the Visual Studio debugger. Using it you most likely would have found this on your own. Again, we're happy to help but we do want you to learn and progress and become more independent ;-)
Good...
Sorry to nag (and we are glad to help) but I would suggest you embrace the Visual Studio debugger. Using it you most likely would have found this on your own. Again, we're happy to help but we do want you to learn and progress and become more independent ;-)
My problem is I tried debugging but to be frank I don't know how it works... otherwise I would have skipped these silly questions up to a limit.
I have few questions on that .
1)When I hit debug will the plugin loaded automatically in creator when it opens up??
My problem is I tried debugging but to be frank I donââ¬â¢t know how it worksââ¬Â¦ otherwise I would have skipped these silly questions up to a limit.
I have few questions on that .
1)When I hit debug will the plugin loaded automatically in creator when it opens up??
I assume you are building your plugin in Visual Studio. When you do this, you have to first tell Visual Studio what program to run when you debug. Your plugin is a DLL so VS won't know how to "run" that. You do this in the plugin project properties. In Configuration Properties > Debugging, set the Command to point to the Creator executable. Then, if you built your plugin in debug you should be able to set breaks and step through the code in your plugin.
This topic is a bit larger than we normally handle here on the forum (since there is tons of information on Visual Studio elsewhere) but hopefully we can get you pointed in the right direction.
Craig
is this the right way to select Concave faces?