[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

direct 3d transform

Posted on 2002-03-09
4
Medium Priority
?
449 Views
Last Modified: 2013-12-26
Hi!
i'm working with directx 8 and i wanna create a 3d app(c++).

for each object i wanna use, i store all rotations, all scales and all translations. (in each direction (x,y,z)).
so, when i want to render a object, i call

D3DXMatrixTransformation(&matworld,NULL,&t_rotations,&t_scales,NULL,NULL,&t_translations);

and just before rendering
dxmanager->lpd3ddev->SetTransform(D3DTS_WORLD, &matworld);

it seems to work when my object is only scales and/or translated, but when i try to rotate it... the scale doesn't work anymore...

pleeeaaase heeeeeelp!!

thanks, Ralph
0
Comment
Question by:ralph78
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Accepted Solution

by:
kamarey earned 200 total points
ID: 6855124
Try this:
D3DXMatrixTransformation(&matworld,NULL,NULL,&t_scales,NULL,&t_rotations,&t_translations);

if it doesn't work use this functions to do your transformations:
D3DXMatrixRotationAxis(), D3DXMatrixScaling(), D3DXMatrixTranslation().
matrix = ms * mr * mt;
SetTransform(matrix);

If it still doesn't work place here your code.
0
 
LVL 2

Expert Comment

by:ET3D
ID: 6882654
You're using the wrong rotation parameter. I assume you want to rotate the object, in which case you should use the rotation and rotation centre parameters, not the "scaling rotation" which you're using in the code you posted.
0
 

Expert Comment

by:CleanupPing
ID: 9464551
ralph78:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question