PDA

View Full Version : Any function can do transform, rotate, scale All in one in



dan59314
11-11-2005, 02:01 AM
Hi,

What if I wnat to scale an object by 2 times in X, then roate it by 1.0 about Y axis, I have to set matix like this

scale:=2.0;
deg:=1.0;
FillChar(matE, SizeOf(matE),0);
with matE do
begin
_11:=cos(deg)*scale;
_13:=sin(deg);
_22:=1;
_31:=-sin(deg);
_33:=-cos(deg);
_44:=1;
end;

Is there any function in (un)DelphiX that I can do these by just pass transform, rotate, scale x,y,z?

Thanks
Daniel


RasVector http://dan59314.myweb.hinet.net

Clootie
11-11-2005, 09:33 PM
Why not just concatenate (multiply) matrixes?

dan59314
13-11-2005, 01:54 AM
Hi, Clootie,

Thanks, I now find the D3DMath_MatrixMultiply() in D3DUtils.pas.


Daniel