View Full Version : quickly getting a point at UV value using MItMeshPolygon::getPointAtUV?

05 May 2007, 12:53 PM
Hi all,
I have a small problem with a maya plug-in which I've never worked out a solution for and wonder if any of you might have an idea...

I am trying to retrieve world-space point positions given an arbitrary UV value, so I'm NOT looking for vertex positions of specific UVs but the position of a point in space given any UV value. I realise that this can be achieved easily by using MItMeshPolygon::getPointAtUV Like this:

MStatus st;
MItMeshPolygon faceIt(dagPath);

for( ; !faceIt.isDone(); ) {
st = faceIt.getPointAtUV(returnPoint, UV, MSpace::kWorld);
if (st) break; // we found a point

But the problem with this method is that it potentially loops over all the faces in a mesh and this makes the plug-in very slow. Have I missed a really obvious work-around somewhere? or can anyone help me with this?



CGTalk Moderation
05 May 2007, 12:53 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.