SHRINK
};
+ /*!
+ * This enumeration contains a set of elements defining the
+ * type of presentation of the 2D quadratic mesh elements.
+ */
+ enum Quadratic2DPresentationType{
+ LINES,
+ ARCS
+ };
+
/*! \brief Interface of the mesh.
*
* Manages presentation parameters of a 3D presentation of a mesh.
*/
PresentationType GetPresentationType();
+
+ /*!
+ * Sets the type of representation of a 2D quadratic mesh elements.
+ * \param theType The type of representation of 2D quadratic mesh elements.
+ * This parameter is taken from
+ * <VAR>Quadratic2DPresentationType</VAR> enumeration.
+ */
+ void SetQuadratic2DPresentationType(in Quadratic2DPresentationType theType);
+
+ /*!
+ * Gets the type of representation of the 2D quadratic mesh elements.
+ * \return The type of representation of the 2D quadratic mesh elements.
+ */
+ Quadratic2DPresentationType GetQuadratic2DPresentationType();
+
/*!
* Switches shrink mode of presentation
* Note: SetPresentationType(SHRINK) is same as SetShrink(True)
*/
string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
+
+ /*! Set representation type of 2D quadratic elements
+ * of the given presentation in this view.
+ * \param thePrs Object to set a representation type of 2D quadratic elements.
+ * \param theType Representation type of 2D quadratic elements to be set to the given object.
+ * \return Empty string in case of success, error description in case of failure.
+ */
+ string SetQuadratic2DPresentationType(in ScalarMap thePrs,in Quadratic2DPresentationType theType);
+
+
+ /*! Get representation type of the 2D quadratic mesh elements of given presentation in this view.
+ * \param thePrs Object to get a representation type of 2D quadratic mesh elements.
+ * \return <VAR>Quadratic2DPresentationType</VAR> Representation type of 2D quadratic mesh elements
+ * in this view.
+ */
+ Quadratic2DPresentationType GetQuadratic2DPresentationType(in ScalarMap thePrs);
+
+
/*! Get shrink state of the given presentation in this view.
* \param thePrs Object to get a shrink state of.
* \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
<parameter name="scalar_def_represent" value="2"/>
<parameter name="scalar_def_shrink" value="false"/>
<parameter name="floating_point_precision" value="6"/>
+ <parameter name="quadratic_mode" value="0" />
+ <parameter name="max_angle" value="2" />
<parameter name="represent_shading" value="false"/>
<parameter name="feature_edges_angle" value="30.0"/>
<parameter name="show_feature_edges" value="true"/>
return aDataSet;
}
+
+
+VISU_Actor::EQuadratic2DRepresentation
+VISU_Actor::GetQuadratic2DRepresentation() const
+{
+ if(Superclass::GetQuadraticArcMode()){
+ return VISU_Actor::eArcs;
+ }
+ else
+ return VISU_Actor::eLines;
+}
+
+void VISU_Actor::SetQuadratic2DRepresentation( EQuadratic2DRepresentation theMode )
+{
+
+}
vtkTextProperty*
GetsValLabelsProps() const;
+
+ enum EQuadratic2DRepresentation { eLines = 0, eArcs };
+
+ virtual
+ EQuadratic2DRepresentation GetQuadratic2DRepresentation() const;
+
+ virtual void
+ SetQuadratic2DRepresentation( EQuadratic2DRepresentation theMode );
+
protected:
VISU_Actor();
//
#include "VISU_MeshAct.h"
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+
#include <vtkObjectFactory.h>
#include <vtkRenderer.h>
#include <vtkTexture.h>
m->Delete();
SetRepresentation(SVTK::Representation::Surface);
+
+ SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+ //Quadratic 2D elements representation
+ if(aResourceMgr) {
+ //----------------------------------------------------------------------------
+ int aQuadraticAngle = aResourceMgr->integerValue( "VISU", "max_angle", 2);
+ mySurfaceActor->SetQuadraticArcAngle(aQuadraticAngle);
+ myEdgeActor->SetQuadraticArcAngle(aQuadraticAngle);
+ }
}
VISU_MeshAct
}
return 1;
}
+
+VISU_Actor::EQuadratic2DRepresentation
+VISU_MeshAct::GetQuadratic2DRepresentation() const
+{
+ bool mode = (mySurfaceActor->GetQuadraticArcMode() && myEdgeActor->GetQuadraticArcMode());
+ if(mode){
+ return VISU_Actor::eArcs;
+ }
+ else
+ return VISU_Actor::eLines;
+}
+
+void VISU_MeshAct::SetQuadratic2DRepresentation( EQuadratic2DRepresentation theMode )
+{
+ switch(theMode) {
+ case VISU_Actor::eArcs:
+ mySurfaceActor->SetQuadraticArcMode(true);
+ myEdgeActor->SetQuadraticArcMode(true);
+ break;
+ case VISU_Actor::eLines:
+ mySurfaceActor->SetQuadraticArcMode(false);
+ myEdgeActor->SetQuadraticArcMode(false);
+ break;
+ default:
+ break;
+ }
+}
int
RenderTranslucentGeometry(vtkViewport *ren);
+ virtual
+ EQuadratic2DRepresentation GetQuadratic2DRepresentation() const;
+
+ virtual void
+ SetQuadratic2DRepresentation( EQuadratic2DRepresentation theMode );
+
+
protected:
VISU_MeshAct();
~VISU_MeshAct();
#include "VISU_DeformedShapePL.hxx"
#include "VISU_PipeLineUtils.hxx"
+
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+
#include <SALOME_ExtractGeometry.h>
#include <SALOME_ExtractPolyDataGeometry.h>
myPointsActor->SetUserMatrix(aMatrix);
aMatrix->Delete();
+
+ SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+ //Quadratic 2D elements representation
+ if(aResourceMgr) {
+ //----------------------------------------------------------------------------
+ int aQuadraticAngle = aResourceMgr->integerValue( "VISU", "max_angle", 2);
+ mySurfaceActor->SetQuadraticArcAngle(aQuadraticAngle);
+ myEdgeActor->SetQuadraticArcAngle(aQuadraticAngle);
+ }
}
//----------------------------------------------------------------------------
}
//----------------------------------------------------------------------------
+
+VISU_Actor::EQuadratic2DRepresentation
+VISU_ScalarMapAct
+::GetQuadratic2DRepresentation() const
+{
+ bool mode = (mySurfaceActor->GetQuadraticArcMode() && myEdgeActor->GetQuadraticArcMode());
+ if(mode){
+ return VISU_Actor::eArcs;
+ }
+ else
+ return VISU_Actor::eLines;
+}
+
+void VISU_ScalarMapAct::SetQuadratic2DRepresentation( VISU_Actor::EQuadratic2DRepresentation theMode )
+{
+ switch(theMode) {
+ case VISU_Actor::eArcs:
+ mySurfaceActor->SetQuadraticArcMode(true);
+ myEdgeActor->SetQuadraticArcMode(true);
+ break;
+ case VISU_Actor::eLines:
+ mySurfaceActor->SetQuadraticArcMode(false);
+ myEdgeActor->SetQuadraticArcMode(false);
+ break;
+ default:
+ break;
+ }
+}
virtual
void
UnShrink();
+
+ virtual
+ EQuadratic2DRepresentation GetQuadratic2DRepresentation() const;
+
+ virtual void
+ SetQuadratic2DRepresentation( EQuadratic2DRepresentation theMode );
+
virtual
void
<source>VISU_TITLE</source>
<translation>Title</translation>
</message>
+ <message>
+ <source>QUADRATIC_REPRESENT_MODE</source>
+ <translation>Representation of the 2D quadratic elements</translation>
+ </message>
+ <message>
+ <source>MAX_ARC_ANGLE</source>
+ <translation>Maximum angle</translation>
+ </message>
<message>
<source>VISU_USE_SHADING</source>
<translation>Use Shading</translation>
<source>VISU_VALUES_LABELING_PARAMS</source>
<translation>Labeling parameters</translation>
</message>
+
+ <message>
+ <source>MEN_2D_QUADRATIC_MODE</source>
+ <translation>2D Quadratic</translation>
+ </message>
+ <message>
+ <source>MEN_VISU_ARCQUAD_MODE</source>
+ <translation>Arcs</translation>
+ </message>
+ <message>
+ <source>MEN_VISU_LINEQUAD_MODE</source>
+ <translation>Lines</translation>
+ </message>
<message><source>TOOL_IMPORT</source><translation>Import</translation></message>
<message><source>TOOL_REPRESENTATION</source><translation>Representation</translation></message>
<message><source>TOOL_SELECTION</source><translation>Selection</translation></message>
tr("VISU_VALUES_LABELING_PARAMS"), "", 0, aParent, false,
this, SLOT(OnValuesLabelingParams()));
+ createAction(VISU_ARCQUAD_MODE, tr("MEN_VISU_ARCQUAD_MODE"), QIcon(),
+ tr("MEN_VISU_ARCQUAD_MODE"), "",0, aParent, true,
+ this, SLOT(OnArcQuadMode()));
+
+ createAction(VISU_LINEQUAD_MODE, tr("MEN_VISU_LINEQUAD_MODE"),QIcon(),
+ tr("MEN_VISU_LINEQUAD_MODE"), "",0, aParent, true,
+ this, SLOT(OnLineQuadMode()));
+
}
void
createMenu( VISU_WIREFRAME, parentId, 10 ); // wireframe
createMenu( VISU_SURFACE, parentId, 10 ); // surface
createMenu( VISU_ERASE_ALL, aMenuId, 10 ); // erase all
+
+ parentId = createMenu( tr( "MEN_2D_QUADRATIC_MODE" ), aMenuId, 10 ); // 2D quadratic mode
+ createMenu( VISU_LINEQUAD_MODE, parentId, 10 ); // lines
+ createMenu( VISU_ARCQUAD_MODE, parentId, 10 ); // arcs
+
}
void
mgr->insert( action( VISU_SHADING ) , parentId, -1, -1 ); // shading
mgr->insert( action( VISU_NOSHADING ) , parentId, -1, -1 ); // noshading
+ //"2D Quadratic" submenu
+ parentId = mgr->insert( tr( "MEN_2D_QUADRATIC_MODE" ), -1, -1 );
+ mgr->insert( action( VISU_LINEQUAD_MODE ), parentId, -1, -1 ); // line representation
+ mgr->insert( action( VISU_ARCQUAD_MODE ), parentId, -1, -1 ); // arc representation
+
// "Properties" submenu
parentId = mgr->insert( tr( "MEN_PROPERTIES" ), -1, -1 );
mgr->insert( action( VISU_CELL_COLOR ), parentId, -1, -1 ); // cell color
mgr->setRule( action( VISU_VALUES_LABELING ), "{true} in $isValuesLabeled", QtxPopupMgr::ToggleRule );
mgr->setRule( action( VISU_VALUES_LABELING_PARAMS ), aRule, QtxPopupMgr::VisibleRule );
+ //2D quadratic
+ aRule = "isVisible and hasActor=1 and selcount=1 and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE' 'VISU::TDEFORMEDSHAPEANDSCALARMAP'}";
+ mgr->setRule (action(VISU_ARCQUAD_MODE), aRule , QtxPopupMgr::VisibleRule);
+ mgr->setRule (action(VISU_LINEQUAD_MODE),aRule , QtxPopupMgr::VisibleRule);
+
+ mgr->setRule (action(VISU_ARCQUAD_MODE), aRule + " and quadratic2DMode='VISU::ARCS'", QtxPopupMgr::ToggleRule);
+ mgr->setRule (action(VISU_LINEQUAD_MODE),aRule + " and quadratic2DMode='VISU::LINES'", QtxPopupMgr::ToggleRule);
+
+
// view parameters
aRule = "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'";
mgr->setRule( action( VISU_SAVE_VIEW_PARAMS_1 ), aRule );
setPreferenceProperty( point_precision, "step", 1 );
addPreference( "", representGr, LightApp_Preferences::Space );
+
+ int quadraticmode = addPreference( tr( "QUADRATIC_REPRESENT_MODE" ), representGr, LightApp_Preferences::Selector, "VISU", "quadratic_mode" );
+ QStringList quadraticModes;
+ quadraticModes.append("Lines");
+ quadraticModes.append("Arcs");
+ indices.clear();
+ indices.append( 0 );
+ indices.append( 1 );
+ setPreferenceProperty( quadraticmode, "strings", quadraticModes );
+ setPreferenceProperty( quadraticmode, "indexes", indices );
+
+ int maxAngle = addPreference( tr( "MAX_ARC_ANGLE" ), representGr, LightApp_Preferences::IntSpin,
+ "VISU", "max_angle" );
+ setPreferenceProperty( maxAngle, "min", 1 );
+ setPreferenceProperty( maxAngle, "max", 90 );
+
+
+
addPreference( tr( "VISU_USE_SHADING" ), representGr, LightApp_Preferences::Bool, "VISU", "represent_shading" );
sp = addPreference( "", representGr, LightApp_Preferences::Space );
setPreferenceProperty( sp, "hstretch", 0 );
return tfont;
}
+
+/*!
+ \brief SLOT called when "2D Quadratic -> Arcs" popup menu item
+ \ of presentation is cliked
+ */
+void VisuGUI::OnArcQuadMode(){
+ ChangeQuadratic2DRepresentation(this,VISU::ARCS);
+}
+
+/*!
+ \brief SLOT called when "2D Quadratic -> Lines" popup menu item
+ \ of presentation is cliked
+ */
+void VisuGUI::OnLineQuadMode(){
+ ChangeQuadratic2DRepresentation(this,VISU::LINES);
+}
+
void OnValuesLabeling();
void OnValuesLabelingParams();
+ void OnArcQuadMode();
+ void OnLineQuadMode();
+
// MULTIPR
void OnMultiprViewFullRes();
void OnMultiprViewMediumRes();
#define VISU_VALUES_LABELING 4302
#define VISU_VALUES_LABELING_PARAMS 4303
+#define VISU_ARCQUAD_MODE 4401
+#define VISU_LINEQUAD_MODE 4402
#endif
ip->setParameter( entry, param, vActor->getName() );
param = vtkParam + "RepresentationMode";
ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).toLatin1().data() );
+ param = vtkParam + "Quadratic2DRepresentation";
+ ip->setParameter( entry, param, QString::number( vActor->GetQuadratic2DRepresentation() ).toLatin1().data() );
param = vtkParam + "Opacity";
ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).toLatin1().data() );
vtkFloatingPointType r, g, b;
else if ( paramName == "RepresentationMode" )
vActor->SetRepresentation( val.toInt() );
+ else if (paramName == "Quadratic2DRepresentation")
+ vActor->SetQuadratic2DRepresentation(VISU_Actor::EQuadratic2DRepresentation(val.toInt()));
+
else if ( paramName == "Opacity" )
vActor->SetOpacity( val.toFloat() );
else if ( p == "isPlot2dViewer" ) val = QVariant( Plot2dViewerType( ind ) );
else if ( p == "isValuesLabeled" ) val = QVariant( isValuesLabeled( ind ) );
else if ( p == "isScalarBarVisible" ) val = QVariant( isScalarBarVisible( ind ) );
+ else if ( p == "quadratic2DMode" ) val = QVariant( quadratic2DMode(ind) );
}
return val;
{
return TPopupDispatcher<TIsScalarBarVisibleFunctor>()(myModule, entry(ind)) == "true";
}
+
+struct TGetQuadratic2DRepresentation: TViewFunctor
+{
+ QString virtual get (VISU::Prs3d_i* thePrs3d,
+ SVTK_ViewWindow* theViewWindow,
+ VISU_Actor* theActor)
+ {
+ if(theActor->GetQuadratic2DRepresentation() == VISU_Actor::eLines)
+ return "VISU::LINES";
+ else if (theActor->GetQuadratic2DRepresentation() == VISU_Actor::eArcs)
+ return "VISU::ARCS";
+
+ return QString();
+ }
+};
+
+
+QString VisuGUI_Selection::quadratic2DMode( const int ind) const
+{
+ return TPopupDispatcher<TGetQuadratic2DRepresentation>()(myModule, entry(ind));
+}
QString lowResolution( const int ) const;
QString resolutionState( const int ) const;
+ QString quadratic2DMode( const int ) const;
+
private:
bool findDisplayedCurves( const int, bool ) const;
bool hasCurves( const int ) const;
aViewWindow->Repaint();
}
+
+ void ChangeQuadratic2DRepresentation (const SalomeApp_Module* theModule,
+ VISU::Quadratic2DPresentationType theType)
+ {
+ TSelectionInfo aSelectionInfo = GetSelectedObjects(theModule);
+ if(aSelectionInfo.empty())
+ return;
+
+ TSelectionItem aSelectionItem = aSelectionInfo.front();
+
+ VISU::Prs3d_i* aPrs3d = GetPrs3dFromBase(aSelectionItem.myObjectInfo.myBase);
+
+ SVTK_ViewWindow* aViewWindow = GetActiveViewWindow<SVTK_ViewWindow>(theModule);
+
+ if(!aPrs3d || !aViewWindow)
+ return;
+
+ VISU_Actor *anActor = FindActor(aViewWindow, aPrs3d);
+ if(!anActor)
+ return;
+
+ if (VISU::Mesh_i* aMesh = dynamic_cast<VISU::Mesh_i*>(aPrs3d)) {
+ aMesh->SetQuadratic2DPresentationType(theType);
+ RecreateActor(theModule, aMesh);
+ } else {
+ switch(theType){
+ case VISU::LINES:
+ anActor->SetQuadratic2DRepresentation(VISU_Actor::eLines);
+ break;
+ case VISU::ARCS:
+ anActor->SetQuadratic2DRepresentation(VISU_Actor::eArcs);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
//------------------------------------------------------------
void
SetShading ( const SalomeApp_Module* theModule,
void ChangeRepresentation (const SalomeApp_Module* theModule,
VISU::PresentationType theType);
+
+ void ChangeQuadratic2DRepresentation (const SalomeApp_Module* theModule,
+ VISU::Quadratic2DPresentationType theType);
+
+
+
void SetShading ( const SalomeApp_Module* theModule, bool theOn = true );
// SObject type
theStr<<thePrefix<<aName<<".SetShrink("<<(aServant->IsShrank()? "True" : "False")<<")"<<endl;
theStr<<thePrefix<<endl;
+ std::string aQuad2DPresent;
+ switch(aServant->GetQuadratic2DPresentationType()){
+ case LINES:
+ aQuad2DPresent = "VISU.LINES";
+ break;
+ case ARCS:
+ aQuad2DPresent = "VISU.ARCS";
+ break;
+ }
+
+ theStr<<thePrefix<<aName<<".SetQuadratic2DPresentationType("<<aQuad2DPresent<<")"<<endl;
+
DumpChildrenToPython(theStudy,
theIsPublished,
theIsValidScript,
myCellColor.R = 0.0; myCellColor.G = myCellColor.B = 1.0;
myNodeColor.R = myNodeColor.G = 1.0; myNodeColor.B = 1.0;
myLinkColor.R = myLinkColor.G = myLinkColor.B = 83/255.;
+
+ my2DQuadPrsType = VISU::Quadratic2DPresentationType(VISU::GetResourceMgr()->integerValue( "VISU", "quadratic_mode", 0));
}
if(myEntity >= 0)
}
+void
+VISU::Mesh_i
+::SetQuadratic2DPresentationType(VISU::Quadratic2DPresentationType theType)
+{
+ if(my2DQuadPrsType == theType)
+ return;
+
+ VISU::TSetModified aModified(this);
+ my2DQuadPrsType = theType;
+ myParamsTime.Modified();
+}
+
+
//----------------------------------------------------------------------------
VISU::PresentationType
VISU::Mesh_i
}
+//----------------------------------------------------------------------------
+VISU::Quadratic2DPresentationType
+VISU::Mesh_i
+::GetQuadratic2DPresentationType()
+{
+ return my2DQuadPrsType;
+}
+
+
+
+
//----------------------------------------------------------------------------
VISU::Entity
VISU::Mesh_i
myPresentType = VISU::PresentationType(VISU::Storable::FindValue(theMap,"myPresentType").toInt());
+ my2DQuadPrsType = VISU::Quadratic2DPresentationType(VISU::Storable::FindValue(theMap,"my2DQuadPrsType").toInt());
+
myIsShrank = (VISU::Storable::FindValue(theMap,"myIsShrank", "0").toInt() == 1)? true: false;
myCellColor.R = VISU::Storable::FindValue(theMap,"myCellColor.R").toDouble();
Storable::DataToStream( theStr, "myPresentType", int(myPresentType) );
+ Storable::DataToStream( theStr, "my2DQuadPrsType", int(my2DQuadPrsType) );
+
Storable::DataToStream( theStr, "myIsShrank", (myIsShrank? "1":"0"));
Storable::DataToStream( theStr, "myCellColor.R", myCellColor.R );
else
anActor->UnShrink();
}
+ if(my2DQuadPrsType == VISU::LINES)
+ anActor->SetQuadratic2DRepresentation(VISU_Actor::eLines);
+ else{
+ anActor->SetQuadratic2DRepresentation(VISU_Actor::eArcs);
+ }
anActor->GetSurfaceProperty()->SetColor(myCellColor.R, myCellColor.G, myCellColor.B);
anActor->GetEdgeProperty()->SetColor(myLinkColor.R, myLinkColor.G, myLinkColor.B);
anActor->GetNodeProperty()->SetColor(myNodeColor.R, myNodeColor.G, myNodeColor.B);
void
SetPresentationType(VISU::PresentationType theType);
+ virtual
+ void
+ SetQuadratic2DPresentationType(VISU::Quadratic2DPresentationType theType);
+
+ virtual
+ VISU::Quadratic2DPresentationType
+ GetQuadratic2DPresentationType();
+
virtual
VISU::PresentationType
GetPresentationType();
std::string mySubMeshName;
VISU::VISUType myType;
- VISU::PresentationType myPresentType;
+ VISU::PresentationType myPresentType;
+ VISU::Quadratic2DPresentationType my2DQuadPrsType;
SALOMEDS::Color myCellColor;
SALOMEDS::Color myNodeColor;
SALOMEDS::Color myLinkColor;
aResourceMgr->booleanValue("VISU", "show_non_manifold_edges", false) );
anActor->SetFeatureEdgesColoring( aResourceMgr->booleanValue("VISU", "feature_edges_coloring", false) );
+ anActor->SetQuadratic2DRepresentation(VISU_Actor::EQuadratic2DRepresentation(aResourceMgr->integerValue( "VISU",
+ "quadratic_mode",
+ 0)));
+
UpdateActor(anActor);
}catch(...){
anActor->Delete();
}
};
+ class TSetQuadratic2DPresentationTypeEvent: public TPrsManageEvent {
+ private:
+ Quadratic2DPresentationType myPrsType;
+ public:
+ typedef string TResult;
+ TResult myResult;
+ TSetQuadratic2DPresentationTypeEvent(View3D_i* theView3D,
+ ScalarMap_ptr thePrs,
+ Quadratic2DPresentationType theType):
+ TPrsManageEvent(theView3D, thePrs), myPrsType(theType),
+ myResult("Unknown error occured")
+ {}
+ virtual void Execute()
+ {
+ VISU::VISUType aType = myPrs->GetType();
+ if (aType != VISU::TSCALARMAP &&
+ aType != VISU::TDEFORMEDSHAPE &&
+ aType != VISU::TSCALARMAPONDEFORMEDSHAPE &&
+ aType != VISU::TDEFORMEDSHAPEANDSCALARMAP) {
+ myResult = "2D Quadratic element representation is not available for this type of presentations.";
+ return;
+ }
+ if (VISU_Actor* anActor = GetMyActor()) {
+ if(myPrsType == VISU::LINES)
+ anActor->SetQuadratic2DRepresentation(VISU_Actor::eLines);
+ else if(myPrsType == VISU::ARCS)
+ anActor->SetQuadratic2DRepresentation(VISU_Actor::eArcs);
+
+ SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(myView3D->GetViewWindow());
+ vw->Repaint();
+ myResult = "";
+ } else {
+ myResult = myError;
+ }
+ }
+ };
+
+ class TGetQuadratic2DPresentationTypeEvent: public TPrsManageEvent {
+ public:
+ typedef VISU::Quadratic2DPresentationType TResult;
+ TResult myResult;
+ TGetQuadratic2DPresentationTypeEvent(View3D_i* theView3D, ScalarMap_ptr thePrs):
+ TPrsManageEvent(theView3D, thePrs), myResult(VISU::LINES) {}
+ virtual void Execute() {
+ if (VISU_Actor* anActor = GetMyActor()) {
+ if(anActor->GetQuadratic2DRepresentation() == VISU_Actor::eLines)
+ myResult = VISU::LINES;
+ else if(anActor->GetQuadratic2DRepresentation() == VISU_Actor::eArcs)
+ myResult = VISU::ARCS;
+ }
+ }
+ };
+
PresentationType View3D_i::GetPresentationType(ScalarMap_ptr thePrs)
{
return ProcessEvent(new TGetPrsTypeEvent(this,thePrs));
return ProcessEvent(new TGetLineWidthEvent(this,thePrs));
}
+ Quadratic2DPresentationType View3D_i::GetQuadratic2DPresentationType(ScalarMap_ptr thePrs)
+ {
+ return ProcessEvent(new TGetQuadratic2DPresentationTypeEvent(this,thePrs));
+ }
+
char* View3D_i::SetPresentationType(ScalarMap_ptr thePrs, PresentationType thePrsType)
{
string aRet = ProcessEvent(new TSetPrsTypeEvent(this,thePrs,thePrsType));
string aRet = ProcessEvent(new TSetLineWidthEvent(this,thePrs,theLineWidth));
return CORBA::string_dup(aRet.c_str());
}
+
+ char* View3D_i::SetQuadratic2DPresentationType(ScalarMap_ptr thePrs, Quadratic2DPresentationType theType)
+ {
+ string aRet = ProcessEvent(new TSetQuadratic2DPresentationTypeEvent(this,thePrs,theType));
+ return CORBA::string_dup(aRet.c_str());
+ }
}
+
+
virtual CORBA::Boolean IsShaded (ScalarMap_ptr thePrs);
virtual CORBA::Double GetOpacity (ScalarMap_ptr thePrs);
virtual CORBA::Double GetLineWidth (ScalarMap_ptr thePrs);
+ virtual Quadratic2DPresentationType GetQuadratic2DPresentationType(ScalarMap_ptr thePrs);
virtual char* SetPresentationType(ScalarMap_ptr thePrs, PresentationType thePrsType);
virtual char* SetShrinked (ScalarMap_ptr thePrs, CORBA::Boolean isShrinked);
virtual char* SetShaded (ScalarMap_ptr thePrs, CORBA::Boolean isShaded);
virtual char* SetOpacity (ScalarMap_ptr thePrs, CORBA::Double theOpacity);
virtual char* SetLineWidth (ScalarMap_ptr thePrs, CORBA::Double theLineWidth);
+ virtual char* SetQuadratic2DPresentationType(ScalarMap_ptr thePrs, Quadratic2DPresentationType theType);
protected:
static int myNbViewParams;