Home > Back-end >  Ask questions of XE2, a great god help solve it
Ask questions of XE2, a great god help solve it

Time:10-11

I consult XE2 examples do a 3 d animation, Delphi source code is as follows
 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 hurriedly

CodePudding 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 following
Layout1 - & gt; The Parent=L; Is AnimateFloatWait without flipping, only the scaling, demon elder brother give advice or comments please, thanks!
refer to the second floor ccrun 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:

You organize a simple demonstration project, compression. Cbfans at 163 d0t com

CodePudding user response:

Demon elder brother has already sent you 163 mailbox, please help have a look, thanks
reference 4 floor ccrun response:
you organize a simple demonstration project, compression to me. Cbfans at 163 d0t com

CodePudding user response:

Demon elder brother received no, [email protected] has sent several days
reference 4 floor ccrun response:
you organize a simple demonstration project, compression to me. Cbfans at 163 d0t com

CodePudding user response:

Received, recently too busy, no time to help you see, tonight,
  • Related