But i couldn't get it work. here are the lines : Handle(AIS_Shape) Shape Shape->SetHilightedMode();
Is there something i missed ? best regards
Msaaf Omar Mon, 03/27/2000 - 15:47
I want to be able to change dimensions of selected shapes. I know that it takes knowing the corresponding Topological creating element. The problem is that i don't know how to select the shapes, and make link to the topology. Could you help me please ? Thanxs.. Omar Msaaf...
Michael Gandyra (not verified) Mon, 03/27/2000 - 17:14
If you used AIS_InteractiveContext then you can make use of the MoveTo(x,y) method to highlight a shape under the cursor (assume at x,y). If not, then it is a very little bit more complicated ........
I ask for help. All i ask is the big lines to follow in order to get my goal. What i aws thinking was the following : Create a class belonging to the Topology, thta has a member = Interactive Object. Then when you click on the Interactive Object you know who is its father and then you can change its dimensions. Am i on the right way ?? Regards, Omar Msaaf
Michael Gandyra (not verified) Tue, 03/28/2000 - 09:49
No Problem !
If you have to recognize a special Object through a Mouseclick - or Mousemove then create an Interactive Object inheriting from AIS_InteractiveObject. In it you have to redefine the Compute and Computeselection method. In the ComputeSelection method you have to provide an entityowner to the interactive object, like
Handle_SelectMgr_EntityOwner lOwner = new SelectMgr_EntityOwner(this, 10);
Then you have to provide a sensitivebox. If you are inside (with mouse) then -> object is highlighted. You don't have to calculate on your own. Just use the existing methods, like for a segment:
Handle_Select3D_SensitiveSegment arrowLine = new Select3D_SensitiveSegment(lOwner, myPnt1, myPnt2);
Then add it to the selection (argument from ComputeSelection method)
aSelection->Add(arrowLine);
Thats all. If you now use the MoveTo method from AIS_InteractiveContext then you can query your object with HasDetected and get it with DetectedInteractive. DownCast it to your inherited class. If its not null, then you got it. If you implemented some nice Methods on your own inheritance, then you can query your object like you want, also for parents, as you intend.
If its still not what you intend, then please be more precise in what you want to do. And please RTFM.
Mon, 03/27/2000 - 15:47
I want to be able to change dimensions of selected shapes. I know that it takes knowing the corresponding Topological creating element. The problem is that i don't know how to select the shapes, and make link to the topology. Could you help me please ? Thanxs.. Omar Msaaf...
Mon, 03/27/2000 - 17:14
If you used AIS_InteractiveContext then you can make use of the MoveTo(x,y) method to highlight a shape under the cursor (assume at x,y). If not, then it is a very little bit more complicated ........
Regards, Michael
Mon, 03/27/2000 - 17:32
I ask for help. All i ask is the big lines to follow in order to get my goal. What i aws thinking was the following : Create a class belonging to the Topology, thta has a member = Interactive Object. Then when you click on the Interactive Object you know who is its father and then you can change its dimensions. Am i on the right way ?? Regards, Omar Msaaf
Tue, 03/28/2000 - 09:49
No Problem !
If you have to recognize a special Object through a Mouseclick - or Mousemove then create an Interactive Object inheriting from AIS_InteractiveObject. In it you have to redefine the Compute and Computeselection method. In the ComputeSelection method you have to provide an entityowner to the interactive object, like
Handle_SelectMgr_EntityOwner lOwner = new SelectMgr_EntityOwner(this, 10);
Then you have to provide a sensitivebox. If you are inside (with mouse) then -> object is highlighted. You don't have to calculate on your own. Just use the existing methods, like for a segment:
Handle_Select3D_SensitiveSegment arrowLine = new Select3D_SensitiveSegment(lOwner, myPnt1, myPnt2);
Then add it to the selection (argument from ComputeSelection method)
aSelection->Add(arrowLine);
Thats all. If you now use the MoveTo method from AIS_InteractiveContext then you can query your object with HasDetected and get it with DetectedInteractive. DownCast it to your inherited class. If its not null, then you got it. If you implemented some nice Methods on your own inheritance, then you can query your object like you want, also for parents, as you intend.
If its still not what you intend, then please be more precise in what you want to do. And please RTFM.
Regards, Michael