Version: 6.3.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | Private Member Functions | Private Attributes | Friends

VISU.Prs3d_i Class Reference

Base class for all VTK 3D presentations. More...

#include <VISU_Prs3d_i.hh>

Inheritance diagram for VISU.Prs3d_i:
Inheritance graph

Public Types

typedef PrsObject_i TSuperClass
typedef VISU::Prs3d TInterface
typedef std::map< std::string,
QString > 
TRestoringMap
typedef Storable *(* TStorableEngine )(SALOMEDS::SObject_ptr theSObject, const TRestoringMap &theMap, const std::string &thePrefix, CORBA::Boolean theIsMultiFile)
typedef std::map< std::string,
TStorableEngine
TStorableEngineMap
typedef std::string TFileName
typedef std::vector< TFileNameTFileNames

Public Member Functions

 Prs3d_i ()
 A constructor to create a fresh instance of the class.
virtual void SameAs (const Prs3d_i *theOrigin)
 To create a deep copy from another instance of the class.
virtual ~Prs3d_i ()
virtual CORBA::Boolean Apply (bool theReInit)
void SetCResult (Result_i *theResult)
Result_iGetCResult () const
virtual void SetResultObject (VISU::Result_ptr theResult)
virtual VISU::Result_ptr GetResultObject ()
virtual void SetMeshName (const char *theMeshName)
virtual char * GetMeshName ()
std::string GetCMeshName () const
virtual const char * GetComment () const =0
 To generate an unique type name for the class (used into persistent functionality)
virtual QString GenerateName ()=0
 To generate an unique name for the instance of the class.
virtual void ToStream (std::ostringstream &theStr)
 To save paramters of the instance to std.ostringstream.
virtual StorableRestore (SALOMEDS::SObject_ptr theSObject, const Storable::TRestoringMap &theMap)
 To restore paramters of the instance from Storable.TRestoringMap.
virtual SALOMEDS::SObject_var GetSObject ()
 Get corresponding SALOMEDS.SObject.
virtual void Update ()
 To update is internal state.
virtual void RemoveFromStudy ()
 To remove the instance from study.
VISU_PipeLineGetPipeLine () const
 Get corresponding VISU_PipeLine.
bool IsPipeLineExists ()
vtkDataSet * GetInput ()
 Get input of the VISU_PipeLine.
virtual VISU_ActorCreateActor ()=0
 To define a way to create VTK representation of the instance.
virtual void RemoveActor (VISU_ActorBase *theActor)
 To unregister the pointed actor.
virtual void RemoveActors ()
 To unregister all actors of the instance.
virtual void UpdateActor (VISU_ActorBase *theActor)
 To update the pointed actor.
virtual void UpdateActors ()
 To update all actors of the instance.
void RemoveAllClippingPlanes ()
bool AddClippingPlane (vtkPlane *thePlane)
vtkIdType GetNumberOfClippingPlanes () const
vtkPlaneGetClippingPlane (vtkIdType theID) const
void RemoveClippingPlane (vtkIdType theID)
void SetPlaneParam (vtkFloatingPointType theDir[3], vtkFloatingPointType theDist, vtkPlane *thePlane)
void GetBounds (vtkFloatingPointType aBounds[6])
int GetNumberOfActors ()
bool HasVisibleActors ()
void SetOffset (const CORBA::Float *theOffsets)
 Move the 3D presentation according to the given offset parameters.
virtual void SetOffset (CORBA::Float theDx, CORBA::Float theDy, CORBA::Float theDz)
 Move the 3D presentation according to the given offset parameters.
void GetOffset (CORBA::Float *theOffsets)
 Gets offset parameters for the 3D presentation.
virtual void GetOffset (CORBA::Float &theDx, CORBA::Float &theDy, CORBA::Float &theDz)
 Gets offset parameters for the 3D presentation.
virtual void SetMarkerStd (VISU::MarkerType theMarkerType, VISU::MarkerScale theMarkerScale)
 Set standard point marker for the object.
virtual void SetMarkerTexture (CORBA::Long theTextureId)
 Set custom point marker.
virtual VISU::MarkerType GetMarkerType ()
 Get type of the point marker.
virtual VISU::MarkerScale GetMarkerScale ()
 Get scale of the point marker.
virtual CORBA::Long GetMarkerTexture ()
 Get texture identifier of the point marker.
virtual CORBA::Float GetMemorySize ()
 Gets memory size actually used by the presentation (Mb).
virtual bool GetActiveState ()
 Gets know whether the factory instance can be used for actor management or not.
virtual unsigned long int GetMTime ()
 Return modified time of the presentation.
virtual Handle (SALOME_InteractiveObject) GetIO()
 Create and return the interactive object.
virtual std::string GetActorEntry ()
 Used in derived classes to initilize the IO for actors.
bool IsForcedHidden () const
 Managing "forced hidden" flag.
void SetForcedHidden (bool)
SALOMEDS::Study_var GetStudyDocument () const
SalomeApp_Study * GetGUIStudy () const
virtual std::string GetEntry ()
virtual std::string GetName () const
virtual void SetName (const std::string &theName, bool theIsUpdateStudyAttr)
std::string ToString ()
virtual CORBA::Boolean CanCopy (SALOMEDS::SObject_ptr theObject)
virtual bool CopyFrom (SALOMEDS::SObject_ptr theObject, CORBA::Long &theObjectID, const std::string &theTmpDir, TFileNames &theFileNames)
virtual char * GetID ()
virtual VISU::VISUType GetType ()=0

Static Public Member Functions

static void RegistryStorableEngine (const std::string &theComment, TStorableEngine theEngine)
static StorableCreate (SALOMEDS::SObject_ptr theSObject, const std::string &theLocalPersistentID, const std::string &thePrefix, CORBA::Boolean theIsMultiFile)
static VISU::VISUType Comment2Type (const std::string &theComment)
static VISU::VISUType RestoringMap2Type (const TRestoringMap &theRestoringMap)
static VISU::VISUType Stream2Type (const std::string &thePersistentString)
static VISU::VISUType SObject2Type (const _PTR(SObject)&theSObject)
static std::string CorrectPersistentString (const std::string &thePersistentString)
static std::string FindEntry (SALOMEDS::Study_ptr theStudyDocument, const std::string &theStartEntry, const TRestoringMap &theRestoringMap, int IsAllLevels=true)
static QString FindValue (const TRestoringMap &theMap, const std::string &theArg, bool *theIsFind=NULL)
static QString FindValue (const TRestoringMap &theMap, const std::string &theArg, const QString &theDefaultValue)
static void StringToMap (const QString &theString, TRestoringMap &theMap)
static TRestoringMap GetStorableMap (_PTR(SObject) theSObject)
static SALOMEDS::SObject_ptr GetResultSO (SALOMEDS::SObject_ptr theSObject)
static void DataToStream (std::ostringstream &theStr, const QString &theName, const QString &theVal)
static void DataToStream (std::ostringstream &theStr, const QString &theName, int theVal)
static void DataToStream (std::ostringstream &theStr, const QString &theName, long theVal)
static void DataToStream (std::ostringstream &theStr, const QString &theName, double theVal)
static CORBA::ORB_var GetORB ()
static PortableServer::POA_var GetPOA ()
static SALOME_NamingService * GetNS ()
static SALOME_LifeCycleCORBA * GetLCC ()
static VISU_Gen_iGetVisuGenImpl ()

Protected Member Functions

virtual bool SetInput (bool theReInit)
virtual void OnRestoreInput ()
 Restore input parameters if Apply function fails.
void SetPipeLine (VISU_PipeLine *thePipeLine)
 Used in derived classes to initilize the myPipeLine member.
void CreateActor (VISU_Actor *theActor)
 Used in derived classes to initilize the myPipeLine member.
virtual VISU_PipeLineGetActorPipeLine ()
 Gets or creates VISU_PipeLine instance for actor initilization.
virtual void CheckDataSet ()
 To check dataset validity, throws std.exception if not valid.
bool LoadMarkerTexture (int theMarkerId, VTK::MarkerTexture &theMarkerTexture)
void SetStudyDocument (SALOMEDS::Study_ptr theStudy)

Protected Attributes

vtkTimeStamp myUpdateTime
vtkTimeStamp myParamsTime
std::string myID

Static Protected Attributes

static QMutex * myMutex = NULL
static CORBA::ORB_var myOrb
static PortableServer::POA_var myPoa
static SALOME_NamingService * myNamingService
static VISU_Gen_imyVisuGenImpl
static SALOME_LifeCycleCORBA * myEnginesLifeCycle

Private Types

typedef SALOME::GenericObjPtr
< VISU::Result_i
TResultPtr

Private Member Functions

 Prs3d_i (const Prs3d_i &)
void SetResultEntry (const std::string &theResultEntry)
std::string GetResultEntry ()
 Handle (SALOME_InteractiveObject) myIO
void SetActiveState (bool theState)
 Sets activity flag for the factory instance.

Private Attributes

TResultPtr myResult
TResultPtr myPreviousResult
std::string myMeshName
std::string myPreviousMeshName
CORBA::Float myOffset [3]
VISU::MarkerType myMarkerType
VISU::MarkerScale myMarkerScale
int myMarkerId
boost::signal0< void > myUpdateActorsSignal
boost::signal0< void > myRemoveActorsFromRendererSignal
vtkSmartPointer
< vtkActorCollection > 
myActorCollection
vtkSmartPointer< VISU_PipeLinemyPipeLine
bool myIsActiveSatate
bool myIsForcedHidden

Friends

class ColoredPrs3dCache_i

Detailed Description

It is a root class for a middle level of VISU functionality. Almost all functionality of the the class implemented through redirection external requestes to its VISU_PipeLine. It define an interface and implement the following topics:


Member Typedef Documentation

typedef std::map<std::string, QString> VISU.Storable.TRestoringMap [inherited]
typedef Storable*(* VISU.Storable.TStorableEngine)(SALOMEDS::SObject_ptr theSObject, const TRestoringMap &theMap, const std::string &thePrefix, CORBA::Boolean theIsMultiFile) [inherited]
typedef std::string VISU.Storable.TFileName [inherited]

Reimplemented in VISU.Result_i.

typedef std::vector<TFileName> VISU.Storable.TFileNames [inherited]

Reimplemented in VISU.Result_i.


Constructor & Destructor Documentation

VISU.Prs3d_i.Prs3d_i ( const Prs3d_i ) [private]
VISU.Prs3d_i::Prs3d_i ( )
VISU.Prs3d_i::~Prs3d_i ( ) [virtual]

References MESSAGE, and MYDEBUG.


Member Function Documentation

void VISU.Prs3d_i::SameAs ( const Prs3d_i theOrigin) [virtual]
CORBA::Boolean VISU.Prs3d_i::Apply ( bool  theReInit) [virtual]
void VISU.Prs3d_i::SetCResult ( VISU::Result_i theResult)
VISU::Result_i * VISU.Prs3d_i::GetCResult ( ) const
void VISU.Prs3d_i::SetResultObject ( VISU::Result_ptr  theResult) [virtual]

References VISU.GetServant().

VISU::Result_ptr VISU.Prs3d_i::GetResultObject ( ) [virtual]
void VISU.Prs3d_i::SetMeshName ( const char *  theMeshName) [virtual]
char * VISU.Prs3d_i::GetMeshName ( ) [virtual]
std::string VISU.Prs3d_i::GetCMeshName ( ) const
virtual const char* VISU.Prs3d_i.GetComment ( ) const [pure virtual]
virtual QString VISU.Prs3d_i.GenerateName ( ) [pure virtual]
void VISU.Prs3d_i::ToStream ( std::ostringstream &  theStr) [virtual]
VISU::Storable * VISU.Prs3d_i::Restore ( SALOMEDS::SObject_ptr  theSObject,
const Storable::TRestoringMap theMap 
) [virtual]
SALOMEDS::SObject_var VISU.Prs3d_i::GetSObject ( ) [virtual]
void VISU.Prs3d_i::Update ( ) [virtual]

Reimplemented in VISU.StreamLines_i.

References MESSAGE, MYDEBUG, and VISU_PipeLine.Update().

void VISU.Prs3d_i::RemoveFromStudy ( ) [virtual]

Reimplemented in VISU.ColoredPrs3d_i, and VISU.Mesh_i.

References VISU.Execute().

VISU_PipeLine * VISU.Prs3d_i::GetPipeLine ( ) const
bool VISU.Prs3d_i::IsPipeLineExists ( )
vtkDataSet * VISU.Prs3d_i::GetInput ( )
virtual VISU_Actor* VISU.Prs3d_i.CreateActor ( ) [pure virtual]
void VISU.Prs3d_i::RemoveActor ( VISU_ActorBase theActor) [virtual]

Implements VISU.TActorFactory.

References MESSAGE, and MYDEBUG.

void VISU.Prs3d_i::RemoveActors ( ) [virtual]

References MESSAGE, and MYDEBUG.

void VISU.Prs3d_i::UpdateActor ( VISU_ActorBase theActor) [virtual]
void VISU.Prs3d_i::UpdateActors ( ) [virtual]

References MESSAGE, and MYDEBUG.

void VISU.Prs3d_i::RemoveAllClippingPlanes ( )
bool VISU.Prs3d_i::AddClippingPlane ( vtkPlane thePlane)
vtkIdType VISU.Prs3d_i::GetNumberOfClippingPlanes ( ) const
vtkPlane * VISU.Prs3d_i::GetClippingPlane ( vtkIdType  theID) const
void VISU.Prs3d_i::RemoveClippingPlane ( vtkIdType  theID)
void VISU.Prs3d_i::SetPlaneParam ( vtkFloatingPointType  theDir[3],
vtkFloatingPointType  theDist,
vtkPlane thePlane 
)
void VISU.Prs3d_i::GetBounds ( vtkFloatingPointType  aBounds[6])
int VISU.Prs3d_i::GetNumberOfActors ( )
bool VISU.Prs3d_i::HasVisibleActors ( )
void VISU.Prs3d_i::SetOffset ( const CORBA::Float *  theOffsets)
void VISU.Prs3d_i::SetOffset ( CORBA::Float  theDx,
CORBA::Float  theDy,
CORBA::Float  theDz 
) [virtual]
void VISU.Prs3d_i::GetOffset ( CORBA::Float *  theOffsets)
void VISU.Prs3d_i::GetOffset ( CORBA::Float &  theDx,
CORBA::Float &  theDy,
CORBA::Float &  theDz 
) [virtual]
void VISU.Prs3d_i::SetMarkerStd ( VISU::MarkerType  theMarkerType,
VISU::MarkerScale  theMarkerScale 
) [virtual]
void VISU.Prs3d_i::SetMarkerTexture ( CORBA::Long  theTextureId) [virtual]

References VISU.MT_USER.

VISU::MarkerType VISU.Prs3d_i::GetMarkerType ( ) [virtual]
VISU::MarkerScale VISU.Prs3d_i::GetMarkerScale ( ) [virtual]
CORBA::Long VISU.Prs3d_i::GetMarkerTexture ( ) [virtual]
CORBA::Float VISU.Prs3d_i::GetMemorySize ( ) [virtual]
bool VISU.Prs3d_i::GetActiveState ( ) [virtual]

Implements VISU.TActorFactory.

unsigned long int VISU.Prs3d_i::GetMTime ( ) [virtual]

Implements VISU.TActorFactory.

virtual VISU.Prs3d_i.Handle ( SALOME_InteractiveObject  ) [virtual]
std::string VISU.Prs3d_i::GetActorEntry ( ) [virtual]

Reimplemented in VISU.ColoredPrs3d_i.

bool VISU.Prs3d_i::IsForcedHidden ( ) const
void VISU.Prs3d_i::SetForcedHidden ( bool  theFlag)
bool VISU.Prs3d_i::SetInput ( bool  theReInit) [protected, virtual]

Used in Apply method to get know whether it is possible to create presentation with the input parameters or not. The derived classes can use this method to customize Apply behaviour.

Reimplemented in VISU.ColoredPrs3d_i.

References VISU_Example_01.myMeshName, and batchmode_visu_view3d.myResult.

void VISU.Prs3d_i::OnRestoreInput ( ) [protected, virtual]

Reimplemented in VISU.ColoredPrs3d_i.

References VISU_Example_01.myMeshName.

void VISU.Prs3d_i::SetPipeLine ( VISU_PipeLine thePipeLine) [protected]
void VISU.Prs3d_i::CreateActor ( VISU_Actor theActor) [protected]
VISU_PipeLine * VISU.Prs3d_i::GetActorPipeLine ( ) [protected, virtual]

Reimplemented in VISU.GaussPoints_i, and VISU.Vectors_i.

void VISU.Prs3d_i::CheckDataSet ( ) [protected, virtual]
bool VISU.Prs3d_i::LoadMarkerTexture ( int  theMarkerId,
VTK::MarkerTexture &  theMarkerTexture 
) [protected]
void VISU.Prs3d_i::SetResultEntry ( const std::string theResultEntry) [private]

References VISU.GetResult().

std::string VISU.Prs3d_i::GetResultEntry ( ) [private]

References visu_cache.aResult.

VISU.Prs3d_i.Handle ( SALOME_InteractiveObject  ) [private]
void VISU.Prs3d_i::SetActiveState ( bool  theState) [private]
SALOMEDS::Study_var VISU.RemovableObject_i::GetStudyDocument ( ) const [inherited]

Reimplemented in VISU.Result_i.

SalomeApp_Study * VISU.RemovableObject_i::GetGUIStudy ( ) const [inherited]
std::string VISU.RemovableObject_i::GetEntry ( ) [virtual, inherited]

Reimplemented in VISU.Result_i.

std::string VISU.RemovableObject_i::GetName ( ) const [virtual, inherited]
void VISU.RemovableObject_i::SetName ( const std::string theName,
bool  theIsUpdateStudyAttr 
) [virtual, inherited]
void VISU.RemovableObject_i::SetStudyDocument ( SALOMEDS::Study_ptr  theStudy) [protected, inherited]

References VISU.GetGUIStudy().

std::string VISU.Storable::ToString ( ) [inherited]
void VISU.Storable::RegistryStorableEngine ( const std::string theComment,
TStorableEngine  theEngine 
) [static, inherited]
Storable * VISU.Storable::Create ( SALOMEDS::SObject_ptr  theSObject,
const std::string theLocalPersistentID,
const std::string thePrefix,
CORBA::Boolean  theIsMultiFile 
) [static, inherited]
VISU::VISUType VISU.Storable::Comment2Type ( const std::string theComment) [static, inherited]
VISU::VISUType VISU.Storable::RestoringMap2Type ( const TRestoringMap theRestoringMap) [static, inherited]
VISU::VISUType VISU.Storable::Stream2Type ( const std::string thePersistentString) [static, inherited]
VISU::VISUType VISU.Storable::SObject2Type ( const _PTR(SObject)&  theSObject) [static, inherited]

References VISU._PTR(), and VISU.TNONE.

std::string VISU.Storable::CorrectPersistentString ( const std::string thePersistentString) [static, inherited]
std::string VISU.Storable::FindEntry ( SALOMEDS::Study_ptr  theStudyDocument,
const std::string theStartEntry,
const TRestoringMap theRestoringMap,
int  IsAllLevels = true 
) [static, inherited]
QString VISU.Storable::FindValue ( const TRestoringMap theMap,
const std::string theArg,
bool *  theIsFind = NULL 
) [static, inherited]

References MESSAGE, and MYDEBUG.

QString VISU.Storable::FindValue ( const TRestoringMap theMap,
const std::string theArg,
const QString &  theDefaultValue 
) [static, inherited]
void VISU.Storable::StringToMap ( const QString &  theString,
TRestoringMap theMap 
) [static, inherited]
Storable::TRestoringMap VISU.Storable::GetStorableMap ( _PTR(SObject)  theSObject) [static, inherited]
static SALOMEDS::SObject_ptr VISU.Storable.GetResultSO ( SALOMEDS::SObject_ptr  theSObject) [static, inherited]
void VISU.Storable::DataToStream ( std::ostringstream &  theStr,
const QString &  theName,
const QString &  theVal 
) [static, inherited]
void VISU.Storable::DataToStream ( std::ostringstream &  theStr,
const QString &  theName,
int  theVal 
) [static, inherited]
void VISU.Storable::DataToStream ( std::ostringstream &  theStr,
const QString &  theName,
long  theVal 
) [static, inherited]
void VISU.Storable::DataToStream ( std::ostringstream &  theStr,
const QString &  theName,
double  theVal 
) [static, inherited]
CORBA::Boolean VISU.Storable::CanCopy ( SALOMEDS::SObject_ptr  theObject) [virtual, inherited]

Reimplemented in VISU.Result_i.

bool VISU.Storable::CopyFrom ( SALOMEDS::SObject_ptr  theObject,
CORBA::Long &  theObjectID,
const std::string theTmpDir,
TFileNames theFileNames 
) [virtual, inherited]

Reimplemented in VISU.Result_i.

References VISU_Example_06.aFileName.

char * VISU.Base_i::GetID ( ) [virtual, inherited]

Reimplemented in VISU.VISU_Gen_i, and VISU.VISU_Gen_i.

virtual VISU::VISUType VISU.Base_i.GetType ( ) [pure virtual, inherited]
static CORBA::ORB_var VISU.Base_i.GetORB ( ) [static, inherited]
static PortableServer::POA_var VISU.Base_i.GetPOA ( ) [static, inherited]
static SALOME_NamingService* VISU.Base_i.GetNS ( ) [static, inherited]

References visu.myNamingService.

static SALOME_LifeCycleCORBA* VISU.Base_i.GetLCC ( ) [static, inherited]
static VISU_Gen_i* VISU.Base_i.GetVisuGenImpl ( ) [static, inherited]

Friends And Related Function Documentation

friend class ColoredPrs3dCache_i [friend]

Field Documentation

vtkTimeStamp VISU.Prs3d_i.myUpdateTime [protected]
vtkTimeStamp VISU.Prs3d_i.myParamsTime [protected]
CORBA::Float VISU.Prs3d_i.myOffset[3] [private]
int VISU.Prs3d_i.myMarkerId [private]
boost::signal0<void> VISU.Prs3d_i.myUpdateActorsSignal [private]
boost::signal0<void> VISU.Prs3d_i.myRemoveActorsFromRendererSignal [private]
vtkSmartPointer<vtkActorCollection> VISU.Prs3d_i.myActorCollection [private]
vtkSmartPointer<VISU_PipeLine> VISU.Prs3d_i.myPipeLine [private]
std::string VISU.Base_i.myID [protected, inherited]
QMutex * VISU.Base_i::myMutex = NULL [static, protected, inherited]
CORBA::ORB_var VISU.Base_i::myOrb [static, protected, inherited]
PortableServer::POA_var VISU.Base_i::myPoa [static, protected, inherited]
SALOME_NamingService * VISU.Base_i::myNamingService [static, protected, inherited]
VISU_Gen_i * VISU.Base_i::myVisuGenImpl [static, protected, inherited]
SALOME_LifeCycleCORBA * VISU.Base_i::myEnginesLifeCycle [static, protected, inherited]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS