Sign in to follow this  
discodowney

3D DirectX sphere Model

Recommended Posts

Hi, First time use so i apologize if this is in the wrong place. Im doing a Masters in Computer Game Technology and i was wondering if anyone either has, or knows where to get a 3D Model made in Directx? Any help is much appreciated. Cheers

Share this post


Link to post
Share on other sites
Do you want a sphere mesh to use with DirectX? There's a method in the Direct3D9 utility library D3DXCreateSphere that will return a sphere mesh based on some parameters.

Weirdly, I can't seem to find it on an English version of MSDN (guess it must be deprecated or something) but the following is from my (old) offline docs:

Quote:
From MSDN Offline Docs
D3DXCreateSphere

Uses a left-handed coordinate system to create a mesh containing a sphere.

HRESULT D3DXCreateSphere(
LPDIRECT3DDEVICE9 pDevice,
FLOAT Radius,
UINT Slices,
UINT Stacks,
LPD3DXMESH * ppMesh,
LPD3DXBUFFER * ppAdjacency
);

Parameters

pDevice
[in] Pointer to an IDirect3DDevice9 interface, representing the device associated with the created sphere mesh.

Radius
[in] Radius of the sphere. This value should be greater than or equal to 0.0f.

Slices
[in] Number of slices about the main axis.

Stacks
[in] Number of stacks along the main axis.

ppMesh
[out] Address of a pointer to the output shape, an ID3DXMesh interface.

ppAdjacency
[out] Address of a pointer to an ID3DXBuffer interface. When the method returns, this parameter is filled with an array of three DWORDs per face that specify the three neighbors for each face in the mesh. NULL can be specified.

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