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. Graphics
  4. Rotate problem in directx [modified]

Rotate problem in directx [modified]

Scheduled Pinned Locked Moved Graphics
graphicscsharpgame-devhelpquestion
1 Posts 1 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
    sepel
    wrote on last edited by
    #1

    hi all. i have some problem in using directx to show 3d model in windows. 1.I loaded some .x file in c# and want to rotate them.but there is some problem .when a object rotate some of it's side disappear. 2.problem is that how can i set center of my object for rotate object around it not around Coordinate System . 3.when i assign some bitmap on my object it repeat many time on object surface. i want to it cover all of my object no tile on it. its code:

    device.Transform.World =
    Matrix.Scaling(handle.XScale, handle.YScale, handle.ZScale) *
    Matrix.RotationZ(Geometry.DegreeToRadian(handle.ZRotate)) *
    Matrix.RotationY(Geometry.DegreeToRadian(handle.Yrotate)) *
    Matrix.RotationX(Geometry.DegreeToRadian(handle.XRotate)) *
    Matrix.Translation(handle.X, handle.Y, handle.Z);

            for (int i = 0; i < handle.MeshMaterial.Length; i++)
            {
                device.Material = handle.MeshMaterial\[i\];
                device.SetTexture(0, handle.MeshTexture\[i\]);
                handle.mesh.DrawSubset(i);
            }
    

    handle is my object that contains my 3d info.

    sepel

    modified on Wednesday, September 24, 2008 3:18 AM

    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