Author Topic: GenericVertexController.getUpdatedMesh()  (Read 4003 times)

Offline AGP

  • quad
  • ******
  • Posts: 1526
    • View Profile
GenericVertexController.getUpdatedMesh()
« on: February 05, 2007, 05:48:41 am »
Egon, if I can make a small request: how about a GenericVertexController.getUpdatedMesh(), which would return the destination mesh with all current modifications, even if it would be slow? Sometimes I want to write my own collision-detection code, and that would be priceless. Thanks in advance.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
GenericVertexController.getUpdatedMesh()
« Reply #1 on: February 05, 2007, 08:48:54 am »
Ok...but what is it supposed to do exactly? The actual mesh is, well, the mesh itself and the mesh's current data can be found in the source array of the controller if ALTER_SOURCE_MESH is used. So what should getUpdatedMesh() do?

Offline AGP

  • quad
  • ******
  • Posts: 1526
    • View Profile
GenericVertexController.getUpdatedMesh()
« Reply #2 on: February 05, 2007, 05:07:09 pm »
But the documentation says, "The GenericVertexController holds a copy of the actual mesh data, i.e. it doesn't get the data directly from the mesh every time." For collision-detection, I would need an up-to-thenanosecond update. Could you do that? And would you?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
GenericVertexController.getUpdatedMesh()
« Reply #3 on: February 05, 2007, 05:12:30 pm »
Yes, i could and i would if it's really needed...but just to be sure: You are changing the mesh's data from outside the controller, don't you?

Offline AGP

  • quad
  • ******
  • Posts: 1526
    • View Profile
GenericVertexController.getUpdatedMesh()
« Reply #4 on: February 05, 2007, 08:38:46 pm »
In this case, I'm not. Just reading from it.

On my bone structure, to weird results, I do.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
GenericVertexController.getUpdatedMesh()
« Reply #5 on: February 08, 2007, 06:15:23 pm »
Ive updated the 1.13beta with a method that refreshs the controller's data with the one from the mesh. I'm still not 100% sure that this really is, what you had in mind, so please let me know if it helps.

Offline AGP

  • quad
  • ******
  • Posts: 1526
    • View Profile
GenericVertexController.getUpdatedMesh()
« Reply #6 on: February 09, 2007, 04:38:34 am »
Awesome, thanks a lot. I'll check and get back to you. Thanks again.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
GenericVertexController.getUpdatedMesh()
« Reply #7 on: February 09, 2007, 11:10:10 pm »
Opps, i forgot to update the docs in that zip. Anyway, with a decent IDE, you should be able to find the method.

Offline AGP

  • quad
  • ******
  • Posts: 1526
    • View Profile
GenericVertexController.getUpdatedMesh()
« Reply #8 on: February 10, 2007, 03:12:34 am »
I don't use IDEs, but I'm about to test it and will assume it's called "getUpdatedMesh()." Otherwise, you'll just have to tell me. :-)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
GenericVertexController.getUpdatedMesh()
« Reply #9 on: February 10, 2007, 12:15:35 pm »
No, it's called refreshMeshData();. It read the vertex data from the Mesh back into the controller.