Results 1 to 5 of 5

Thread: X Meshes

  1. #1

    X Meshes

    im building a tool for my 3D Modelers to get a model into the game and im learning D3D at the same time.

    ive got the mesh loading and GUI setup but i need to somehow get the names of the objects in the model so i can assign physics to that object and draw a bounding box around it.

    how would i get the object name and the vertices to calculate the bounding box?

    thanks

  2. #2

    X Meshes

    How to get mesh names: SkinnedMesh (URL) parses X-files with extracting sub-mesh names. I'm not sure about easiest way to calculate sub-mesh bounding boxes.
    There are only 10 types of people in this world; those who understand binary and those who don't.

  3. #3

    X Meshes

    is it possible to access the sub mesh vertices? if i can get the vertices into an array then its easy to calculate the bounding box

  4. #4

    X Meshes

    [pascal]var
    Mesh: ID3DXMesh;
    AttribTableSize: DWORD;
    AttribTable: array of TD3DXAttributeRange;
    begin
    ...
    Mesh.Optimize(D3DXMESHOPT_ATTRSORT....);

    Mesh.GetAttributeTable(nil, @AttribTableSize);
    SetLength(AttribTable, AttribTableSize);
    Mesh.GetAttributeTable(@AttribTable[0], @AttribTableSize);

    // here you get attribute ranges --- later lock vertex buffer...
    [/pascal]
    There are only 10 types of people in this world; those who understand binary and those who don't.

  5. #5

Bookmarks

Posting Permissions

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