Announcement

Collapse
No announcement yet.

How set or get an "user tag" information in SoFaceDetail

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How set or get an "user tag" information in SoFaceDetail

    Dear users of the OpenInventor forum,

    I have "cube-like" geometry providing a SoFaceDetail, using SoRayPickAction;

    now if I close and run the demo application again, the select action gives me a SoFaceDetail with the same face identification number, on every run.

    My qestion is "will i have always the same face id?"

    If not, how i can "attach" a tag to it?

    I hope to be clear in explaining the question.

    Thank You in advance.

    Regards,

    Vincenzo

  • #2
    Originally posted by [email protected] View Post
    I have "cube-like" geometry providing a SoFaceDetail, using SoRayPickAction;
    now if I close and run the demo application again, the select action gives me a SoFaceDetail with the same face identification number, on every run.
    My qestion is "will i have always the same face id?"
    Hi Vincenzo,
    Short answer: Yes.
    Longer answer: The getFaceIndex() method in SoFaceDetail simply returns an "index" indicating which face in the shape was picked. This only depends on how the shape was defined, i.e. in what order the faces are defined. So as long as the definition of the shape remains the same, picking on the same face will always return the same index.
    It is not currently possible to assign an arbitrary tag to a face.
    Regards,
    Mike

    Comment


    • #3
      Good Morning Mike and thank You very much for Your support and explanation!

      Have a nice day!
      Regards,

      Vincenzo

      Comment

      Working...
      X