How To Draw Torus(Mesh)?

i couldnt draw a torus.can u please help me?

im using C# 2.0 and DirectX 101

[92 byte] By [IBRAHIMERSOY] at [2007-12-29]
# 1
DirectX 101? Have you looked through the DirectX SDK samples?
JimPerry at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 2
You could use a modelling package such as blender (www.blender.org) to make a torus and then directx natively supports a .x format, you could load the .x file and render that.

I hope this helps.
Take care.

PieterGermishuys at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 3

thanks a lot,

i have used Mesh.Torus but,the camera is showing in the mid of Torus.How can i show a Torus with 3rd person view?

i think my problem is all about the location of camera.

thanks again

Take Care

IBRAHIMERSOY at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 4
To move camera some backward, use

device.Transform.View = Matrix.LookAtLH(New Vector3(0.0F, 2.5F, 8.0F), New Vector3, New Vector3(0, 1, 0))

in your OnDeviceReset event handler.

notes:
device - your Direct3D device
8.0f - how far camera will be from coordinates center

Punkoff at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 5
thank u so much,i will try
IBRAHIMERSOY at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...