objects moving simulation

Hi, I am still in my early asessment of occ. Can any one answer my questions:

Different objects can start moving (or called 'fly') to their preset locations, and with different speed at same time? (like a simple explosion simulation)
If true, how?

Tilman Leune's picture

Hi,

You will have to provide your own functions to calculate the movement, but animation is possible.
Every diplayed object can have a so called location, which is the objects transformation matrix.
Manipulating this matrix will result in the object being rendered in another place.

Things you ought to look at for this:

  • AIS_InteractiveObject and it's decendents to display and manipulate your objects
  • gp_Trsf (a class representing a transformation) which can be used as a parameter for functions expecting a Location
  • good luck

lch0515l's picture

Thanks, Tilman, it sounds reasonable.
I will try it.