Author Topic: Picking the part of object  (Read 1888 times)

Offline kupiecu

  • byte
  • *
  • Posts: 9
    • View Profile
Picking the part of object
« on: December 02, 2013, 02:50:22 pm »
Hello
I'm try to do something like this: I have a object. I use a "getMaxPolygonID()" and result is 21 part of object. I want click on part of object (something like click on polygon number1, or better click on group of the poligon ex. (polygon1 + polygon2) and do whatever. I think about "Interact2D", "VisList" and "Polygon Menager" , but I have no idea about this. So my question is, How I can realize samething like:

1)Split object into pieces.
2)Group selected pieces to object

Or, maybe it's different way to do this.

PS. It's my four question, and I'm very glad of jpct support in this forum. It's very helpful and quick.

edit: I found a "getPolygonIDs" from CollisionEvent.. hmm it's what I want?
« Last Edit: December 02, 2013, 02:53:51 pm by kupiecu »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Picking the part of object
« Reply #1 on: December 02, 2013, 03:53:55 pm »
edit: I found a "getPolygonIDs" from CollisionEvent.. hmm it's what I want?
I think so.

Offline kupiecu

  • byte
  • *
  • Posts: 9
    • View Profile
Re: Picking the part of object
« Reply #2 on: December 02, 2013, 09:37:38 pm »
hmm I still no idea. I think but I'm close to a solution of picking, but I still don't know how I can split my object to smallest part. Something like: I have a object and this object have ex. 10 triangle. (triangle = poligon??) And I want split my object to 2 object (each of them has to have 5 triangle?). Then I want ex. translate only one of them. ::)

I know that mayby it's easy or writing in documentation, but as you probably can see, my english is poor, so please help me.
« Last Edit: December 02, 2013, 09:50:00 pm by kupiecu »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Picking the part of object
« Reply #3 on: December 02, 2013, 10:35:37 pm »
Splitting an object at runtime is actually not supported, because it would require a complete rebuild in the vm's memory as well as on the gpu and that would be the exact same thing as creating a new model from scratch. That said, it might help to know exactly what you want to use this feature for to find a solution.