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 / C++ / MFC
  4. DirectX 3D Image Display.

DirectX 3D Image Display.

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsgame-dev
2 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.
  • A Offline
    A Offline
    ashwath1979
    wrote on last edited by
    #1

    Hi All, The task which is given to me is that i have to show a cylinder in 3D.Then when i click on any part of the cylinder and drag the mouse i should be able to deform the cylinder and when i leave the mouse the object should be in the last deformed state.I am planning to use directx for this. Any inputs from you will be very helpful for me. Thanking you in Advance, Regards, Ashwath.

    B 1 Reply Last reply
    0
    • A ashwath1979

      Hi All, The task which is given to me is that i have to show a cylinder in 3D.Then when i click on any part of the cylinder and drag the mouse i should be able to deform the cylinder and when i leave the mouse the object should be in the last deformed state.I am planning to use directx for this. Any inputs from you will be very helpful for me. Thanking you in Advance, Regards, Ashwath.

      B Offline
      B Offline
      Baltoro
      wrote on last edited by
      #2

      I'm guessing, based on your post that you have not done much Direct3D programming (otherwise, you'd know the answer). Can you display a just a cylinder (without any modification)? That would be the obvious starting point. Wireframe? Solid? Lighting? What version DirectX? You leave out alot of important details. You should initially query the capabilities of your graphics device. But, essentially, I think you will want to coordinate the output of a number of standard DirectX APIs: Direct Input (to respond to the mouse action), and, the display of the cylinder data. The way I'd do it would be to implement a cylinder Mesh (which is a standard DirectX object), and which gives you access to the Vertex Buffer and Index Buffer (and all the other data you'll need). The easiet method would be to implement a series of drawing calls using a progressive algorithm that deforms the Mesh by some simple metric. You would be writing data to the Vertex Buffer and then displaying the Mesh. Also, there is a Graphics Forum here at CodeProject, where you'd probably get a better answer.

      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