Re: Line.DrawTransform

From: Andrew Vardeman (
Date: 10/14/04

  • Next message: Jarred Nicholls: "Re: Please recomend directx book?"
    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:

            device.Transform.Projection), borderColor);

    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

  • Next message: Jarred Nicholls: "Re: Please recomend directx book?"