return myPipeLine.GetPointer();
}
+VISU_PipeLine*
+VISU_Actor
+::GetCurrentPL()
+{
+ return GetPipeLine();
+}
+
//----------------------------------------------------------------------------
void
if(myIsVTKMapping)
return Superclass::GetInput();
- return myPipeLine->GetInput();
+ return GetCurrentPL()->GetInput();
}
//----------------------------------------------------------------------------
if(myIsShrunk)
anID = myShrinkFilter->GetNodeObjId(anID);
- return myPipeLine->GetNodeObjID(anID);
+ return GetCurrentPL()->GetNodeObjID(anID);
}
vtkIdType
if(myIsVTKMapping)
return theID;
- return myPipeLine->GetNodeVTKID(theID);
+ return GetCurrentPL()->GetNodeVTKID(theID);
}
float*
if(myIsVTKMapping)
return Superclass::GetNodeCoord(theObjID);
- return myPipeLine->GetNodeCoord(theObjID);
+ return GetCurrentPL()->GetNodeCoord(theObjID);
}
if(myIsShrunk)
anID = myShrinkFilter->GetElemObjId(anID);
- return myPipeLine->GetElemObjID(anID);
+ return GetCurrentPL()->GetElemObjID(anID);
}
vtkIdType
if(myIsVTKMapping)
return theID;
- return myPipeLine->GetElemVTKID(theID);
+ return GetCurrentPL()->GetElemVTKID(theID);
}
vtkCell*
if(myIsVTKMapping)
return Superclass::GetElemCell(theObjID);
- return myPipeLine->GetElemCell(theObjID);
+ return GetCurrentPL()->GetElemCell(theObjID);
}
theIsHighlight);
//
myAnnotationActor->SetVisibility(0);
- bool anIsChanged = false;
if(theIsHighlight){
switch(mySelectionMode){
case CellSelection:{
myCellActor(vtkActor::New()),
myScalarBarCtrl(VISU_ScalarBarCtrl::New()),
myBarVisibility(true),
- myPickingSettings(NULL)
+ myPickingSettings(NULL),
+ myCurrentPL(NULL)
{
if(MYDEBUG) MESSAGE("VISU_GaussPtsAct::VISU_GaussPtsAct - this = "<<this);
VISU_GaussPtsAct
::GetMapper()
{
- return GetPSMapper();
+ return GetCurrentPL()->GetMapper();
}
float*
return GetMapper()->GetInput();
}
-VISU_OpenGLPointSpriteMapper*
+VISU_PipeLine*
VISU_GaussPtsAct
-::GetPSMapper()
-{
- return myDeviceActor->GetPSMapper();
+::GetCurrentPL()
+{
+ return myCurrentPL;
}
if(MYDEBUG) MESSAGE("VISU_GaussPtsAct::SetMapperInput - this = "<<this);
myDeviceActor->SetPipeLine(GetGaussPointsPL());
- //vtkLODActor::SetMapper(GetMapper());
+ myCurrentPL = myDeviceActor->GetPipeLine();
}
void
vtkIdType anObjId = GetNodeObjId( aVtkId );
if(myLastObjPointID != anObjId){
float* aNodeCoord = GetNodeCoord(anObjId);
-
- // To calculate display (2D) position of the annotation
- float aWorldCoord[4] = {aNodeCoord[0], aNodeCoord[1], aNodeCoord[2], 1.0};
- //
- const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper =
- myGaussPointsPL->GetGaussPtsIDMapper();
- VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
-
- VISU::TGaussPointID aGaussPointID = myGaussPointsPL->GetObjID(anObjId);
- VISU::TCellID aCellID = aGaussPointID.first;
- VISU::TLocalPntID aLocalPntID = aGaussPointID.second;
- std::string aParentName = aParent->GetElemName(aCellID);
- //
vtkDataSet* aDataSet = GetInput();
vtkCellData* aCellData = aDataSet->GetCellData();
if(vtkDataArray *aScalarArray = aCellData->GetScalars()){
- float aVal = aScalarArray->GetTuple1(aVtkId);
float aRadius = myGaussPointsPL->GetPointSize(aVtkId,aScalarArray);
- //float aColor[3];
- //VISU_LookupTable* aLookupTable = myGaussPointsPL->GetMapperTable();
- //aLookupTable->GetColor(aVal,aColor);
- //
float aPyramidHeight = myPickingSettings->GetPyramidHeight();
aPyramidHeight=aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
myCursorPyramid->Init(aPyramidHeight,
aNodeCoord,
myPreHighlightProperty.GetPointer()->GetColor());
}
-
- if(vtkDataArray *aVectorArray = aCellData->GetVectors()){
- float* aVal = aVectorArray->GetTuple3(aVtkId);
- }
-
myLastObjPointID = anObjId;
}
myCursorPyramid->SetVisibility(true);
myHighlightProperty.GetPointer()->GetColor());
myCursorPyramidSelected->SetVisibility(1);
//
- const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper=
+ const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper =
myGaussPointsPL->GetGaussPtsIDMapper();
- VISU::TNamedIDMapper* aParent=aGaussPtsIDMapper->GetParent();
+ VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
VISU::TGaussPointID aGaussPointID = myGaussPointsPL->GetObjID(anObjId);
VISU::TCellID aCellID = aGaussPointID.first;
- VISU::TLocalPntID aLocalPntID=aGaussPointID.second;
+ VISU::TLocalPntID aLocalPntID = aGaussPointID.second;
aStr<<"\nParentCellID: "<<aCellID;
std::string aParentName = aParent->GetElemName(aCellID);
if(aParentName != "") {
}
}
+
//----------------------------------------------------------------------------
void
VISU_GaussPtsAct1
myOutsideDeviceActor->GetPipeLine()->SetImplicitFunction(NULL);
myOutsideDeviceActor->SetVisibility(false);
+
+ myCurrentPL = myDeviceActor->GetPipeLine();
}
if(theWidget){
myOutsideDeviceActor->GetPipeLine()->SetImplicitFunction(theWidget->ImplicitFunction());
myOutsideDeviceActor->SetVisibility(GetVisibility() && theWidget->IsEnabled());
+
+ myCurrentPL = myInsideDeviceActor->GetPipeLine();
}
Superclass::SetImplicitFunctionWidget(theWidget);
default:
break;
}
+
+ switch(theEvent){
+ case vtkCommand::EnableEvent:
+ myCurrentPL = myInsideDeviceActor->GetPipeLine();
+ break;
+ case vtkCommand::DisableEvent:
+ myCurrentPL = myDeviceActor->GetPipeLine();
+ break;
+ }
+
Superclass::OnInteractorEvent(theEvent);
}
if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
myDeviceActor->SetPipeLine(aPipeLine);
- myPipeLine = aPipeLine;
+ myCurrentPL = aPipeLine;
}
}