Two Questions: Adjacency Buffer and transformed verticies 
Author Message
 Two Questions: Adjacency Buffer and transformed verticies

What does adjacency exactely returns?

Suppose i have a cube mesh generated using
     Set Mesh = g_d3dx.CreateBox(g_dev, w, h, d, Adj)

then i wish retreive each face

    Set pvb = Mesh.GetVertexBuffer()
    Set pib = Mesh.GetIndexBuffer()
    dwNumFaces = Mesh.GetNumFaces()
    count = Mesh.GetNumVertices()
    Size = Len(pVerticies(0))

    ReDim pIndicies(count)
    ReDim pVerticies(count)

    D3DIndexBuffer8GetData pib, 0, count, 0, pIndicies(0)
    D3DVertexBuffer8GetData pvb, 0, Size * count, 0, pVerticies(0)

    s = Adj.GetBufferSize
    ReDim ABuf(s / 4)
    g_d3dx.BufferGetData Adj, 0, 4, dwNumFaces * 3, ABuf(0)

Now i have ABuf filled with three long values per face.  Are they referred
to the Index buffer or are themself indicies?

However the given pVerticies(n)  is always expressed as world original
coordinate.  If i made rotations or translations, how could i get the right
transformed coordinate?

in other words, i wish to retreive faces in their current position. Even i
don't know if i am following the right way to do that.

Thans for the help

Fabio Guerrazzi

Fri, 15 Oct 2004 22:23:49 GMT  
 Two Questions: Adjacency Buffer and transformed verticies
I found the problems.
- Adjacency buffer looks like a voronoi diagram and seems to be useless to
fetch faces. Just i fixed the previous code i sent and got it working
- Transformed coordinate are easy to get calling
CD3DFrame.TransformCoordinate after a projection (there was an error on it,
was to multiply to m_Matrix instead m_MatConcat)


Sun, 17 Oct 2004 00:28:48 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Transforming with .Transform() Method : Transforming only part of the entire XML

2. XML transform, and webcontrol question

3. ASP, Access, Transform, SQL Question - HELP!

4. Direct3D Transform Question

5. Paasing Struct containg Pointers to buffer and len of buffer to Dll

6. Open Two Database with Two System.Mda and Two different User Names and Password

7. tcp Rec Buffer question?

8. Printing Buffer Question

9. Basic question: How increase buffer of undo command?

10. Keyboard Buffer Overflow Question

11. MS Comm Buffer question

12. Questions: How to set Buffers for Winsock.


Powered by phpBB® Forum Software