Transform selected objects only

Hello,
I'm new to openCascade and I would like your help :)
Starting with the c# example I can load multiple objects and then I want to transform (rotate & pan) only the selected object(s).
I can find transform methods only for V3d_view which apply to every object in the viewer.
I suppose that AIS_InteractiveContext can give me the selected objects but I cannot find a way to apply transform methods on them.

Thank you.

Sharjith Naramparambath's picture

You need to apply transformation to the underlying Topological object of the AIS_Shape provided by the AIS_InteractiveContext. Query for the Shape() from the AIS_Shape to get the TopoDS_Shape and then apply the transformation by creating a gp_Trsf and using BRepBuilderAPI_Transform to apply it to the TopoDS_Shape and get a transformed one. Then you can set back the TopoDS_Shape to the AIS_Shape by using the method Set() and the shape gets updated.
Look at the TopologyTransformations MFC sample code.