l already have a shape . And l want to let this shape translate first and then rotate . Show the whole process in the form of animation.
l have already know need use AIS_AnimationObject class to creat a single animation and add them to AIS_Animation class. And now l can let the shape translate and rotate separately. And the process of rotation or translation is shown in the form of animation.But I want to combine the two transformation，first transalate and then rotate.
gp_Trsf start_pnt1, end_pnt1,start_pnt2,end_pnt2;
(ps：p1,p2,p3 is gp_pnt)
end_pnt1.SetTranslation(p2, p3);//p1,p2,p3is gp_pnt
gp_Vec tempVec = gp_Vec(p1, p2);
gp_Dir tempDir = gp_Dir(tempVec);
gp_Ax1 tempAx1 = gp_Ax1(p1, tempVec);
Handle(AIS_Animation) ais_animation = new AIS_Animation("aPipeMaker9");
Handle(AIS_AnimationObject) ais_ao1 = new AIS_AnimationObject("animation1", myOccView->getContext(), wireshow9, start_pnt1, end_pnt1);
Handle(AIS_AnimationObject) ais_ao2 = new AIS_AnimationObject("animation2", myOccView->getContext(), wireshow9, start_pnt2, end_pnt2);
(ps: wireshow9 is my shape)
here is my code . But the results were bad. what should l do ?
Thanks in advance