begin
{the Create 3 d viewport and layer}
V:=TViewport3D. Create (Self);
Valerie plame arent:=the Self;
Says v. lign:=TAlignLayout. AlClient;
V.C olor:=claNull;
L:=TLayer3D. Create (Self);
L.P arent:=V;
L.P rojection:=TProjection. PjScreen;
L.A. lign:=TAlignLayout. AlClient;
{Move the object to the 3 d scene}
ScaleRoot. Parent:=L;
{the Animate}
L.A. nimateFloat (' Position. J Z, 500, 1);
L.A. nimateFloatDelay (' Position. J Z, 0, 1, 1);
L.A. nimateFloatWait (' RotationAngle. X ', 360, 2, TAnimationType. AtInOut, TInterpolationType. ItBack);
{Back to 2 d}
ScaleRoot. Parent:=the Self;
{Free 3 d}
L.F ree;
V. ree;
end;
I rewrite the BCB code is as follows:
TViewport3D * V.
TLayer3D * L;
V=new TViewport3D (this);
V - & gt; The Parent=this;
V - & gt; The Align=TAlignLayout: : alClient;
V - & gt; Color=claNull;
L=new TLayer3D (this);
L - & gt; The Parent=V;
L - & gt; The Projection=TProjection: : pjScreen;
L - & gt; The Align=TAlignLayout: : alClient;
Layout1 - & gt; The Parent=L;
L - & gt; AnimateFloat (" Position. Z ", 500, 1);
L - & gt; AnimateFloatDelay (" Position. J Z, 0,1,1);
L - & gt; AnimateFloatWait (" Position X ", 360, 2, TAnimationType: : atInOut, TInterpolationType: : itBack);
Layout1 - & gt; The Parent=this;
L - & gt; Free ().
V - & gt; Free ().
Problem is that I did not turn over, the number of animations only scaling, it should be L - & gt; AnimateFloatWait this sentence according to the X axis rotate 360 degrees are not performed twice, don't know where the problem, also please god help!
Weak weak ask next, Delphi call enum format is TAlignLayout alClient
Why in BCB said no definition alClient contains the header files, must be TAlignLayout: : alClient such use?
Demon elder brother hurriedly come, thank you ~
CodePudding user response:
His jacking, Daniel hurriedlyCodePudding user response:
{Move the object to the 3 d scene}ScaleRoot. Parent:=L;
This sentence you don't have translation. ScaleRoot what type is it?
CodePudding user response:
Demon elder brother, ScaleRoot TLayout type, I also translation, is the followingLayout1 - & gt; The Parent=L; Is AnimateFloatWait without flipping, only the scaling, demon elder brother give advice or comments please, thanks!