PointView Class Reference

#include <PointView.h>

Collaboration diagram for PointView:
Collaboration graph
[legend]

List of all members.

Public Types

enum  PointTypes { BLUE = 0, MAGENTA, GREEN, YELLOW }

Public Member Functions

 PointView ()
 ~PointView ()
void DeletePoints ()
void SetWxVtkBaseView (wxVtkBaseView *wxvtkbaseview)
void Refresh ()
void CreateNewPoint (double x, double y, int type)

Private Member Functions

void DeleteVtkObjects ()

Private Attributes

wxVtkBaseView_wxvtkbaseview
std::vector< vtkPolyDataMapper * > point_mapped
std::vector< vtkActor * > point_actor

Detailed Description

Definition at line 14 of file PointView.h.


Member Enumeration Documentation

Enumerator:
BLUE 
MAGENTA 
GREEN 
YELLOW 

Definition at line 25 of file PointView.h.

00026         {
00027                 BLUE = 0,           
00028                 MAGENTA,              
00029                 GREEN,       
00030                 YELLOW          
00031         };


Constructor & Destructor Documentation

PointView::PointView (  ) 

Definition at line 8 of file PointView.cxx.

References _wxvtkbaseview.

00009 {
00010         _wxvtkbaseview = NULL;
00011 }

PointView::~PointView (  ) 

Definition at line 14 of file PointView.cxx.

References DeletePoints().

00015 {
00016         DeletePoints();
00017 }

Here is the call graph for this function:


Member Function Documentation

void PointView::CreateNewPoint ( double  x,
double  y,
int  type 
)

Definition at line 40 of file PointView.cxx.

References _wxvtkbaseview, BLUE, wxVtkBaseView::GetRenderer(), wxVtkBaseView::GetRenWin(), GREEN, MAGENTA, point_actor, point_mapped, and YELLOW.

Referenced by wxQuantificationWidgetCT::RefreshAxis().

00041 {
00042         vtkSphereSource* aSphere =vtkSphereSource::New();
00043         aSphere->SetRadius(1);
00044         aSphere->SetCenter(x,y,0);
00045         
00046         point_mapped.push_back(vtkPolyDataMapper::New());
00047 //      point_mapped.back()->ImmediateModeRenderingOn();
00048         //point_mapped.back()->ScalarVisibilityOff( );
00049         point_mapped.back()->SetInput(aSphere->GetOutput());
00050 
00051         point_actor.push_back(vtkActor::New());
00052         point_actor.back()->SetMapper(point_mapped.back());
00053 //      point_actor.back()->GetProperty()->BackfaceCullingOff();
00054 
00055         switch (type)
00056         {
00057         case PointView::BLUE :          point_actor.back()->GetProperty()->SetColor(0, 0, 1);
00058                                                                 break;
00059         case PointView::MAGENTA :       point_actor.back()->GetProperty()->SetColor(1, 0, 1);
00060                                                                 break;
00061         case PointView::GREEN :         point_actor.back()->GetProperty()->SetColor(0, 1, 0);
00062                                                                 break;
00063         case PointView::YELLOW :        point_actor.back()->GetProperty()->SetColor(0, 1, 1);
00064                                                                 break;
00065         default:                                        point_actor.back()->GetProperty()->SetColor(0, 0, 1);
00066 
00067         }
00068 
00069         //point_actor.back()->GetProperty()->SetColor(0, 1, 0);
00070         
00071         point_actor.back()->ApplyProperties();
00072 
00073         _wxvtkbaseview->GetRenderer()->AddActor(point_actor.back());
00074         _wxvtkbaseview->GetRenWin()->Render();
00075 }

Here is the call graph for this function:

Here is the caller graph for this function:

void PointView::DeletePoints (  ) 

Definition at line 20 of file PointView.cxx.

References DeleteVtkObjects(), point_actor, and point_mapped.

Referenced by wxQuantificationWidgetCT::RefreshAxis(), and ~PointView().

00021 {
00022         DeleteVtkObjects();
00023         point_mapped.clear();
00024         point_actor.clear();
00025 }

Here is the call graph for this function:

Here is the caller graph for this function:

void PointView::DeleteVtkObjects (  )  [private]

Definition at line 78 of file PointView.cxx.

References _wxvtkbaseview, wxVtkBaseView::GetRenderer(), point_actor, and point_mapped.

Referenced by DeletePoints().

00079 {
00080         int i,size=point_mapped.size();
00081         for (i=0;i<size; i++){
00082                 if ( point_mapped[i]    != NULL )       { 
00083                         point_mapped[i]  -> Delete(); 
00084                 }
00085                 if ( point_actor[i]     != NULL )       { 
00086                         _wxvtkbaseview->GetRenderer()->RemoveActor(point_actor[i]);
00087                         point_actor[i]  -> Delete(); 
00088                 }
00089                 point_actor[i] = NULL;
00090                 point_mapped[i] = NULL;
00091         }
00092 }

Here is the call graph for this function:

Here is the caller graph for this function:

void PointView::Refresh (  ) 

Definition at line 34 of file PointView.cxx.

References _wxvtkbaseview, and wxVtkBaseView::GetRenWin().

00035 {
00036         _wxvtkbaseview->GetRenWin()->Render();
00037 }

Here is the call graph for this function:

void PointView::SetWxVtkBaseView ( wxVtkBaseView wxvtkbaseview  ) 

Definition at line 28 of file PointView.cxx.

References _wxvtkbaseview.

Referenced by wxQuantificationWidgetCT::ConfigureVTK().

00029 {
00030         _wxvtkbaseview = wxvtkbaseview;
00031 }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 34 of file PointView.h.

Referenced by CreateNewPoint(), DeleteVtkObjects(), PointView(), Refresh(), and SetWxVtkBaseView().

std::vector<vtkActor*> PointView::point_actor [private]

Definition at line 37 of file PointView.h.

Referenced by CreateNewPoint(), DeletePoints(), and DeleteVtkObjects().

std::vector<vtkPolyDataMapper*> PointView::point_mapped [private]

Definition at line 36 of file PointView.h.

Referenced by CreateNewPoint(), DeletePoints(), and DeleteVtkObjects().


The documentation for this class was generated from the following files:

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1