ALBA
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
albaViewVTK Class Reference

#include <albaViewVTK.h>

Inheritance diagram for albaViewVTK:
Inheritance graph
[legend]
Collaboration diagram for albaViewVTK:
Collaboration graph
[legend]

Classes

struct  albaVisualPipeInfo
 

Public Types

enum  VIEW_VTK_WIDGET_ID {
  ID_ROLLOUT_ATTACH_CAMERA = Superclass::ID_LAST , ID_ROLLOUT_TEXT_KIT , ID_ROLLOUT_LIGHT_KIT , ID_ROLLOUT_ANIMATE_KIT ,
  ID_LAST
}
 
typedef std::map< albaString, albaVisualPipeInfoalbaPipeMap
 
- Public Types inherited from albaView
enum  VIEW_WIDGET_ID { ID_FIRST = MINID , ID_PRINT_INFO , ID_HELP , ID_LAST }
 

Public Member Functions

 albaViewVTK (const wxString &label="vtkView", int camera_position=CAMERA_PERSPECTIVE, bool show_axes=true, bool show_grid=false, int stereo=0, bool show_orientator=false, int axesType=albaAxes::TRIAD)
 
virtual ~albaViewVTK ()
 
 albaTypeMacro (albaViewVTK, albaView)
 
virtual albaViewCopy (albaObserver *Listener, bool lightCopyEnabled=false)
 
virtual void Create ()
 
virtual void OnEvent (albaEventBase *alba_event)
 
virtual void VmeAdd (albaVME *vme)
 
virtual void VmeRemove (albaVME *vme)
 
virtual void VmeSelect (albaVME *vme, bool select)
 
virtual void VmeShow (albaVME *vme, bool show)
 
virtual void VmeUpdateProperty (albaVME *vme, bool fromTag=false)
 
virtual int GetNodeStatus (albaVME *vme)
 
virtual albaPipeGetNodePipe (albaVME *vme)
 
virtual void VmeCreatePipe (albaVME *vme)
 
virtual void VmeDeletePipe (albaVME *vme)
 
virtual void CameraReset (albaVME *vme=NULL)
 
virtual void CameraSet (int camera_position)
 
virtual void CameraUpdate ()
 
virtual int GetCameraPosition ()
 
virtual void SetBackgroundColor (wxColor color)
 
virtual albaSceneGraphGetSceneGraph ()
 
virtual albaRWIBaseGetRWI ()
 
void GetImage (wxBitmap &bmp, int magnification=1)
 
virtual vtkRenderer * GetFrontRenderer ()
 
virtual vtkRenderer * GetBackRenderer ()
 
virtual vtkRenderWindow * GetRenderWindow ()
 
virtual bool FindPokedVme (albaDevice *device, albaMatrix &point_pose, vtkProp3D *&picked_prop, albaVME *&picked_vme, albaInteractor *&picked_behavior)
 
virtual bool Pick (int x, int y)
 
virtual bool Pick (albaMatrix &m)
 
void SetWindowSize (int w, int h)
 
void PlugVisualPipe (albaString vme_type, albaString pipe_type, long visibility=VISIBLE)
 
void SetMouse (albaDeviceButtonsPadMouse *mouse)
 
virtual void Print (std::ostream &os, const int tabs=0)
 
- Public Member Functions inherited from albaView
 albaView (const wxString &label="View")
 
virtual ~albaView ()
 
 albaAbstractTypeMacro (albaView, albaObject)
 
virtual void SetListener (albaObserver *Listener)
 
virtual void OnEvent (albaEventBase *alba_event)
 
virtual albaViewCopy (albaObserver *Listener, bool lightCopyEnabled=false)
 
virtual void Create ()
 
virtual void VmeAdd (albaVME *vme)
 
virtual void VmeRemove (albaVME *vme)
 
virtual void VmeSelect (albaVME *vme, bool select)
 
virtual void VmeShow (albaVME *vme, bool show)
 
virtual void VmeUpdateProperty (albaVME *vme, bool fromTag=false)
 
virtual bool IsVmeShowed (albaVME *vme)
 
virtual void VmeCreatePipe (albaVME *vme)
 
virtual void VmeDeletePipe (albaVME *vme)
 
virtual void CameraReset (albaVME *node=NULL)
 
virtual void CameraUpdate ()
 
virtual void SetMouse (albaDeviceButtonsPadMouse *mouse)
 
virtual albaRWIBaseGetRWI ()
 
virtual albaSceneGraphGetSceneGraph ()
 
virtual void GetImage (wxBitmap &bmp, int magnification=1)
 
virtual void OptionsUpdate ()
 
virtual bool FindPokedVme (albaDevice *device, albaMatrix &point_pose, vtkProp3D *&picked_prop, albaVME *&picked_vme, albaInteractor *&picked_behavior)
 
virtual int GetNodeStatus (albaVME *vme)
 
virtual albaPipeGetNodePipe (albaVME *vme)
 
wxString GetLabel ()
 
wxString GetName ()
 
void SetLabel (wxString label)
 
void SetName (wxString name)
 
virtual wxWindow * GetWindow ()
 
virtual wxFrame * GetFrame ()
 
virtual albaGUIGetGui ()
 
void DeleteGui ()
 
virtual void SetFrame (wxFrame *f)
 
virtual void OnSize (wxSizeEvent &size_event)
 
virtual void SetWindowSize (int w, int h)
 
virtual bool Pick (int x, int y)
 
virtual bool Pick (albaMatrix &m)
 
virtual void GetPickedPosition (double pos[3])
 
virtual albaVMEGetPickedVme ()
 
virtual vtkProp3D * GetPickedProp ()
 
virtual int GetNumberOfVisibleVME ()
 
virtual void Print (std::ostream &os, const int tabs=0)
 
virtual const char * GetHTMLText ()
 
vtkCellPicker * GetPicker2D ()
 
virtual char ** GetIcon ()
 
virtual wxColor GetBackgroundColor ()
 
virtual void SetBackgroundColor (wxColor color)=0
 
bool GetCanSpin () const
 
void SetCanSpin (bool canSpin)
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 
- Public Member Functions inherited from albaObject
 albaObject ()
 
virtual ~albaObject ()
 
virtual void Delete ()
 
virtual const char * GetTypeName () const
 
virtual bool IsA (const char *type_name) const
 
virtual bool IsA (const albaTypeID &type_id) const
 
virtual albaObjectNewObjectInstance () const =0
 
virtual const albaTypeIDGetTypeId () const
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObject (const albaObject &c)
 

Public Attributes

albaPipeMap m_PipeMap
 
albaRWIm_Rwi
 
- Public Attributes inherited from albaView
int m_Mult
 
int m_Id
 
bool m_Plugged
 
albaViewm_Next
 

Protected Member Functions

virtual albaGUICreateGui ()
 
virtual void OnPreResetCamera ()
 
virtual void OnPostResetCamera ()
 
virtual void GetVisualPipeName (albaVME *node, albaString &pipe_name)
 
- Protected Member Functions inherited from albaView
bool FindPickedVme (vtkAssemblyPath *ap=NULL)
 
virtual albaGUICreateGui ()
 

Protected Attributes

albaSceneGraphm_Sg
 
albaLightKitm_LightKit
 
albaTextKitm_TextKit
 
albaAttachCameram_AttachCamera
 
albaAnimatem_AnimateKit
 
int m_CameraPositionId
 
bool m_ShowAxes
 
int m_StereoType
 
bool m_ShowGrid
 
bool m_ShowOrientator
 
int m_AxesType
 
- Protected Attributes inherited from albaView
albaObserverm_Listener
 
wxString m_Label
 
wxString m_Name
 
wxWindow * m_Win
 
wxFrame * m_Frame
 
albaGUIm_Gui
 
albaGUIHolderm_Guih
 
vtkCellPicker * m_Picker2D
 
vtkALBARayCast3DPicker * m_Picker3D
 
albaVMEm_PickedVME
 
vtkProp3D * m_PickedProp
 
double m_PickedPosition [3]
 
int m_NumberOfVisibleVme
 
wxPrintData * m_PrintData
 
albaString m_HTMLText
 
wxColor m_BackgroundColor
 
bool m_LightCopyEnabled
 
bool m_CanSpin
 
- Protected Attributes inherited from albaObject
bool m_HeapFlag
 

Additional Inherited Members

- Static Public Member Functions inherited from albaObject
static const char * GetStaticTypeName ()
 
static bool IsStaticType (const char *type_name)
 
static bool IsStaticType (const albaTypeID &type_id)
 
static const albaTypeIDGetStaticTypeId ()
 
static albaObjectSafeDownCast (albaObject *o)
 

Detailed Description

albaViewVTK is a View that got a RenderWindow and a SceneGraph

See also
albaSceneNode albaRWIBase albaRWI

Definition at line 48 of file albaViewVTK.h.

Member Typedef Documentation

◆ albaPipeMap

Definition at line 148 of file albaViewVTK.h.

Member Enumeration Documentation

◆ VIEW_VTK_WIDGET_ID

IDs for the GUI.

Enumerator
ID_ROLLOUT_ATTACH_CAMERA 
ID_ROLLOUT_TEXT_KIT 
ID_ROLLOUT_LIGHT_KIT 
ID_ROLLOUT_ANIMATE_KIT 
ID_LAST 

Definition at line 67 of file albaViewVTK.h.

Constructor & Destructor Documentation

◆ albaViewVTK()

albaViewVTK::albaViewVTK ( const wxString &  label = "vtkView",
int  camera_position = CAMERA_PERSPECTIVE,
bool  show_axes = true,
bool  show_grid = false,
int  stereo = 0,
bool  show_orientator = false,
int  axesType = albaAxes::TRIAD 
)

constructor

◆ ~albaViewVTK()

virtual albaViewVTK::~albaViewVTK ( )
virtual

constructor

Member Function Documentation

◆ albaTypeMacro()

albaViewVTK::albaTypeMacro ( albaViewVTK  ,
albaView   
)

RTTI macro.

◆ Copy()

virtual albaView * albaViewVTK::Copy ( albaObserver Listener,
bool  lightCopyEnabled = false 
)
virtual

clone the object

Reimplemented from albaView.

◆ Create()

virtual void albaViewVTK::Create ( )
virtual

create rwi

Reimplemented from albaView.

◆ OnEvent()

virtual void albaViewVTK::OnEvent ( albaEventBase alba_event)
virtual

listen to other object events

Reimplemented from albaView.

◆ VmeAdd()

virtual void albaViewVTK::VmeAdd ( albaVME vme)
virtual

Add the vme to the view's scene-graph.

Reimplemented from albaView.

◆ VmeRemove()

virtual void albaViewVTK::VmeRemove ( albaVME vme)
virtual

Remove the vme from the view's scene-graph.

Reimplemented from albaView.

◆ VmeSelect()

virtual void albaViewVTK::VmeSelect ( albaVME vme,
bool  select 
)
virtual

Reimplemented from albaView.

◆ VmeShow()

virtual void albaViewVTK::VmeShow ( albaVME vme,
bool  show 
)
virtual

Called to show/hide vme.

Reimplemented from albaView.

◆ VmeUpdateProperty()

virtual void albaViewVTK::VmeUpdateProperty ( albaVME vme,
bool  fromTag = false 
)
virtual

Called to update visual pipe properties of the vme passed as argument.

If the 'fromTag' flag is true, the update is done by reading the visual parameters from tags.

Reimplemented from albaView.

◆ GetNodeStatus()

virtual int albaViewVTK::GetNodeStatus ( albaVME vme)
virtual

Set the visualization status for the node (visible, not visible, mutex, ...)

See also
albaSceneGraph

Reimplemented from albaView.

◆ GetNodePipe()

virtual albaPipe * albaViewVTK::GetNodePipe ( albaVME vme)
virtual

Return a pointer to the visual pipe of the node passed as argument.

It is used in albaSideBar to plug the visual pipe's GUI in the tabbed vme panel.

See also
albaSideBar

Reimplemented from albaView.

◆ VmeCreatePipe()

virtual void albaViewVTK::VmeCreatePipe ( albaVME vme)
virtual

Create the visual pipe for the node passed as argument.

To create visual pipe first check in m_PipeMap if custom visual pipe is defined, otherwise ask to vme which is its visual pipe.

Reimplemented from albaView.

◆ VmeDeletePipe()

virtual void albaViewVTK::VmeDeletePipe ( albaVME vme)
virtual

Delete vme's visual pipe.

It is called when vme is removed from visualization.

Reimplemented from albaView.

◆ CameraReset()

virtual void albaViewVTK::CameraReset ( albaVME vme = NULL)
virtual

Reimplemented from albaView.

◆ CameraSet()

virtual void albaViewVTK::CameraSet ( int  camera_position)
virtual

◆ CameraUpdate()

virtual void albaViewVTK::CameraUpdate ( )
virtual

Reimplemented from albaView.

◆ GetCameraPosition()

virtual int albaViewVTK::GetCameraPosition ( )
virtual

◆ SetBackgroundColor()

virtual void albaViewVTK::SetBackgroundColor ( wxColor  color)
virtual

Implements albaView.

◆ GetSceneGraph()

virtual albaSceneGraph * albaViewVTK::GetSceneGraph ( )
inlinevirtual

Reimplemented from albaView.

Definition at line 117 of file albaViewVTK.h.

◆ GetRWI()

virtual albaRWIBase * albaViewVTK::GetRWI ( )
inlinevirtual

Reimplemented from albaView.

Definition at line 118 of file albaViewVTK.h.

◆ GetImage()

void albaViewVTK::GetImage ( wxBitmap &  bmp,
int  magnification = 1 
)
virtual

Return a pointer to the image of the renderwindow.

Reimplemented from albaView.

◆ GetFrontRenderer()

virtual vtkRenderer * albaViewVTK::GetFrontRenderer ( )
virtual

◆ GetBackRenderer()

virtual vtkRenderer * albaViewVTK::GetBackRenderer ( )
virtual

◆ GetRenderWindow()

virtual vtkRenderWindow * albaViewVTK::GetRenderWindow ( )
virtual

◆ FindPokedVme()

virtual bool albaViewVTK::FindPokedVme ( albaDevice device,
albaMatrix point_pose,
vtkProp3D *&  picked_prop,
albaVME *&  picked_vme,
albaInteractor *&  picked_behavior 
)
virtual

Find the pocked VME at button down.

As argument the function needs the device which performed the action, and provides as result pointers to piked prop, vme and its behavior if it exists.

Reimplemented from albaView.

◆ Pick() [1/2]

virtual bool albaViewVTK::Pick ( int  x,
int  y 
)
virtual

Perform a picking according to the screen position (x,y) and return true on success.

Reimplemented from albaView.

◆ Pick() [2/2]

virtual bool albaViewVTK::Pick ( albaMatrix m)
virtual

Perform a picking according to the absolute matrix given and return true on success.

Reimplemented from albaView.

◆ SetWindowSize()

void albaViewVTK::SetWindowSize ( int  w,
int  h 
)
virtual

Set the vtk RenderWindow size.

Used only for Linux (not necessary for Windows)

Reimplemented from albaView.

◆ PlugVisualPipe()

void albaViewVTK::PlugVisualPipe ( albaString  vme_type,
albaString  pipe_type,
long  visibility = VISIBLE 
)

Plug a visual pipe for a particular vme.

It is used also to plug custom pipe.

◆ SetMouse()

void albaViewVTK::SetMouse ( albaDeviceButtonsPadMouse mouse)
virtual

Set the mouse device to use inside the view.

Reimplemented from albaView.

◆ Print()

virtual void albaViewVTK::Print ( std::ostream &  os,
const int  tabs = 0 
)
virtual

print a dump of this object

Reimplemented from albaView.

◆ CreateGui()

virtual albaGUI * albaViewVTK::CreateGui ( )
protectedvirtual

Internally used to create a new instance of the GUI.

This function should be overridden by subclasses to create specialized GUIs. Each subclass should append its own widgets and define the enum of IDs for the widgets as an extension of the superclass enum. The last id value must be defined as "LAST_ID" to allow the subclass to continue the ID enumeration from it. For appending the widgets in the same panel GUI, each CreateGUI() function should first call the superclass' one.

Reimplemented from albaView.

◆ OnPreResetCamera()

virtual void albaViewVTK::OnPreResetCamera ( )
protectedvirtual

◆ OnPostResetCamera()

virtual void albaViewVTK::OnPostResetCamera ( )
protectedvirtual

◆ GetVisualPipeName()

virtual void albaViewVTK::GetVisualPipeName ( albaVME node,
albaString pipe_name 
)
protectedvirtual

Return the visual pipe's name.

Member Data Documentation

◆ m_PipeMap

albaPipeMap albaViewVTK::m_PipeMap

Map used to store visual pipeline associated with vme types.

Definition at line 153 of file albaViewVTK.h.

◆ m_Rwi

albaRWI* albaViewVTK::m_Rwi

Definition at line 158 of file albaViewVTK.h.

◆ m_Sg

albaSceneGraph* albaViewVTK::m_Sg
protected

Definition at line 165 of file albaViewVTK.h.

◆ m_LightKit

albaLightKit* albaViewVTK::m_LightKit
protected

Definition at line 166 of file albaViewVTK.h.

◆ m_TextKit

albaTextKit* albaViewVTK::m_TextKit
protected

Definition at line 167 of file albaViewVTK.h.

◆ m_AttachCamera

albaAttachCamera* albaViewVTK::m_AttachCamera
protected

Definition at line 168 of file albaViewVTK.h.

◆ m_AnimateKit

albaAnimate* albaViewVTK::m_AnimateKit
protected

Definition at line 169 of file albaViewVTK.h.

◆ m_CameraPositionId

int albaViewVTK::m_CameraPositionId
protected

Integer representing a preset for camera position, focal point and view up.

Definition at line 171 of file albaViewVTK.h.

◆ m_ShowAxes

bool albaViewVTK::m_ShowAxes
protected

Flag used to show/hide axes in low left corner of the view.

Definition at line 172 of file albaViewVTK.h.

◆ m_StereoType

int albaViewVTK::m_StereoType
protected

Indicate the stereo type to use with the view.

Definition at line 173 of file albaViewVTK.h.

◆ m_ShowGrid

bool albaViewVTK::m_ShowGrid
protected

Definition at line 174 of file albaViewVTK.h.

◆ m_ShowOrientator

bool albaViewVTK::m_ShowOrientator
protected

Definition at line 175 of file albaViewVTK.h.

◆ m_AxesType

int albaViewVTK::m_AxesType
protected

Definition at line 176 of file albaViewVTK.h.


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