DirectX For 3D Views

Discussion in 'Chit Chat' started by ceaser, Dec 13, 2008.

  1. ceaser

    ceaser Active Member Licensed User

    Hi Gentlemen\Ladies

    This is a question to all the clever people in this forum.:sign0188:

    Does anybody have any knowledge of using the DirectX Engine to generate graphics on a mobile device?:sign0085:

    I would like to use this to generate a 3D view of my tachy surveys. I have tried using maths in generating a 3D view, but it is very slow. Using the DirectX Engine will be much faster.

    Klaus, this is a question for you. How can I go about making a map that I load georeferenced? In other words, when I click on any position on a map, it must return the correct coordinates to me.

    Thanks
    Michael
     
  2. agraham

    agraham Expert Licensed User

    If you use the PointsToScreen method of the Delaunay2D library as I intended and keep a Points() array of real world co-ordinates and a parallel array of screen co-ordinates then what you want is effectively a reverse lookup from the screen X and Y co-ordinates to real world values. It could be done using values from these two arrays to work out the X and Y scaling and offset values for the screen but if you want I can make it easier by modifying the library to provide the real world values for the screen X and Y minimum values as passed to the PointsToScreen method and also the X and Y real world values per screen pixel. This would make it very easy to back-calculate a real world point from a screen X and Y and vice versa if ever necessary.
     
  3. agraham

    agraham Expert Licensed User

    I did in the past briefly look at implementing Direct3D Mobile as a Basic4ppc library but was discouraged by the ramifications of trying to implement it as a Basic4ppc library. I've just revisited it and, for several reasons which are too many to explain here, I still don't think it is a practical proposition. It is also probably very much a sledgehammer to crack a nut if you only want a single sort of 3D terrain representation.

    A better bet might be a library that can draw such a representation on a Bitmap. That could easily be used in a Basic4ppc app in an Image control or on a Form. Direct3D Mobile can only draw directly on a Form which is one of the reasons it doesn't sit well with Basic4ppc which handles its own Form repainting. What does your code that is too slow look like?
     
  4. klaus

    klaus Expert Licensed User

    Hi Michael,

    Is it something like the attached example you are looking for ?

    What kind of map do you want to load and how do you imagine the long/lat referencing.

    In the attached example I load a map as a jpg file, it is a screen copy of a GoogleEarth map and I 'measured' the long/lat coordinates of the upper left and lower right corner to scale the map. I didn't include a possible angular orientation of the map. In the example it's possible to draw lines onto the map.

    If this is not what you were looking for, please let me know what you need with some more details.

    Best regards.
     
  5. ceaser

    ceaser Active Member Licensed User

    Hi Klaus

    Thanks for the sample on the mapping routine. Here is what I am looking for:

    1. Load a map like in your sample.
    2. Georefernce the map by tapping on 2 positions and entering the coordinates or the lats and longs.
    3. Have zoom functions like in your other map sample.
    4. Have basic drawing functions like a line, circle, etc.
    5. Be able to plot bitmaps (like a car, etc.)
    6. Connect a GPS which shows the position on the map and can plot your path as you move along.
    7. Be able to store the path of your movement.:sign0188:

    Thanks
    Ceaser
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice