Version: 6.3.1
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Private Member Functions | Private Attributes

SMESH.OrientedPlane Class Reference

#include <SMESHGUI_ClippingDlg.h>

Inheritance diagram for SMESH.OrientedPlane:
Inheritance graph
[legend]

Public Member Functions

 vtkTypeMacro (OrientedPlane, vtkPlane)
void SetOrientation (SMESH::Orientation theOrientation)
SMESH::Orientation GetOrientation ()
void SetDistance (float theDistance)
float GetDistance ()
void ShallowCopy (OrientedPlane *theOrientedPlane)

Static Public Member Functions

static OrientedPlaneNew ()
static OrientedPlaneNew (SVTK_ViewWindow *theViewWindow)

Data Fields

SMESH::Orientation myOrientation
float myDistance
double myAngle [2]
vtkPlaneSource * myPlaneSource
SALOME_ActormyActor

Protected Member Functions

 OrientedPlane (SVTK_ViewWindow *theViewWindow)
 OrientedPlane ()
void Init ()
 ~OrientedPlane ()

Private Member Functions

 OrientedPlane (const OrientedPlane &)
void operator= (const OrientedPlane &)

Private Attributes

QPointer< SVTK_ViewWindow > myViewWindow
vtkDataSetMapper * myMapper

Detailed Description

Definition at line 67 of file SMESHGUI_ClippingDlg.h.


Constructor & Destructor Documentation

SMESH.OrientedPlane::OrientedPlane ( SVTK_ViewWindow *  theViewWindow) [protected]

Definition at line 110 of file SMESHGUI_ClippingDlg.cxx.

References SMESH.OrientedPlane.Init(), SMESH.OrientedPlane.myActor, and SMESH.OrientedPlane.myViewWindow.

                                                               :
  myViewWindow(theViewWindow),
  myOrientation(SMESH::XY),
  myDistance(0.5)
{
  Init();
  myViewWindow->AddActor(myActor, false, false); // don't adjust actors
}
SMESH.OrientedPlane::OrientedPlane ( ) [protected]

Definition at line 119 of file SMESHGUI_ClippingDlg.cxx.

References SMESH.OrientedPlane.Init().

Referenced by SMESH.OrientedPlane.New().

SMESH.OrientedPlane::~OrientedPlane ( ) [protected]

Definition at line 159 of file SMESHGUI_ClippingDlg.cxx.

{
  if (myViewWindow)
    myViewWindow->RemoveActor(myActor);
  myActor->Delete();
    
  myMapper->RemoveAllInputs();
  myMapper->Delete();

  // commented: porting to vtk 5.0
  //    myPlaneSource->UnRegisterAllOutputs();
  myPlaneSource->Delete();
}
SMESH.OrientedPlane.OrientedPlane ( const OrientedPlane ) [private]

Member Function Documentation

float SMESH.OrientedPlane.GetDistance ( )
SMESH::Orientation SMESH.OrientedPlane.GetOrientation ( )
void SMESH.OrientedPlane::Init ( ) [protected]

Definition at line 127 of file SMESHGUI_ClippingDlg.cxx.

References SMESH.GetColor().

Referenced by SMESH.OrientedPlane.OrientedPlane().

{
  myPlaneSource = vtkPlaneSource::New();

  myAngle[0] = myAngle[1] = 0.0;

  // Create and display actor
  myMapper = vtkDataSetMapper::New();
  myMapper->SetInput(myPlaneSource->GetOutput());

  myActor = SALOME_Actor::New();
  myActor->VisibilityOff();
  myActor->PickableOff();
  myActor->SetInfinitive(true);
  myActor->SetMapper(myMapper);

  vtkFloatingPointType anRGB[3];
  vtkProperty* aProp = vtkProperty::New();
  SMESH::GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
  aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
  aProp->SetOpacity(0.75);
  myActor->SetProperty(aProp);
  aProp->Delete();

  vtkProperty* aBackProp = vtkProperty::New();
  SMESH::GetColor( "SMESH", "backface_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 0, 255 ) );
  aBackProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
  aBackProp->SetOpacity(0.75);
  myActor->SetBackfaceProperty(aBackProp);
  aBackProp->Delete();
}
SMESH::OrientedPlane * SMESH.OrientedPlane::New ( ) [static]
SMESH::OrientedPlane * SMESH.OrientedPlane::New ( SVTK_ViewWindow *  theViewWindow) [static]

Definition at line 88 of file SMESHGUI_ClippingDlg.cxx.

{
  return new OrientedPlane(theViewWindow);
}
void SMESH.OrientedPlane.operator= ( const OrientedPlane ) [private]
void SMESH.OrientedPlane.SetDistance ( float  theDistance)
void SMESH.OrientedPlane.SetOrientation ( SMESH::Orientation  theOrientation)
void SMESH.OrientedPlane::ShallowCopy ( SMESH::OrientedPlane theOrientedPlane)

Definition at line 93 of file SMESHGUI_ClippingDlg.cxx.

References SMESH.OrientedPlane.GetDistance(), SMESH.OrientedPlane.GetOrientation(), SMESH.OrientedPlane.myAngle, and SMESH.OrientedPlane.myPlaneSource.

Referenced by SMESHGUI_ClippingDlg.ClickOnApply().

{
  SetNormal(theOrientedPlane->GetNormal());
  SetOrigin(theOrientedPlane->GetOrigin());

  myOrientation = theOrientedPlane->GetOrientation();
  myDistance = theOrientedPlane->GetDistance();

  myAngle[0] = theOrientedPlane->myAngle[0];
  myAngle[1] = theOrientedPlane->myAngle[1];

  myPlaneSource->SetNormal(theOrientedPlane->myPlaneSource->GetNormal());
  myPlaneSource->SetOrigin(theOrientedPlane->myPlaneSource->GetOrigin());
  myPlaneSource->SetPoint1(theOrientedPlane->myPlaneSource->GetPoint1());
  myPlaneSource->SetPoint2(theOrientedPlane->myPlaneSource->GetPoint2());
}
SMESH.OrientedPlane.vtkTypeMacro ( OrientedPlane  ,
vtkPlane   
)

Field Documentation

vtkDataSetMapper* SMESH.OrientedPlane.myMapper [private]

Definition at line 70 of file SMESHGUI_ClippingDlg.h.

QPointer<SVTK_ViewWindow> SMESH.OrientedPlane.myViewWindow [private]

Definition at line 69 of file SMESHGUI_ClippingDlg.h.

Referenced by SMESH.OrientedPlane.OrientedPlane().

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