Get x,y,z co-ordinates of vertices

    Mar 25 2014 | 3:20 pm
    I'm making my own .obj files in Sketchup and then opening them in Jitter with
    Let's say I start with a simple, wireframe cube -
    I want to get the x,y,z co-ordinates of the cube's 8 vertices and have them updated as the cube moves in 3D space.
    I then want to map the co-ordinates of the moving vertices to a panning algorithm.
    Does anyone know how to get these co-ordinates and have them updated in real time?

    • Mar 25 2014 | 10:15 pm
      you can output a matrix containing transformed vertex positions of a model using @matrixoutput 2
      note that enabling matrixoutput mode will prevent the model from drawing in the context, so either duplicate by using another object, or use the matrix-output vertices with something like gl.mesh.
    • Mar 26 2014 | 7:08 pm
      Thanks Rob,
      I'm getting somewhere.
      Could you tell me how I format the matrix output? What the list is made up of?
      I've tried attaching a message box to see what the list looks like but the patch crashes every time I do that.
      For now I have attached a pwindow (see patch) which I think shows the x,y,z co-ordinates expressed as colour values. This looks nice but, I need to identify a vertex and track its x,y,z co-ordinates in numbers.
      Any clues much appreciated.
    • Mar 26 2014 | 9:17 pm
      just depends what you want to do with the values. jit.iter or jit.spill are probably what you want to look at.
    • Mar 29 2014 | 4:10 pm
      Thanks Rob, I'm making some headway