Results 1 to 3 of 3

Thread: pntPolsNum pntPols

  1. #1
    creacon
    Join Date
    Nov 2005
    Location
    Belgium
    Posts
    1,300

    pntPolsNum pntPols

    These new functions were added in LW11, as part of the MeshInfo.

    I am a bit confused in how to use them.

    e.g. pntPolsNum( meshinfo, polyindex, pntindex )

    first parameter: this takes a meshinfo: got that
    third parameter: pntindex: no problem, I can check each polygon and ask how many points it has.

    But the second parameter is a mystery, what is the polyindex? Why doesn't this take a LWPolID?
    If I assume the indices are just numbered from 0 to numpols - 1, how can I get the LWPolID from that index?

    creacon

  2. #2
    Registered User
    Join Date
    Aug 2015
    Location
    New Brunswick, Canada
    Posts
    18
    I'm trying to figure this out too. Doesn't really make sense. It's pretty much the only two functions that take a polygon index. Best I can think of is that the index is the same order that the iterator returns them in maybe? That brings up another question. Does the iterator return items in the same order as pointScan and polyScan? Heck, I can't even find out how to get the object ID to use with the SceneObject global (I'm using the MeshEditOp class right now).

    This has got to be the worst documentation for an API I've ever seen. Not just this class, but the SDK as a whole.

    You asked why it takes a polyindex instead of a polygon ID. Well, I'll go one further. Why does it take a polygon anything? Why not just a point ID? Then again, I'm still trying to figure out how to get the polygon ID of a point ID. Best I've found so far is to get the edge ID's and then the polygon ID's and then check which polygons have the points I'm interested in. Makes for awfully redundant code.

  3. #3
    creacon
    Join Date
    Nov 2005
    Location
    Belgium
    Posts
    1,300
    I need to check my code to see how I solved this, what are you trying to achieve?

    creacon



    Quote Originally Posted by Vorlath View Post
    I'm trying to figure this out too. Doesn't really make sense. It's pretty much the only two functions that take a polygon index. Best I can think of is that the index is the same order that the iterator returns them in maybe? That brings up another question. Does the iterator return items in the same order as pointScan and polyScan? Heck, I can't even find out how to get the object ID to use with the SceneObject global (I'm using the MeshEditOp class right now).

    This has got to be the worst documentation for an API I've ever seen. Not just this class, but the SDK as a whole.

    You asked why it takes a polyindex instead of a polygon ID. Well, I'll go one further. Why does it take a polygon anything? Why not just a point ID? Then again, I'm still trying to figure out how to get the polygon ID of a point ID. Best I've found so far is to get the edge ID's and then the polygon ID's and then check which polygons have the points I'm interested in. Makes for awfully redundant code.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •