Commit 189fd30f authored by Sebastien Barre's avatar Sebastien Barre
Browse files

ENH: remove deprecated methods (thanks to Mathieuuuuu for pointing some of them)

parent 2f710b0a
......@@ -21,10 +21,10 @@ static char THIS_FILE[] = __FILE__;
IMPLEMENT_DYNCREATE(CSampleView, vtkMFCRenderView)
BEGIN_MESSAGE_MAP(CSampleView, vtkMFCRenderView)
//{{AFX_MSG_MAP(CSampleView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
//{{AFX_MSG_MAP(CSampleView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
......@@ -32,7 +32,7 @@ END_MESSAGE_MAP()
CSampleView::CSampleView()
{
// TODO: add construction code here
// TODO: add construction code here
}
......@@ -47,18 +47,18 @@ CSampleView::~CSampleView()
#ifdef _DEBUG
void CSampleView::AssertValid() const
{
CView::AssertValid();
CView::AssertValid();
}
void CSampleView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
CView::Dump(dc);
}
CSampleDoc* CSampleView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSampleDoc)));
return (CSampleDoc*)m_pDocument;
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSampleDoc)));
return (CSampleDoc*)m_pDocument;
}
#endif //_DEBUG
......@@ -67,19 +67,19 @@ CSampleDoc* CSampleView::GetDocument() // non-debug version is inline
void CSampleView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
// TODO: Add your specialized code here and/or call the base class
// TODO: Add your specialized code here and/or call the base class
vtkPropCollection *propc;
vtkProp *prop;
// TODO: Add your specialized code here and/or call the base class
// first remove any old actors
this->Renderer->GetProps()->RemoveAllItems();
propc = this->GetDocument()->GetProps();
this->Renderer->GetViewProps()->RemoveAllItems();
propc = this->GetDocument()->GetViewProps();
propc->InitTraversal();
while (prop = propc->GetNextProp())
{
this->Renderer->AddProp(prop);
this->Renderer->AddViewProp(prop);
this->Renderer->ResetCamera();
}
this->vtkMFCRenderView::OnUpdate(pSender, lHint, pHint);
this->vtkMFCRenderView::OnUpdate(pSender, lHint, pHint);
}
......@@ -40,7 +40,7 @@ public:
// Operations
public:
vtkPropCollection *GetProps() {return this->Props;};
vtkPropCollection *GetViewProps() {return this->Props;};
// Overrides
// ClassWizard generated virtual function overrides
......
......@@ -61,7 +61,7 @@ __fastcall TvtkBorlandRenderWindow::~TvtkBorlandRenderWindow()
}
if ( FRenderer )
{
FRenderer->GetProps()->RemoveAllItems();
FRenderer->GetViewProps()->RemoveAllItems();
FRenderWindow->RemoveRenderer(FRenderer);
FRenderer->Delete();
FRenderer = 0;
......
......@@ -52,7 +52,7 @@ void __fastcall TVTK_Form::FormDestroy(TObject *Sender)
vtkRenderer* ren1 = vtkWindow1->GetRenderer();
vtkRenderWindow* renwin1 = vtkWindow1->GetRenderWindow();
vtkPropCollection* collection = ren1->GetProps();
vtkPropCollection* collection = ren1->GetViewProps();
if(collection)
{
collection->InitTraversal();
......@@ -62,7 +62,7 @@ void __fastcall TVTK_Form::FormDestroy(TObject *Sender)
if(actor)
{
actor->ReleaseGraphicsResources(renwin1);
ren1->RemoveProp(actor);
ren1->RemoveViewProp(actor);
}
}
}
......
......@@ -168,7 +168,7 @@ renWin AddRenderer ren1
#
# Add the LODProp3D to the renderer and set the background
#
ren1 AddProp lod
ren1 AddViewProp lod
ren1 SetBackground 0.1 0.2 0.4
#
......
......@@ -87,7 +87,7 @@ $culler SetSortingStyleToBackToFront
set valid [volumeMapper_0_0 IsRenderSupported volumeProperty]
if {!$valid} {
ren1 RemoveAllProps
ren1 RemoveAllViewProps
vtkTextActor t
t SetInput "Required Extensions Not Supported"
t SetDisplayPosition 300 150
......
......@@ -127,7 +127,7 @@ set valid [volumeMapper IsRenderSupported volumeProperty]
ren1 AddViewProp volume
if {!$valid} {
ren1 RemoveAllProps
ren1 RemoveAllViewProps
vtkTextActor t
t SetInput "Required Extensions Not Supported"
t SetDisplayPosition 128 128
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment