VISU_GaussPtsActorFactory.h \
VISU_Event.h \
VISU_Actor.h \
+ VISU_DataSetActor.h \
VISU_MeshAct.h \
VISU_ScalarMapAct.h \
VISU_GaussPtsAct.h \
LIB = libVisuObject.la
LIB_SRC = \
VISU_Actor.cxx \
+ VISU_DataSetActor.cxx \
VISU_MeshAct.cxx \
VISU_ScalarMapAct.cxx \
VISU_GaussPtsDeviceActor.cxx \
#include <vtkShrinkFilter.h>
#include <vtkShrinkPolyData.h>
-#include <vtkDataSetMapper.h>
#include <vtkGeometryFilter.h>
#include <vtkObjectFactory.h>
//#define ENABLE_ANNOTATION
//----------------------------------------------------------------------------
-vtkStandardNewMacro(VISU_Actor);
+//vtkStandardNewMacro(VISU_Actor);
//----------------------------------------------------------------------------
VISU_Actor
myIsVTKMapping(false),
myPrs3d(NULL),
myActorFactory(NULL),
- myMapper(vtkDataSetMapper::New()),
myIsShrunk(false),
myIsShrinkable(false),
myShrinkFilter(VTKViewer_ShrinkFilter::New()),
{
if(MYDEBUG) MESSAGE("VISU_Actor::VISU_Actor - this = "<<this);
- myMapper->Delete();
myShrinkFilter->Delete();
myStoreMapping = true;
::ShallowCopyPL(VISU_PipeLine* thePipeLine)
{
myPipeLine->ShallowCopy(thePipeLine, true);
- vtkDataSetMapper* aTarget = GetDataSetMapper();
- vtkDataSetMapper* aSource = thePipeLine->GetDataSetMapper();
- VISU::CopyDataSetMapper(aTarget, aSource, true);
- aTarget->SetLookupTable(aSource->GetLookupTable());
}
//----------------------------------------------------------------------------
}
//----------------------------------------------------------------------------
-void
-VISU_Actor
-::SetMapperInput(vtkDataSet* theDataSet)
-{
- myMapper->SetInput(theDataSet);
- SetMapper(myMapper.GetPointer());
-}
-
void
VISU_Actor
::SetPipeLine(VISU_PipeLine* thePipeLine)
return GetCurrentPL()->GetOutput();
}
-//----------------------------------------------------------------------------
-vtkDataSetMapper*
-VISU_Actor
-::GetDataSetMapper()
-{
- return myMapper.GetPointer();
-}
-
//----------------------------------------------------------------------------
unsigned long int
VISU_Actor
class vtkProp;
class vtkProperty;
-class vtkDataSetMapper;
class vtkTextMapper;
class vtkTextActor;
class vtkInteractorStyle;
public:
vtkTypeMacro(VISU_Actor,SALOME_Actor);
- static
- VISU_Actor*
- New();
+ //static
+ //VISU_Actor*
+ //New();
//! Copies all properties from the given actor
virtual
vtkDataSet*
GetInput();
- virtual
- vtkDataSetMapper*
- GetDataSetMapper();
-
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
virtual
void
- SetMapperInput(vtkDataSet* theDataSet);
+ SetMapperInput(vtkDataSet* theDataSet) = 0;
virtual
VISU_PipeLine*
bool myIsVTKMapping;
VISU::Prs3d_i* myPrs3d;
vtkSmartPointer<VISU_PipeLine> myPipeLine;
- vtkSmartPointer<vtkDataSetMapper> myMapper;
VISU::TActorFactory* myActorFactory;
vtkTimeStamp myUpdateFromFactoryTime;
--- /dev/null
+// VISU OBJECT : interactive object for VISU entities implementation
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+// File :
+// Author :
+// Module : VISU
+
+#include "VISU_DataSetActor.h"
+#include "VISU_PipeLine.hxx"
+#include "VISU_PipeLineUtils.hxx"
+
+#include <vtkDataSetMapper.h>
+#include <vtkObjectFactory.h>
+
+#include <boost/bind.hpp>
+
+using namespace std;
+
+#ifdef _DEBUG_
+static int MYDEBUG = 0;
+#else
+static int MYDEBUG = 0;
+#endif
+
+//----------------------------------------------------------------------------
+vtkStandardNewMacro(VISU_DataSetActor);
+
+//----------------------------------------------------------------------------
+VISU_DataSetActor
+::VISU_DataSetActor():
+ myMapper(vtkDataSetMapper::New())
+{
+ if(MYDEBUG) MESSAGE("VISU_DataSetActor::VISU_DataSetActor - this = "<<this);
+
+ myMapper->Delete();
+}
+
+//----------------------------------------------------------------------------
+VISU_DataSetActor
+::~VISU_DataSetActor()
+{
+ if(MYDEBUG) MESSAGE("~VISU_DataSetActor() - this = "<<this);
+}
+
+//----------------------------------------------------------------------------
+void
+VISU_DataSetActor
+::ShallowCopyPL(VISU_PipeLine* thePipeLine)
+{
+ Superclass::ShallowCopyPL(thePipeLine);
+
+ vtkDataSetMapper* aTarget = GetDataSetMapper();
+ vtkDataSetMapper* aSource = thePipeLine->GetDataSetMapper();
+ VISU::CopyDataSetMapper(aTarget, aSource, true);
+ aTarget->SetLookupTable(aSource->GetLookupTable());
+}
+
+//----------------------------------------------------------------------------
+void
+VISU_DataSetActor
+::SetMapperInput(vtkDataSet* theDataSet)
+{
+ myMapper->SetInput(theDataSet);
+ SetMapper(myMapper.GetPointer());
+}
+
+//----------------------------------------------------------------------------
+vtkDataSetMapper*
+VISU_DataSetActor
+::GetDataSetMapper()
+{
+ return myMapper.GetPointer();
+}
--- /dev/null
+// VISU OBJECT : interactive object for VISU entities implementation
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+// File :
+// Author :
+// Module : VISU
+
+#ifndef VISU_DATASETACTOR_H
+#define VISU_DATASETACTOR_H
+
+#include "VISU_Actor.h"
+
+class vtkDataSetMapper;
+
+#ifdef _WIN_32
+#define VTKOCC_EXPORT __declspec (dllexport)
+#else
+#define VTKOCC_EXPORT VTK_EXPORT
+#endif
+
+//----------------------------------------------------------------------------
+class VTKOCC_EXPORT VISU_DataSetActor : public VISU_Actor
+{
+ public:
+ vtkTypeMacro(VISU_DataSetActor,VISU_Actor);
+
+ static
+ VISU_DataSetActor*
+ New();
+
+ virtual
+ void
+ ShallowCopyPL(VISU_PipeLine* thePipeLine);
+
+ virtual
+ vtkDataSetMapper*
+ GetDataSetMapper();
+
+ //----------------------------------------------------------------------------
+ protected:
+ VISU_DataSetActor();
+
+ virtual
+ ~VISU_DataSetActor();
+
+ virtual
+ void
+ SetMapperInput(vtkDataSet* theDataSet);
+
+ //----------------------------------------------------------------------------
+ vtkSmartPointer<vtkDataSetMapper> myMapper;
+};
+
+#endif //VISU_DATASETACTOR_H
#include <boost/bind.hpp>
#include <vtkUnstructuredGrid.h>
-#include <vtkDataSetMapper.h>
+#include <vtkPolyDataMapper.h>
#include <vtkRenderWindow.h>
#include <vtkCellArray.h>
#include <vtkCell.h>
myBarVisibility(true),
myPickingSettings(NULL),
myInsideCursorSettings(NULL),
- myCurrentPL(NULL)
+ myCurrentPL(NULL),
+ myMapper(vtkPolyDataMapper::New())
{
if(MYDEBUG) MESSAGE("VISU_GaussPtsAct::VISU_GaussPtsAct - this = "<<this);
myCellActor->GetProperty()->SetDiffuse(0.0);
myScalarBarCtrl->Delete();
+
+ myMapper->Delete();
}
VISU_GaussPtsAct
//----------------------------------------------------------------------------
+
vtkMapper*
VISU_GaussPtsAct
::GetMapper()
{
+ //vtkMapper* aMapper = myCurrentPL->GetPSMapper();
+ //aMapper->Update();
+ //return aMapper;
myMapper->Update();
- return Superclass::GetMapper();
+ return myMapper.GetPointer();
}
vtkFloatingPointType*
myDeviceActor->SetPipeLine(GetGaussPointsPL());
myCurrentPL = myDeviceActor->GetPipeLine();
+ //SetMapper(myCurrentPL->GetPSMapper());
+
myMapper->SetInput(myCurrentPL->GetPickableDataSet());
SetMapper(myMapper.GetPointer());
}
Update();
}
-//----------------------------------------------------------------------------
-void
-VISU_GaussPtsAct
-::UpdateFromFactory()
-{
- Superclass::UpdateFromFactory();
-}
-
//----------------------------------------------------------------------------
unsigned long int
VISU_GaussPtsAct
class VISU_FramedTextActor;
class vtkUnstructuredGrid;
-class vtkDataSetMapper;
+class vtkPolyDataMapper;
class vtkDataArray;
class vtkInteractorObserver;
GetPickable();
//----------------------------------------------------------------------------
- virtual
- void
- UpdateFromFactory();
-
virtual
unsigned long int
GetMTime();
VISU_GaussPointsPL* myCurrentPL;
vtkSmartPointer<VISU_GaussPointsPL> myGaussPointsPL;
+ vtkSmartPointer<vtkPolyDataMapper> myMapper;
+
vtkIdType myLastObjPointID;
vtkSmartPointer<VISU_FramedTextActor> myTextActor;
#ifndef VISU_MeshAct_HeaderFile
#define VISU_MeshAct_HeaderFile
-#include "VISU_Actor.h"
+#include "VISU_DataSetActor.h"
#include "SVTK_DeviceActor.h"
namespace SVTK
}
}
-class VTKOCC_EXPORT VISU_MeshAct : public VISU_Actor
+class VTKOCC_EXPORT VISU_MeshAct : public VISU_DataSetActor
{
public:
- vtkTypeMacro(VISU_MeshAct,VISU_Actor);
+ vtkTypeMacro(VISU_MeshAct,VISU_DataSetActor);
static
VISU_MeshAct*
New();
#ifndef VISU_ScalarMapAct_HeaderFile
#define VISU_ScalarMapAct_HeaderFile
-#include "VISU_Actor.h"
+#include "VISU_DataSetActor.h"
class VISU_ScalarBarActor;
-class VTKOCC_EXPORT VISU_ScalarMapAct : public VISU_Actor
+class VTKOCC_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor
{
public:
- vtkTypeMacro(VISU_ScalarMapAct,VISU_Actor);
+ vtkTypeMacro(VISU_ScalarMapAct,VISU_DataSetActor);
static
VISU_ScalarMapAct*
return myPSMapper;
}
-vtkDataSet*
+vtkPolyData*
VISU_GaussPointsPL
::GetPickableDataSet()
{
GetPSMapper();
//! Get an intermediate dataset that can be picked
- vtkDataSet*
+ vtkPolyData*
GetPickableDataSet();
//! Redefined method for initialization of the pipeline.
if( anOwner && anAppStudy )
{
+ cout << "Prs3d - " << myPrs3dEntry.latin1() << endl;
+ cout << "Owner - " << anOwner->entry().latin1() << endl;
+
if(myPrs3dEntry == anOwner->entry())
return true;
//----------------------------------------------------------------------------
- VISU::TPrs3dPtr
+ VISU::ColoredPrs3d_i*
FindSameFieldPrs(const VISU::TColoredPrs3dHolderMap& theHolderMap,
const VISU::ColoredPrs3dHolder::BasicInput& theInput,
VISU::VISUType theType)
break;
VISU::ColoredPrs3dHolder::BasicInput_var anInput = aPrs3d->GetBasicInput();
if(IsSameField(theInput, anInput))
- return aPrs3d;
+ return aPrs3d.get();
}
}
return VISU::TPrs3dPtr();
VISU::VISUType theType,
const size_t theRawEstimatedMemorySize)
{
- VISU::TPrs3dPtr aPrs3d = FindSameFieldPrs(theHolderMap, theInput, theType);
+ VISU::ColoredPrs3d_i* aPrs3d = FindSameFieldPrs(theHolderMap, theInput, theType);
if(aPrs3d)
return aPrs3d->GetMemorySize();
return CORBA::Float(theRawEstimatedMemorySize/(1024.0*1024.0)); // convert to Mb
UseFixedRange( anOrigin->IsRangeFixed() );
myIsTimeStampFixed = anOrigin->IsTimeStampFixed();
+
+ SetHolderEntry( anOrigin->GetHolderEntry() );
}
}