Re: Line.DrawTransform
From: Andrew Vardeman (andrewv_at_iastate.edu)
Date: 10/14/04
- Previous message: Sam Jones: "Re: Please recomend directx book?"
- In reply to: Andrew Vardeman: "Line.DrawTransform"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 14 Oct 2004 16:41:56 -0500
Let me answer my own question. (It's my specialty.)
You want the Matrix to be view transform multiplied by projection
transform. Here's the catch. If you were previously drawing in world
coordinates and you have code that looks like this:
line.Begin();
line.DrawTransform(outlineVerts,
Matrix.Multiply(device.Transform.View,
device.Transform.Projection), borderColor);
line.End();
you won't get what you're expecting. This is apparently because the
line.Begin() method changes your view and projection transforms. So you
have to calculate the matrix you're looking for *before* entering the
line drawing code.
Andrew Vardeman wrote:
> Hi all. Sorry for such a basic question, but I can find no useful
> documentation on the Line.DrawTransform method. Given the method signature
>
> public void DrawTransform(Vector3[], Matrix, int),
>
> what matrix do I need to pass for the second parameter to successfully
> display a set of vertices specified in world coordinates?
>
> Thanks,
>
> Andrew
- Previous message: Sam Jones: "Re: Please recomend directx book?"
- In reply to: Andrew Vardeman: "Line.DrawTransform"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|