Como eu fa?o para mover apenas a chaleira

Como eu fa?o para mover apenas a chaleira

Post by Robert Dunlop [MS MVP » Fri, 12 Jul 2002 05:17:13

Calling SetTransform() with NULL does not set an identity transform, it
is an invalid call.  Instead, set up an identity matrix and pass it to
SetTransform(), like this:

lp_device->SetTransform(D3DTS_WORLD ,&mat);

Also, why do you use both lp_device and g_d3d.lp_device?  I assume these
point to the same device?
Robert Dunlop
The X-Zone
Microsoft DirectX MVP
The opinions expressed in this message are my own personal views and do
not reflect the official views of the Microsoft Corporation.
The MVP program does not constitute employment or contractual obligation
with Microsoft.

Quote:> Could anyone tell me what I made wrong? .

> I developed a small application to learn direct3d in which I I have a
> triangle and an object mesh teapot. I wanted to move only the teapot,
> for this I loaded into the worldmatrix the identity and rendered the
> triangle, then I modified the worldmatrix and rendered the teapot but
> triangle also moved. This procedure is made in the method render of
> class D3DEVILTHING and the worldmatrix is modified in the Loop of

> The keyboard keys for navigation are:
> e: moves the camera  to the left
> s:  moves the camera downwards
> d: moves the camera to  the right
> w: moves the camera  upwards
> f:  moves the camera backwards
> r: moves the camera front

> It is necessary that some windows event occur to see the movement (to
> mouse is enough) The code source and the data are attached

> Digenes.
> Amok Entertainment