Re: Loading Precreated DirectX Objects
- From: "Michael" <no@xxxxxxxx>
- Date: Sun, 15 Jul 2007 02:13:06 GMT
"Alfie [UK]" <alfie@xxxxxxxxxxxx> wrote in message
news:c8sh931evhfpvbpvn01di6ip8ai6b3naap@xxxxxxxxxx
On Fri, 13 Jul 2007 15:05:39 GMT, "Michael" <no@xxxxxxxx> wrote:
Hi,Load the mesh, create a translation matrix and apply it, then render the
I'm following this tutorial:
http://externalweb.exhedra.com/DirectX4VB/Tutorials/DirectX8/GR_Lesson08.asp
but it doesn't say how to load an object that isn't at the origin.
Does anyone know how to load a pre-created Direct X object at say (1,1,1)
for example?
mesh.
If you look at Jack's example in the Form_Load procedure you can see
where he uses a temporary matrix to perform the rotation and scaling of
his object, you would need to use something like;
D3DXMatrixIdentity matTemp
D3DXMatrixTranslation matTemp, 1, 1, 1
D3DXMatrixMultiply matWorld, matWorld, matTemp
--
Alfie [UK]
<http://www.delphia.co.uk/>
He who lives by the sword gets shot by those who don't.
Hi Alfie,
Where do I stick the translation though?
I have a InitialiseGeometry function and I copied and pasted it
(InitialiseGeometry2) and applied the translation in between and it didn't
work.
I've also tried at the start and after I call D3DX.LoadMeshFromX() in the
2nd function but that too didn't work....
I'm assuming it has to be in between so that it is only applied to the one.
Cheers,
Michael
.
- Follow-Ups:
- Re: Loading Precreated DirectX Objects
- From: Alfie [UK]
- Re: Loading Precreated DirectX Objects
- References:
- Loading Precreated DirectX Objects
- From: Michael
- Re: Loading Precreated DirectX Objects
- From: Alfie [UK]
- Loading Precreated DirectX Objects
- Prev by Date: Re: Loading Precreated DirectX Objects
- Next by Date: Re: Loading Precreated DirectX Objects
- Previous by thread: Re: Loading Precreated DirectX Objects
- Next by thread: Re: Loading Precreated DirectX Objects
- Index(es):
Relevant Pages
|