Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Direct X transformation?

Direct X transformation?

Scheduled Pinned Locked Moved C#
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SherKar
    wrote on last edited by
    #1

    hi , i have a mesh model and i put it in many places in my app. using the world transformation and i want to detect which mesh is the pointed one but when i point to mesh it only detects the last mesh has been transformed .

    H 1 Reply Last reply
    0
    • S SherKar

      hi , i have a mesh model and i put it in many places in my app. using the world transformation and i want to detect which mesh is the pointed one but when i point to mesh it only detects the last mesh has been transformed .

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      What do you mean by "the pointed one"? This is a little too non-technical to answer. :confused:

      Microsoft MVP, Visual C# My Articles

      S 1 Reply Last reply
      0
      • H Heath Stewart

        What do you mean by "the pointed one"? This is a little too non-technical to answer. :confused:

        Microsoft MVP, Visual C# My Articles

        S Offline
        S Offline
        SherKar
        wrote on last edited by
        #3

        i mean by it the one which the mouse points to it

        H 1 Reply Last reply
        0
        • S SherKar

          i mean by it the one which the mouse points to it

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          You can get the mouse position at any time using the static Control.MousePosition property. You could transform these coordinates to your world space and get the mesh you need, or if you click on it you can get the client coordinates and transform these. When you say you are getting the last mesh that was rendered, do you mean that you're destroying and re-creating your mesh with each drawing phase, and that you get the last one rendered? You probably don't need to destroy your mesh each time, though you would have to get the materials and textures from it to draw. I'm sorry if I don't understand your problem.

          Microsoft MVP, Visual C# My Articles

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups