Sign in to follow this  
ok_woei

Question abt DirectX

Recommended Posts

No. DirectX is a compilation of different APIs, like Direct3D, DirectInput ect.

You probably mean Direct3D? This is "just" a graphics API, like OpenGL.

The phyisics and collision detection is a responsibility of the programmer.
You can try using exsisting physics engines or graphics engines that might offer you some basic form of collision detection though, if you think you may have trouble implementing such features yourself.
But be warned, working with existing engines doesn't mean that you don't need to understand that stuff, it is just a way to take some work load off you by providing you rather advanced technologies on the field (depending on how much, if at all you want to spend on it).

Share this post


Link to post
Share on other sites
Quote:
Original post by ok_woei
Hi, may I know if DirectX able to do some physics stuff, like collision detection and response?

The above poster is correct, DirectX is a compilation of programming interfaces (some of which are Direct3D - the graphics API, Direct Input - the input API, and DirectPlay - the networking API). Unfortunately, aside from a few choice D3DX (D3DX is a helper library which serves to simplify some of the Direct3D programming problems through the use if its many functions) functions, you'll have to do most of the physics programming yourself. Alternatively, you can use a Physics SDK like the Aegea PhysX SDK, or possibly the Havok SDK, but really all those do is simplify the work you would have been doing through performing physics calculations yourself.
In the end, it's really up to you as to how you want to implement physics in games.

Share this post


Link to post
Share on other sites
thanks for ur help... as I am new to this game development field, from ur knowledge, is there any good open source game engine that do a well job in collision detection and response especially in 3D environment?

I have done a search in www.devmaster.net and found one called bullet physics. But yet to explore deeply in that, not too sure if it will work. Is it some game engine only provide collision detection without the response part?

Really thanks for ur great help

Share this post


Link to post
Share on other sites
I'm not so sure that the explanation of DirectX's composition was necessary. The question seems fine to me, being roughly interpreted as 'Does DirectX contain any components that can help me with physics simulation?'

But as DragonGeo2 mentioned (if he undersold it), D3DX is the place to look. Every release of DirectX seems to pack more and more gems into that library. Granted, it won't do everything for you, but you can get some good use out of:

D3DXBoxBoundProbe
D3DXComputeBoundingBox
D3DXComputeBoundingSphere
D3DXComputeNormals
D3DXComputeTangent
D3DXComputeTangentFrame
D3DXComputeTangentFrameEx
D3DXIntersect
D3DXIntersectSubset
D3DXIntersectTri
D3DXSphereBoundProbe

as well as all of D3DX's maths functions. But all of the management and response will need to be taken care of by the programmer.

Regards
Admiral

Share this post


Link to post
Share on other sites
Some free physics engines you might want to look into are Ageia and ODE (Google either and you'll find them easily). From my expierence, both perform well and have good documentation.

Share this post


Link to post
Share on other sites
Thanks for ur help... I try to search for Ageia u mentioned, but think not really free physics engine. Indicated in the website, it must be a licensed developer to download the SDK.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this