-// Copyright: Matra-Datavision 1995
-// File: SelectMgr_SelectableObject.cxx
-// Created: Mon Feb 20 17:40:49 1995
-// Author: Mister rmi
-// <rmi>
-
-
+// Created on: 1995-02-20
+// Created by: Mister rmi
+// Copyright (c) 1995-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
#include <Standard_NotImplemented.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
+#include <TopLoc_Location.hxx>
#include <gp_Pnt.hxx>
static Standard_Integer Search (const SelectMgr_SequenceOfSelection& seq,
//=======================================================================
-//function : ReSetLocation
+//function : ReSetTransformation
//purpose :
//=======================================================================
-void SelectMgr_SelectableObject::ResetLocation()
+void SelectMgr_SelectableObject::ResetTransformation()
{
TopLoc_Location aLoc;
+ TopLoc_Location aSelfLocation (Transformation());
// les selections
Handle(Select3D_SensitiveEntity) SE;
for(Sel->Init();Sel->More();Sel->Next()){
SE = *((Handle(Select3D_SensitiveEntity)*) &(Sel->Sensitive()));
if(!SE.IsNull()){
- if(SE->HasLocation())
- if( SE->Location()==myLocation){
+ if(SE->HasLocation()) {
+ if( SE->Location()==aSelfLocation){
SE->ResetLocation();
const Handle(SelectBasics_EntityOwner)& EO = SE->OwnerId();
(*((Handle(SelectMgr_EntityOwner)*)&EO))->ResetLocation();}
else{
const TopLoc_Location& iniloc =SE->Location();
- SE->SetLocation(iniloc*myLocation.Inverted());
+ SE->SetLocation(iniloc*aSelfLocation.Inverted());
const Handle(SelectBasics_EntityOwner)& EO = SE->OwnerId();
(*((Handle(SelectMgr_EntityOwner)*)&EO))->SetLocation(SE->Location());}
-
+ }
}
}
Sel->UpdateStatus(SelectMgr_TOU_None);
}
- PrsMgr_PresentableObject::ResetLocation();
+ PrsMgr_PresentableObject::ResetTransformation();
}
//=======================================================================
-//function : UpdateLocation
+//function : UpdateTransformation
//purpose :
//=======================================================================
-void SelectMgr_SelectableObject::UpdateLocation()
+void SelectMgr_SelectableObject::UpdateTransformation()
{
Handle(Select3D_SensitiveEntity) SE;
const Handle(SelectMgr_Selection) & Sel = CurrentSelection();
Sel->UpdateStatus(SelectMgr_TOU_Partial);
}
- PrsMgr_PresentableObject::UpdateLocation();
+ PrsMgr_PresentableObject::UpdateTransformation();
}
//=======================================================================
-//function : UpdateLocation
+//function : UpdateTransformation
//purpose :
//=======================================================================
-void SelectMgr_SelectableObject::UpdateLocation(const Handle(SelectMgr_Selection)& Sel)
+void SelectMgr_SelectableObject::UpdateTransformation(const Handle(SelectMgr_Selection)& Sel)
{
+ TopLoc_Location aSelfLocation (Transformation());
Handle(Select3D_SensitiveEntity) SE;
- if(myLocation.IsIdentity()) return;
+ if(aSelfLocation.IsIdentity()) return;
for(Sel->Init();Sel->More();Sel->Next()){
SE = *((Handle(Select3D_SensitiveEntity)*) &(Sel->Sensitive()));
if(!SE.IsNull()){
- SE->UpdateLocation(myLocation);
+ SE->UpdateLocation(aSelfLocation);
const Handle(SelectBasics_EntityOwner)& aEOwner = SE->OwnerId();
Handle(SelectMgr_EntityOwner) aMgrEO =
Handle(SelectMgr_EntityOwner)::DownCast (aEOwner);
if (!aMgrEO.IsNull())
- aMgrEO->SetLocation (myLocation);
+ aMgrEO->SetLocation (aSelfLocation);
}
}
}