#include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
#include <AIS_Selection.hxx>
-
-static TColStd_ListIteratorOfListOfInteger ItL;
//=======================================================================
//function : OpenLocalContext
//purpose :
UseDisplayedObjects,
AllowShapeDecomposition,
AcceptEraseOfTemporary);
-
- // rob 16/04/97 Problems of asynchronous orders
- if(myLocalContexts.Extent()>0){
- const Select3D_Projector& Prj = myLocalContexts(untilnow)->MainSelector()->Projector();
- NewLocal->MainSelector()->Set(Prj);
- }
- else{
- const Select3D_Projector& Prj = myMainSel->Projector();
- NewLocal->MainSelector()->Set(Prj);
- }
-
+ NewLocal->MainSelector()->Set ((myLocalContexts.Extent() > 0)
+ ? myLocalContexts (untilnow)->MainSelector()->Projector()
+ : myMainSel->Projector());
+
NewLocal->MainSelector()->UpdateConversion();
-
- myLocalContexts.Bind(myCurLocalIndex,NewLocal);
+ myLocalContexts.Bind(myCurLocalIndex,NewLocal);
#ifdef DEB
cout<<"\tOpen Local Context No "<<myCurLocalIndex<<endl;
cout<<"\t\tNo Objects Were Loaded "<<endl;
#endif
return myCurLocalIndex;
-
}
//=======================================================================
{
if(!HasOpenedContext()){
if(!myObjects.IsBound(anIObj)) return;
+ TColStd_ListIteratorOfListOfInteger ItL;
for(ItL.Initialize(myObjects(anIObj)->SelectionModes());
ItL.More();
ItL.Next()){
ActivatedModes(const Handle(AIS_InteractiveObject)& anIObj,
TColStd_ListOfInteger& theList) const
{
+ TColStd_ListIteratorOfListOfInteger ItL;
if(!HasOpenedContext()){
if(myObjects.IsBound(anIObj)){
- //ItL is a static variable...
for(ItL.Initialize(myObjects(anIObj)->SelectionModes());
ItL.More();
ItL.Next())
if(myObjects.IsBound(anIObj)){
const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
STAT->SubIntensityOn();
+ TColStd_ListIteratorOfListOfInteger ItL;
for (ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
myMainPM->Color(anIObj,mySubIntensity,ItL.Value());
}
if(myObjects.IsBound(anIObj)){
const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
STAT->SubIntensityOff();
+ TColStd_ListIteratorOfListOfInteger ItL;
for (ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
myMainPM->Unhighlight(anIObj,ItL.Value());
if(STAT->IsHilighted())
//=======================================================================
void AIS_InteractiveContext::SubIntensityOff(const Standard_Boolean updateviewer)
{
-
if(!HasOpenedContext()) return;
-
+
AIS_DataMapIteratorOfDataMapOfIOStatus It (myObjects);
-
+ TColStd_ListIteratorOfListOfInteger ItL;
for(;It.More();It.Next()){
const Handle(AIS_GlobalStatus)& STAT = It.Value();
if(STAT->IsSubIntensityOn())
for(ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
myMainPM->Unhighlight(It.Key());
}
-
+
if(updateviewer) myMainVwr->Update();
}
{
Standard_Boolean upd_main(Standard_False),upd_col(Standard_False);
TColStd_ListIteratorOfListOfInteger itl;
-
+
for (AIS_DataMapIteratorOfDataMapOfIOStatus it(myObjects);it.More();it.Next()){
const Handle(AIS_InteractiveObject)& iobj = it.Key();
const Handle(AIS_GlobalStatus)& STAT = it.Value();
for(It.Initialize(Att->SelectionModes());It.More();It.Next()){
mySM->Deactivate(aSelectable,It.Value(),myMainVS);
}
+// pop : si je laisses cela plantes dans les elements de construction
+// alors a toi de jouer ROB
// RemoveSelected(aSelectable);
if(IsSelected(aSelectable))
-Standard_Boolean AIS_LocalContext::HasSameProjector(const Select3D_Projector& aPrj) const
+Standard_Boolean AIS_LocalContext::HasSameProjector(const Handle(Select3D_Projector)& thePrj) const
{
- const Select3D_Projector& CurPrj = myMainVS->Projector();
- if(CurPrj.Perspective()!=aPrj.Perspective()) return Standard_False;
- if(CurPrj.Perspective())
- if(CurPrj.Focus()!=aPrj.Focus()) return Standard_False;
- gp_GTrsf CurTrsf(CurPrj.Transformation());
- gp_GTrsf PrjTrsf(aPrj.Transformation());
-
- for(Standard_Integer i=1;i<=3;i++){
- for(Standard_Integer j=1;j<=3;j++){
- if(CurTrsf.Value(i,j)!=PrjTrsf.Value(i,j))
- return Standard_False;
+ const Handle(Select3D_Projector)& aCurPrj = myMainVS->Projector();
+ if (aCurPrj->Perspective() != thePrj->Perspective())
+ return Standard_False;
+ if (aCurPrj->Perspective() && aCurPrj->Focus() != thePrj->Focus())
+ return Standard_False;
+ const gp_GTrsf& aCurTrsf = aCurPrj->Transformation();
+ const gp_GTrsf& aPrjTrsf = thePrj->Transformation();
+
+ for (Standard_Integer i = 1; i <= 3; ++i)
+ {
+ for (Standard_Integer j = 1; j <= 3 ; ++j)
+ {
+ if (aCurTrsf.Value (i, j) != aPrjTrsf.Value (i, j))
+ return Standard_False;
}
}
-
+
return Standard_True;
}