Smooth animation

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
MikeD
Posts: 16
Joined: 27 Jan 2015, 17:45

Smooth animation

Post by MikeD » 09 Feb 2015, 18:49

Hi,

I am trying to use some basic animation by rotating a simple cube with the following code

Code: Select all

for i := 0 to 360 do
begin
   sleep(5);
   LoadedCADImage.Rotate(XAxis,1);
   F3DN.LoadFromConverter(LoadedCADImage.Converter, LoadedCADImage);
end;
For rotating only around one axis and a simple basic shape/object I get a smooth animation.
But as soon as I load in a slightly more complex object loading from the converter takes too long for smooth animations.
Is there a faster way to update/redraw/repaint the image?

-Mike

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Smooth animation

Post by support » 10 Feb 2015, 18:08

Hello Mike,

You don't have to reload a drawing from the converter when rotating it aroung some axis. Use Tsg3DDrawingNavigator.Rotate function instead.


Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

MikeD
Posts: 16
Joined: 27 Jan 2015, 17:45

Re: Smooth animation

Post by MikeD » 11 Feb 2015, 13:55

Thanks for all the answers, Mikhail.
You're really helping me out here.

Does CAD VCL contain any possibilities or functions for animation?
Or would I have to do that all by myself in delphi?

-Mike

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Smooth animation

Post by support » 11 Feb 2015, 16:00

Hello Mike,

CAD VCL is intended for static rendering, it doesn't contain any built-in functions for animation. You have to implement that in your Delphi code.


MIkhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply