5 #include <vtkPlaneSource.h> 6 #include <vtkPolyDataMapper.h> 7 #include <vtkProperty.h> 21 Plane::Plane(
SGNode* pParentNode,
double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double n1,
double n2,
double n3 )
28 m_pSource->SetCenter( 1.0, 0.0, 0.0 );
29 m_pSource->SetNormal( 1.0, 0.0, 1.0 );
40 m_pSource = vtkSmartPointer< vtkPlaneSource >::New();
42 m_pMapper = vtkSmartPointer< vtkPolyDataMapper >::New();
43 m_pMapper->SetInputData( m_pSource->GetOutput() );
45 m_pActor = vtkSmartPointer< vtkActor >::New();
46 m_pActor->SetMapper( m_pMapper );
59 m_pActor->GetProperty()->SetColor( r, g, b );
65 m_pActor->GetProperty()->GetColor( r, g, b );
70 return m_pActor->GetProperty()->GetOpacity();
76 m_pActor->GetProperty()->SetOpacity( a );
82 return m_pActor->GetVisibility() > 0 ?
true :
false;
91 m_pActor->VisibilityOn();
93 m_pActor->VisibilityOff();
void AddActor(vtkSmartPointer< vtkActor > pActor)
Add a VTK actor to the node.
void SetColor(const double r, const double g, const double b)
Color setter.
void RemoveActor(vtkSmartPointer< vtkActor > pActor)
Remove a VTK actor from the assembly of the node.
void SetVisible(bool bVisible)
Visibility setter.
Plane(SGNode *pParentNode=NULL)
void SetAlpha(const double a)
Alpha setter.
void GetColor(double &r, double &g, double &b)
Color getter.
virtual void SetVisible(bool bVisible)
Set visibility.
double GetAlpha() const
Alpha getter.
Base class for scene graph nodes.
bool IsVisible() const
Visibility getter.
#define DAFFVIZ_UNLOCK_VTK