How does directx work - World or View transforms and rotations



Hi, im just starting out with directx and have a few questions.

Playing around with the code and using some books i developed a simple
app to show two Tiny models rotating (using the sdk sample framework),

void RenderTiny()
{
for (int i = 0; i < m_TinyTextures.Length; i++)
{
device.SetTexture(0, m_TinyTextures[i]);
m_TinyMesh.DrawSubset(i);
}
}


// main render function....

device.Transform.World =
Matrix.RotationYawPitchRoll(theta,theta,theta);
RenderTiny();
// update theta and redraw tiny in different position
device.Transform.World =
Matrix.RotationYawPitchRoll(theta,theta,theta) *
Matrix.Translation(100, 100, 500)* Matrix.Scaling(scale,scale,scale);
RenderTiny();
// ... snip

Now although i have hacked together this code, i am still not 100%
clear on how directx is working. I have the following questions:

How does directx rendering work? For example, do i rotate the the
model in world space, render it to 2D, then redo this process for the
other models in the scene? What if one model is in front of the other,
does directx store the z buffer depth of each rendered object drawn in
the scene? Any link to a decent tutorial of inner workings just for my
understanding would be great!

In the book it says camera View (device.Transform.View) is less
efficient than world transforms, why is this?

If you are a player in a world, with two characters rotating, do you
rotate the characters with the world transform and move the view
transform (the camera) through the world?

Many thanks in advance,

Chris

.



Relevant Pages

  • Re: Performance: VC++ 33% slower then Builder 5 on LineTo() API ca
    ... How come you are not using hardware to render your ... using DirectX to draw lines ... > helps I can disassemble both DLLs and post the code here! ... Our CAD application took 5 times longer to draw the same ...
    (microsoft.public.vc.language)
  • Re: Performance: VC++ 33% slower then Builder 5 on LineTo() API ca
    ... How come you are not using hardware to render your ... using DirectX to draw lines ... > helps I can disassemble both DLLs and post the code here! ... Our CAD application took 5 times longer to draw the same ...
    (microsoft.public.vsnet.general)
  • Re: Performance: VC++ 33% slower then Builder 5 on LineTo() API ca
    ... How come you are not using hardware to render your ... using DirectX to draw lines ... > helps I can disassemble both DLLs and post the code here! ... Our CAD application took 5 times longer to draw the same ...
    (microsoft.public.dotnet.general)
  • Re: Performance: VC++ 33% slower then Builder 5 on LineTo() API ca
    ... How come you are not using hardware to render your ... using DirectX to draw lines ... > helps I can disassemble both DLLs and post the code here! ... Our CAD application took 5 times longer to draw the same ...
    (microsoft.public.dotnet.languages.vc)
  • Re: converting 3d in 2d
    ... a 2-d vector image (2-d bitmap would be trivial to do - just render to a ... vertex or triangle level what is visible and what is not. ... i don't have too much experience in directx ... >> but you know you can render the directx output into a window, ...
    (microsoft.public.win32.programmer.directx.managed)