#include <AIS_InteractiveContext.jxx>
#include <SelectMgr_EntityOwner.hxx>
+#include <StdSelect_ViewerSelector3d.hxx>
#include <AIS_Selection.hxx>
#include <AIS_StatusOfDetection.hxx>
#include <AIS_StatusOfPick.hxx>
#include <V3d_SpotLight.hxx>
#include <V3d_DirectionalLight.hxx>
#include <V3d_AmbientLight.hxx>
+#include <Visual3d_View.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <SelectMgr_Selection.hxx>
#include <AIS_MapOfInteractive.hxx>
#include <AIS_MapIteratorOfMapOfInteractive.hxx>
+#include <AIS_InteractiveObject.hxx>
//=======================================================================
//function : MoveTo
AIS_StatusOfDetection aStatus = AIS_SOD_Nothing;
Standard_Boolean toUpdateViewer = Standard_False;
- // allonzy
+ myFilters->SetDisabledObjects (theView->View()->HiddenObjects());
myMainSel->Pick (theXPix, theYPix, theView);
// filling of myAISDetectedSeq sequence storing information about detected AIS objects
sel->Init();
while (sel->More()) {
TR = sel->Value();
- IO = *((Handle(AIS_InteractiveObject)*)&TR);
+ IO = Handle(AIS_InteractiveObject)::DownCast (TR);
Unhilight(IO,Standard_False);
IO->State(0);
sel->Next();
Handle(AIS_InteractiveObject) AIS_InteractiveContext::Current() const
{
Handle(Standard_Transient) TR = AIS_Selection::Selection(myCurrentName.ToCString())->Value();
- Handle(AIS_InteractiveObject) IO = *((Handle(AIS_InteractiveObject)*)&TR);
+ Handle(AIS_InteractiveObject) IO = Handle(AIS_InteractiveObject)::DownCast (TR);
return IO;
}
sel->Init();
while (sel->More()) {
TR = sel->Value();
- IO = *((Handle(AIS_InteractiveObject)*)&TR);
+ IO = Handle(AIS_InteractiveObject)::DownCast (TR);
HilightWithColor(IO,mySelectionColor,Standard_False);
sel->Next();
}
sel->Init();
while (sel->More()) {
TR = sel->Value();
- IO = *((Handle(AIS_InteractiveObject)*)&TR);
+ IO = Handle(AIS_InteractiveObject)::DownCast (TR);
Unhilight(IO,Standard_False);
sel->Next();
}
Handle(AIS_InteractiveObject) IO;
for(S->Init();S->More();S->Next()){
Tr = S->Value();
- IO = (*((Handle(AIS_InteractiveObject)*)&Tr));
+ IO = Handle(AIS_InteractiveObject)::DownCast (Tr);
IO->State(0);
Unhilight(IO,Standard_False);
}
sel->Init();
while (sel->More()) {
TR = sel->Value();
- IO = *((Handle(AIS_InteractiveObject)*)&TR);
+ IO = Handle(AIS_InteractiveObject)::DownCast (TR);
HilightWithColor(IO,mySelectionColor,Standard_False);
sel->Next();
}
sel->Init();
while (sel->More()) {
TR = sel->Value();
- IO = *((Handle(AIS_InteractiveObject)*)&TR);
+ IO = Handle(AIS_InteractiveObject)::DownCast (TR);
Unhilight(IO,Standard_False);
sel->Next();
}
if (AIS_Selection::Selection(myCurrentName.ToCString())->Extent() == 0)
return NULL;
Handle(Standard_Transient) TR =AIS_Selection::Selection(myCurrentName.ToCString())->Value();
- Handle(AIS_InteractiveObject) IO = *((Handle(AIS_InteractiveObject)*)&TR);
+ Handle(AIS_InteractiveObject) IO = Handle(AIS_InteractiveObject)::DownCast (TR);
return IO;}
return myLocalContexts(myCurLocalIndex)->SelectedInteractive();
//function : EntityOwners
//purpose :
//=======================================================================
-void AIS_InteractiveContext::EntityOwners(SelectMgr_IndexedMapOfOwner& theOwners,
+void AIS_InteractiveContext::EntityOwners(Handle(SelectMgr_IndexedMapOfOwner)& theOwners,
const Handle(AIS_InteractiveObject)& theIObj,
const Standard_Integer theMode) const
{
else
aModes.Append( theMode );
+ if (theOwners.IsNull())
+ theOwners = new SelectMgr_IndexedMapOfOwner();
+
TColStd_ListIteratorOfListOfInteger anItr( aModes );
for (; anItr.More(); anItr.Next() )
{
if ( !theIObj->HasSelection( aMode ) )
continue;
- Handle(SelectMgr_Selection) aSel = theIObj->Selection( aMode );
+ Handle(SelectMgr_Selection) aSel = theIObj->Selection(aMode);
for ( aSel->Init(); aSel->More(); aSel->Next() )
{
- Handle(SelectBasics_SensitiveEntity) aEntity = aSel->Sensitive();
+ Handle(SelectBasics_SensitiveEntity) aEntity = aSel->Sensitive()->BaseSensitive();
if ( aEntity.IsNull() )
continue;
Handle(SelectMgr_EntityOwner) aOwner =
Handle(SelectMgr_EntityOwner)::DownCast(aEntity->OwnerId());
if ( !aOwner.IsNull() )
- theOwners.Add( aOwner );
+ theOwners->Add( aOwner );
}
}
}