×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    11

    Question How to read a VertexArray

    Hi !

    I'm developping an API on top of the
    jsr184 3D API, and I'v got a problem
    getting information out of a Mesh
    loaded from a m3g file.

    I'm able to get a hold on
    the VertexBuffer from the mesh,
    but I need to read the positions
    of the vertexes for
    collission detection.

    Si I do this :

    VertexArray va=vb.getPositions(null);

    Where vb is the VertexBuffer.

    The VertexArray now holds
    the vertexes, but there seems
    to be no way to read the information
    from it... ?


    How can I get the
    information out of
    the VertaxArray ?


    Thanks for your time.

    /Ludvig Larsson @ Mediaplazza Games

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    9

    Re: How to read a VertexArray

    u have no method in verttex array to read the coordinates.
    instead use the transform object which is holding your mesh and do this.

    create a float of 16 elements
    float temp[]=new float[16]
    and then
    transform.get(temp)

    u will get the coordinates in this temp array.

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    11
    Thank you, but this will
    only give me the matrix
    associated, not the vertexes...

    Anyone knows how to
    get the positions of the
    vertexes in a mesh m3g
    loaded in a jsr184
    environement ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×