• Advertisement
Sign in to follow this  

Transformation Problem

Recommended Posts

Question 1: Let's say when a mesh is not driven by any shaders, can I assume the only way to control the SRT is thru the fixed pipeline (SetTransform API)?
Question 2: If a mesh is transformed is extremely tiny, 0.00x scale, and is transformed by an extremely tiny matrix and I don't care the scale is correct or not anymore if I have enlarged it, and say, I want to enlarge it 1000000 times, and I want the translation part of the transformation standing out (have more effects on the mesh, so that all the submeshes don't collapse in the center of the origin), should I enlarge the transformation like

FLOAT s = 1000000.0f;
D3DXMATRIX matScale;
D3DXMatrixScaling(&matScale, s, s, s);
matWorld = matScale * matWorld;
or 
matWorld = matWorld * matScale;

and afterwards
D3DXVec3TransformCoord(&p, &p, &matWorld);


The question is should I enlarge the mesh 1000000 times first and multiply with the tiny transformation again or concatenate the matrices (multiply the scale matrix with the tiny matrix) and apply to the positions?
thanks
Jack

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement