ALBA
albaSceneNode.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaSceneNode
5 Authors: Silvano Imboden, Gianluigi Crimi
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaSceneNode_H__
17#define __albaSceneNode_H__
18//----------------------------------------------------------------------------
19// forward declarations:
20//----------------------------------------------------------------------------
21class albaVME;
22class vtkALBAAssembly;
23class albaPipe;
24class vtkRenderer;
25class albaSceneGraph;
26
27//----------------------------------------------------------------------------
28// albaSceneNode :
29//----------------------------------------------------------------------------
31class ALBA_EXPORT albaSceneNode
32{
33public:
34 albaSceneNode(albaSceneGraph *sg, albaSceneNode *parent, albaVME *vme, vtkRenderer *renderFront, vtkRenderer *renderBack=NULL, vtkRenderer *alwaysVisibleRender = NULL);
35 virtual ~albaSceneNode ();
36
38 void Select(bool select);
39
41 void UpdateProperty(bool fromTag = false);
42
44 bool IsVisible() {return m_Pipe != NULL;};
45
47 virtual void Print(std::ostream& os, const int tabs=0);// const;
48
50 albaVME * GetVme() const { return m_Vme; }
51
53 albaPipe * GetPipe() const;
54
56 void SetPipe(albaPipe * pipe);
57
59 void DeletePipe();
60
62 vtkRenderer * GetRenFront() const { return m_RenFront; }
63
65 bool GetMutex() const { return m_Mutex; }
66
68 void SetMutex(bool mutex) { m_Mutex = mutex; }
69
71 vtkALBAAssembly * GetAssemblyFront() const { return m_AssemblyFront; }
72
74 vtkRenderer * GetRenBack() const { return m_RenBack; }
75
77 vtkALBAAssembly * GetAssemblyBack() const { return m_AssemblyBack; }
78
80 vtkRenderer * GetAlwaysVisibleRenderer() const { return m_AlwaysVisibleRenderer; }
81
83 vtkALBAAssembly * GetAlwaysVisibleAssembly() const { return m_AlwaysVisibleAssembly; }
84
86 albaSceneNode * GetNext() const { return m_Next; }
87
89 void SetNext(albaSceneNode * next) { m_Next = next; }
90
92 albaSceneGraph * GetSceneGraph() const { return m_Sg; }
93
95 bool GetPipeCreatable() const { return m_PipeCreatable; }
96
98 void SetPipeCreatable(bool pipeCreatable) { m_PipeCreatable = pipeCreatable; }
99
101 void SetRenFront(vtkRenderer * renFront) { m_RenFront = renFront; }
102
103protected:
104
106 void ChildShow();
107
109 void ChildHide();
110
113
116
119 vtkRenderer *m_RenFront;
123
125 vtkRenderer *m_RenBack;
130
134};
135
136
137#endif // __albaSceneNode_H__
albaSceneNode is a node of albaScenegraph.
Definition: albaSceneNode.h:32
virtual ~albaSceneNode()
void SetRenFront(vtkRenderer *renFront)
Sets RenFront.
void UpdateVisibility()
callen onhow/hide childShow/childHide to update local visibility and forward up the changes
void SetPipe(albaPipe *pipe)
Sets Pipe.
vtkRenderer * GetAlwaysVisibleRenderer() const
Returns AlwaysVisibleRenderer.
Definition: albaSceneNode.h:80
bool GetPipeCreatable() const
Returns PipeCreatable.
Definition: albaSceneNode.h:95
void ModifyRootAssembly()
Called on changes when a node is show/hided to notify assemby to recreate internal structures.
void Select(bool select)
Call Select method for the vme's pipe.
bool m_CurrentVisibility
vtkALBAAssembly * m_AlwaysVisibleAssembly
vtkRenderer * m_RenFront
vtkALBAAssembly * GetAlwaysVisibleAssembly() const
Returns AlwaysVisibleAssembly.
Definition: albaSceneNode.h:83
vtkRenderer * GetRenBack() const
Returns RenBack.
Definition: albaSceneNode.h:74
void ChildShow()
Called from child on show, if the visibility is updated ChildShow is called on parent.
vtkALBAAssembly * m_AssemblyFront
void SetMutex(bool mutex)
Sets Mutex.
Definition: albaSceneNode.h:68
albaVME * GetVme() const
Returns Vme.
Definition: albaSceneNode.h:50
albaPipe * GetPipe() const
Returns Pipe.
virtual void Print(std::ostream &os, const int tabs=0)
print a dump of this object
void SetPipeCreatable(bool pipeCreatable)
Sets PipeCreatable.
Definition: albaSceneNode.h:98
albaSceneGraph * m_Sg
albaVME * m_Vme
albaSceneNode * m_Next
vtkALBAAssembly * m_AssemblyBack
void SetNext(albaSceneNode *next)
Sets Next.
Definition: albaSceneNode.h:89
vtkALBAAssembly * GetAssemblyBack() const
Returns AssemblyBack.
Definition: albaSceneNode.h:77
vtkRenderer * m_RenBack
void DeletePipe()
Deletes current Pipe.
albaPipe * m_Pipe
albaSceneNode * m_Parent
vtkRenderer * GetRenFront() const
Returns RenFront.
Definition: albaSceneNode.h:62
bool GetMutex() const
Returns Mutex.
Definition: albaSceneNode.h:65
albaSceneGraph * GetSceneGraph() const
Returns Sg.
Definition: albaSceneNode.h:92
vtkRenderer * m_AlwaysVisibleRenderer
albaSceneNode * GetNext() const
Returns Next.
Definition: albaSceneNode.h:86
bool IsVisible()
Return the vme's visibility.
Definition: albaSceneNode.h:44
void UpdateProperty(bool fromTag=false)
Call UpdateProperty method for the vme's pipe.
albaSceneNode(albaSceneGraph *sg, albaSceneNode *parent, albaVME *vme, vtkRenderer *renderFront, vtkRenderer *renderBack=NULL, vtkRenderer *alwaysVisibleRender=NULL)
void ChildHide()
Called from child on hide, if the visibility is updated ChildHide is called on parent.
vtkALBAAssembly * GetAssemblyFront() const
Returns AssemblyFront.
Definition: albaSceneNode.h:71
albaVME -
Definition: albaVME.h:150
create hierarchies of vtkProp3Ds (transformable props) vtkALBAAssembly same as vtkAssembly,...