Solved

direct 3d transform

Posted on 2002-03-09
4
435 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
4 Comments
 
LVL 2

Accepted Solution

by:
kamarey earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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 …
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now