ALBA
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
albaRWIBase Class Reference

#include <albaRWIBase.h>

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

Public Member Functions

 vtkTypeMacro (albaRWIBase, vtkRenderWindowInteractor)
 
 albaRWIBase ()
 
 albaRWIBase (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxWANTS_CHARS, const wxString &name=wxPanelNameStr)
 
 ~albaRWIBase ()
 
void NotifyClick ()
 
void EnableCameraInteraction (bool enable)
 
bool IsCameraInteractionEnabled ()
 
void SetView (albaView *view)
 
albaView * GetView ()
 
void SetStereoMovieDirectory (const char *dir)
 
void EnableStereoMovie (bool enable=true)
 
void Initialize ()
 
void Enable ()
 
void Disable ()
 
void ReleaseButtons ()
 
void Start ()
 
void UpdateSize (int x, int y)
 
void TerminateApp ()
 
wxBitmap * GetImage (int magnification=1)
 
void SaveImage (albaString filename="")
 
void SaveImageFromImageData (albaString &filename, vtkImageData *imageData)
 
void SaveAllImages (albaString filename, albaViewCompound *v)
 
vtkCamera * GetCamera ()
 
int CreateTimer (int timertype)
 
int DestroyTimer ()
 
void OnPaint (wxPaintEvent &event)
 
void OnEraseBackground (wxEraseEvent &event)
 
virtual void OnLeftMouseDoubleClick (wxMouseEvent &event)
 
virtual void OnLeftMouseButtonDown (wxMouseEvent &event)
 
virtual void OnLeftMouseButtonUp (wxMouseEvent &event)
 
virtual void OnMiddleMouseButtonDown (wxMouseEvent &event)
 
virtual void OnMiddleMouseButtonUp (wxMouseEvent &event)
 
virtual void OnRightMouseButtonDown (wxMouseEvent &event)
 
virtual void OnRightMouseButtonUp (wxMouseEvent &event)
 
virtual void OnMouseMotion (wxMouseEvent &event)
 
virtual void OnMouseWheel (wxMouseEvent &event)
 
virtual void OnTimer (wxTimerEvent &event)
 
virtual void OnKeyDown (wxKeyEvent &event)
 
virtual void OnKeyUp (wxKeyEvent &event)
 
virtual void OnChar (wxKeyEvent &event)
 
virtual void OnSize (wxSizeEvent &event)
 
virtual void OnIdle (wxIdleEvent &event)
 
virtual void OnMouseCaptureLost (wxMouseCaptureLostEvent &WXUNUSED(evt))
 
void SetInteractorStyle (vtkInteractorObserver *o)
 
void GenerateStereoFrames ()
 

Static Public Member Functions

static albaRWIBase * New ()
 
static albaRWIBase * GetLastMouseRWI ()
 

Public Attributes

bool m_Hidden
 
int m_Width
 
int m_Height
 

Protected Attributes

wxTimer m_Timer
 
albaString m_StereoMovieDir
 
int m_StereoMovieFrameCounter
 
bool m_StereoMovieEnable
 
bool m_StereoFrameGenerate
 
vtkWindowToImageFilter * m_StereoMovieLeftEye
 
vtkWindowToImageFilter * m_StereoMovieRightEye
 
vtkImageAppend * m_StereoImage
 
vtkPNGWriter * m_StereoMoviewFrameWriter
 
albaString m_SaveDir
 
vtkCamera * m_Camera
 
bool m_CustomInteractorStyle
 
bool m_CameraInteractionEnabled
 
albaView * m_View
 
int m_LastX
 
int m_LastY
 
bool m_LeftDown
 
bool m_MiddleDown
 
bool m_RightDown
 

Static Protected Attributes

static albaRWIBase * m_LastMouseRWI
 

Detailed Description

albaRWIBase is a vtkRenderWindowInteractor placed on a wxWindow

Attention:
Normally there is no need to destroy any object derived from wxWindow, they will be automatically destroyed as a result of closing the MainFrame. albaRWIBase behave differently, and you must explicitly destroy them by calling "Delete()" BEFORE wxWindow destroy it (using "delete").

Definition at line 61 of file albaRWIBase.h.

Constructor & Destructor Documentation

◆ albaRWIBase() [1/2]

albaRWIBase::albaRWIBase ( )

◆ albaRWIBase() [2/2]

albaRWIBase::albaRWIBase ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxWANTS_CHARS,
const wxString &  name = wxPanelNameStr 
)

◆ ~albaRWIBase()

albaRWIBase::~albaRWIBase ( )

Member Function Documentation

◆ vtkTypeMacro()

albaRWIBase::vtkTypeMacro ( albaRWIBase  ,
vtkRenderWindowInteractor   
)

◆ New()

static albaRWIBase * albaRWIBase::New ( )
static

◆ NotifyClick()

void albaRWIBase::NotifyClick ( )

Notify mouse click on a view.

◆ EnableCameraInteraction()

void albaRWIBase::EnableCameraInteraction ( bool  enable)
inline

Enable/disable the camera motion with the mouse in this render window (enabled by default).

Each mouse event calls the method of the router of the mouse events registered in albaServiceLocator with this render window, the renderer under the mouse and the position: the router gets the view from the render window. The modifier keys are set first.

Definition at line 84 of file albaRWIBase.h.

◆ IsCameraInteractionEnabled()

bool albaRWIBase::IsCameraInteractionEnabled ( )
inline

Definition at line 85 of file albaRWIBase.h.

◆ SetView()

void albaRWIBase::SetView ( albaView *  view)
inline

Set the view this render window belongs to (the compound view for the render windows of its sub views)

Definition at line 88 of file albaRWIBase.h.

◆ GetView()

albaView * albaRWIBase::GetView ( )
inline

Definition at line 89 of file albaRWIBase.h.

◆ GetLastMouseRWI()

static albaRWIBase * albaRWIBase::GetLastMouseRWI ( )
inlinestatic

Return the render window that got the last mouse move, button down or wheel, NULL if deleted.

Definition at line 92 of file albaRWIBase.h.

◆ SetStereoMovieDirectory()

void albaRWIBase::SetStereoMovieDirectory ( const char *  dir)

Set the directory for the Stereo Movie.

◆ EnableStereoMovie()

void albaRWIBase::EnableStereoMovie ( bool  enable = true)

Enable/disable stereo movie frames generation.

◆ Initialize()

void albaRWIBase::Initialize ( )

Initialize the render window interactor.

◆ Enable()

void albaRWIBase::Enable ( )

Enable the render window interactor.

◆ Disable()

void albaRWIBase::Disable ( )

Disable the render window interactor: the buttons still pressed are released first.

◆ ReleaseButtons()

void albaRWIBase::ReleaseButtons ( )

Send the button up of each button still pressed, at the last position, so that the interaction started by them ends: called at the loss of the mouse capture, when the render window is disabled and when it is destroyed.

◆ Start()

void albaRWIBase::Start ( )

Redefined method to take the control on event loop.

◆ UpdateSize()

void albaRWIBase::UpdateSize ( int  x,
int  y 
)

Update the size of the render window.

◆ TerminateApp()

void albaRWIBase::TerminateApp ( )

Redefined method to terminate the application.

◆ GetImage()

wxBitmap * albaRWIBase::GetImage ( int  magnification = 1)

Return an image of the render window.

◆ SaveImage()

void albaRWIBase::SaveImage ( albaString  filename = "")

Save an image of the render window.

◆ SaveImageFromImageData()

void albaRWIBase::SaveImageFromImageData ( albaString &  filename,
vtkImageData *  imageData 
)

◆ SaveAllImages()

void albaRWIBase::SaveAllImages ( albaString  filename,
albaViewCompound *  v 
)

Save all images of the compound view.

◆ GetCamera()

vtkCamera * albaRWIBase::GetCamera ( )

Return the current used camera.

◆ CreateTimer()

int albaRWIBase::CreateTimer ( int  timertype)

◆ DestroyTimer()

int albaRWIBase::DestroyTimer ( )

◆ OnPaint()

void albaRWIBase::OnPaint ( wxPaintEvent &  event)

Method called whe the render window as to be repainted.

◆ OnEraseBackground()

void albaRWIBase::OnEraseBackground ( wxEraseEvent &  event)

◆ OnLeftMouseDoubleClick()

virtual void albaRWIBase::OnLeftMouseDoubleClick ( wxMouseEvent &  event)
virtual

The double click is sent as a left button down.

◆ OnLeftMouseButtonDown()

virtual void albaRWIBase::OnLeftMouseButtonDown ( wxMouseEvent &  event)
virtual

Capture mouse and notify the mouse click.

◆ OnLeftMouseButtonUp()

virtual void albaRWIBase::OnLeftMouseButtonUp ( wxMouseEvent &  event)
virtual

Release the mouse and send an event with mouse position.

◆ OnMiddleMouseButtonDown()

virtual void albaRWIBase::OnMiddleMouseButtonDown ( wxMouseEvent &  event)
virtual

Capture mouse and notify the mouse click.

◆ OnMiddleMouseButtonUp()

virtual void albaRWIBase::OnMiddleMouseButtonUp ( wxMouseEvent &  event)
virtual

Release the mouse and send an event with mouse position.

◆ OnRightMouseButtonDown()

virtual void albaRWIBase::OnRightMouseButtonDown ( wxMouseEvent &  event)
virtual

Capture mouse and notify the mouse click.

◆ OnRightMouseButtonUp()

virtual void albaRWIBase::OnRightMouseButtonUp ( wxMouseEvent &  event)
virtual

Release the mouse and send an event with mouse position.

◆ OnMouseMotion()

virtual void albaRWIBase::OnMouseMotion ( wxMouseEvent &  event)
virtual

Send an event with mouse position.

◆ OnMouseWheel()

virtual void albaRWIBase::OnMouseWheel ( wxMouseEvent &  event)
virtual

Send an event with mouse wheel.

◆ OnTimer()

virtual void albaRWIBase::OnTimer ( wxTimerEvent &  event)
virtual

Send an event with timer information.

◆ OnKeyDown()

virtual void albaRWIBase::OnKeyDown ( wxKeyEvent &  event)
virtual

Send an event with key code information.

◆ OnKeyUp()

virtual void albaRWIBase::OnKeyUp ( wxKeyEvent &  event)
virtual

Send an event with key code information.

◆ OnChar()

virtual void albaRWIBase::OnChar ( wxKeyEvent &  event)
virtual

Send an event with key code information.

◆ OnSize()

virtual void albaRWIBase::OnSize ( wxSizeEvent &  event)
virtual

Find the current camera and set UseHorizontalViewAngle depending on the win aspect ratio.

◆ OnIdle()

virtual void albaRWIBase::OnIdle ( wxIdleEvent &  event)
virtual

Do nothing.

◆ OnMouseCaptureLost()

virtual void albaRWIBase::OnMouseCaptureLost ( wxMouseCaptureLostEvent &  WXUNUSEDevt)
virtual

Release the buttons still pressed (see ReleaseButtons).

◆ SetInteractorStyle()

void albaRWIBase::SetInteractorStyle ( vtkInteractorObserver *  o)

Redefined to set the m_CustomInteractorStyle flag.

◆ GenerateStereoFrames()

void albaRWIBase::GenerateStereoFrames ( )

Generate stereo frames for movie.

Member Data Documentation

◆ m_Timer

wxTimer albaRWIBase::m_Timer
protected

Definition at line 66 of file albaRWIBase.h.

◆ m_Hidden

bool albaRWIBase::m_Hidden

Definition at line 191 of file albaRWIBase.h.

◆ m_Width

int albaRWIBase::m_Width

Definition at line 192 of file albaRWIBase.h.

◆ m_Height

int albaRWIBase::m_Height

Definition at line 193 of file albaRWIBase.h.

◆ m_StereoMovieDir

albaString albaRWIBase::m_StereoMovieDir
protected

Definition at line 199 of file albaRWIBase.h.

◆ m_StereoMovieFrameCounter

int albaRWIBase::m_StereoMovieFrameCounter
protected

Definition at line 200 of file albaRWIBase.h.

◆ m_StereoMovieEnable

bool albaRWIBase::m_StereoMovieEnable
protected

Definition at line 201 of file albaRWIBase.h.

◆ m_StereoFrameGenerate

bool albaRWIBase::m_StereoFrameGenerate
protected

Definition at line 202 of file albaRWIBase.h.

◆ m_StereoMovieLeftEye

vtkWindowToImageFilter* albaRWIBase::m_StereoMovieLeftEye
protected

Definition at line 203 of file albaRWIBase.h.

◆ m_StereoMovieRightEye

vtkWindowToImageFilter* albaRWIBase::m_StereoMovieRightEye
protected

Definition at line 204 of file albaRWIBase.h.

◆ m_StereoImage

vtkImageAppend* albaRWIBase::m_StereoImage
protected

Definition at line 205 of file albaRWIBase.h.

◆ m_StereoMoviewFrameWriter

vtkPNGWriter* albaRWIBase::m_StereoMoviewFrameWriter
protected

Definition at line 206 of file albaRWIBase.h.

◆ m_SaveDir

albaString albaRWIBase::m_SaveDir
protected

Definition at line 208 of file albaRWIBase.h.

◆ m_Camera

vtkCamera* albaRWIBase::m_Camera
protected

Definition at line 209 of file albaRWIBase.h.

◆ m_CustomInteractorStyle

bool albaRWIBase::m_CustomInteractorStyle
protected

Definition at line 210 of file albaRWIBase.h.

◆ m_CameraInteractionEnabled

bool albaRWIBase::m_CameraInteractionEnabled
protected

true if the mouse moves the camera of this render window

Definition at line 211 of file albaRWIBase.h.

◆ m_View

albaView* albaRWIBase::m_View
protected

the view this render window belongs to

Definition at line 212 of file albaRWIBase.h.

◆ m_LastMouseRWI

albaRWIBase* albaRWIBase::m_LastMouseRWI
staticprotected

the render window that got the last mouse event

Definition at line 213 of file albaRWIBase.h.

◆ m_LastX

int albaRWIBase::m_LastX
protected

Definition at line 215 of file albaRWIBase.h.

◆ m_LastY

int albaRWIBase::m_LastY
protected

Definition at line 216 of file albaRWIBase.h.

◆ m_LeftDown

bool albaRWIBase::m_LeftDown
protected

buttons pressed: released when the mouse capture is lost

Definition at line 218 of file albaRWIBase.h.

◆ m_MiddleDown

bool albaRWIBase::m_MiddleDown
protected

Definition at line 219 of file albaRWIBase.h.

◆ m_RightDown

bool albaRWIBase::m_RightDown
protected

Definition at line 220 of file albaRWIBase.h.


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