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
Solved

direct 3d transform

Posted on 2002-03-09
4
440 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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

789 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