Author Topic: Mouse selection using vertex information  (Read 2964 times)

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Mouse selection using vertex information
« on: May 19, 2008, 06:04:56 pm »
Hello.

How do I access the transformed vertex information? I understand a IVertexController implementation operates in object space, but could it somehow work in the world? The PolygonManager delivers the transformed vertex, but it assumes that one is operating on polygons. I wouldn't expect the PolygonManager is the obviously choise for this kind of job - the current approach would then give 3x CPU overhead (for triangles).

By custom selection the transformed mesh should be directly accessible, but I can't figure out how...

Thanks in advance!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: Mouse selection using vertex information
« Reply #1 on: May 19, 2008, 06:30:17 pm »
You can get the current world transformation from an object and use that in the vertex controller to calculate the vertex in world space (vertex.matMal(obj.getWorldTransformation())).

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Re: Mouse selection using vertex information
« Reply #2 on: May 19, 2008, 07:50:44 pm »
Thank you for your fast reply - that's excellent.