Re: Loading Precreated DirectX Objects




"Alfie [UK]" <alfie@xxxxxxxxxxxx> wrote in message
news:c8sh931evhfpvbpvn01di6ip8ai6b3naap@xxxxxxxxxx
On Fri, 13 Jul 2007 15:05:39 GMT, "Michael" <no@xxxxxxxx> wrote:

Hi,

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?

Load the mesh, create a translation matrix and apply it, then render the
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


.



Relevant Pages

  • Re: Studying abroad, devastating weird laptop problem
    ... Translate.google.com may help you with the translation. ... - Normal Mode, Safe Mode with Networking, etc.), but no Safe Mode works ... load but it quickly slows down to a crawl, and takes about a minute to ... After this, Windows Calendar ...
    (microsoft.public.windows.vista.general)
  • Re: Clustering - how can I.......
    ... DNS entries that distribute the translation results over the ... That's not really load balancing. ... DNS load balancing is about as simple as you can get, ...
    (comp.os.vms)
  • Re: MessageBox buttons
    ... install a hook, and when the dialog is created, load the button ... translation from resources and change the text of the buttons. ...
    (microsoft.public.vc.mfc)
  • Re: This make me spit!
    ... > Another load of bollocks knowing that the thread has since been deleted. ... Translation, aelthric doesn't know how to use Google. ...
    (uk.politics.misc)
  • Re: Loading Precreated DirectX Objects
    ... Does anyone know how to load a pre-created Direct X object at say ... Load the mesh, create a translation matrix and apply it, then render the ... D3DXMatrixIdentity matTemp ... D3DXMatrixMultiply matWorld, matWorld, matTemp ...
    (comp.lang.basic.visual.misc)