Re: Line.DrawTransform

From: Andrew Vardeman (andrewv_at_iastate.edu)
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:

    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


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

    Relevant Pages

    • Re: Obtaining 2d shape from perspective image
      ... information from a 2D perspective projection image? ... "downcast" from homogeneous coordinates to normal coordinates. ... transform is the "divide by w": ... To invert this operation, that is, to get from screen coordinates to ...
      (comp.graphics.algorithms)
    • Re: correlation of rotated image with perspective
      ... transform, but it's the distortion from perspective thats really ... perspective projection, orientation and distance from the landing pad ... as a single mser. ... baseline stereo from maximally stable extremum regions". ...
      (sci.image.processing)
    • Re: Normalization XYZ -> xyz
      ... transform. ... My second "suggestion" would be a projection onto a sphere in R^3, again having the same property is mapped to a single point on the sphere), the same holds for the first suggestion. ... is the plane through parallel to X,Z (a plane normal is given ... Again, k*X, k*Y, k*Z delivers the same chromaticities x',y',z' for any ...
      (sci.engr.color)
    • Re: Using a different type of projection matrix in Direct3D?
      ... projection transform with Direct3D apart from the standard canonical ... view transform that you get from the Matrix.PerspectiveFovLHmethod ... You should be able to use any projection ... Would this cause the rendering to flip out, ...
      (microsoft.public.win32.programmer.directx.graphics)
    • Re: correlation of rotated image with perspective
      ... perspective projection, orientation and distance from the landing pad ... I did try finding straight lines with a hough transform, ... resolution and how much calculating power you can spend. ... Make contour from the shape. ...
      (sci.image.processing)