NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CGl3dWindow Class Reference

Search Toolkit Book for CGl3dWindow

#include "gl3d_window.hpp"
(Private to src/gui/widgets/gl/demo_wx.)

+ Inheritance diagram for CGl3dWindow:
+ Collaboration diagram for CGl3dWindow:

Public Member Functions

 CGl3dWindow (wxWindow *parent, wxWindowID id)
 
void SetXRot (float rot)
 
void SetYRot (float rot)
 
void SetZRot (float rot)
 
void SetPerspective ()
 
void SetOrtho ()
 
- Public Member Functions inherited from CGLCanvas
 CGLCanvas (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
 
virtual ~CGLCanvas ()
 
void OnPaint (wxPaintEvent &event)
 
void DoNotUpdate ()
 
void SetClearColor (float r, float g, float b, float a)
 

Protected Member Functions

void OnSize (wxSizeEvent &event)
 
void OnMouseMove (wxMouseEvent &event)
 
void OnMouseDown (wxMouseEvent &event)
 
void OnMouseUp (wxMouseEvent &event)
 
virtual void x_Render ()
 
- Protected Member Functions inherited from CGLCanvas
void x_SetupGLContext ()
 
void x_CheckGlVersion ()
 
const wxGLAttributes & x_GetAttribList () const
 Not having all programs share the same window attributes has caused crashing on Linux, so each window will use these attributes (this should be the superset of attributes needed by program windows). More...
 

Private Types

enum  EState { eNormal , eRotate , ePan , eZoom }
 

Private Member Functions

 DECLARE_EVENT_TABLE ()
 
void x_Rotate (long x, long y)
 
void x_Zoom (long x, long y)
 
void x_Pan (long x, long y)
 
void x_SetupScene ()
 

Private Attributes

CGlCamera m_Camera
 
EState m_State
 
CGlArcBall m_Arcball
 
CGlLight m_Light1
 
CGlLight m_Light2
 
CGlMaterial m_Material
 
float m_XRot
 we also combine Euler angles with this More...
 
float m_YRot
 
float m_ZRot
 
CVect3< float > m_CenterPoint
 
float m_Zoom
 
CGlDisplayList m_Dlist
 
int m_PrevMouseX
 previous mouse position More...
 
int m_PrevMouseY
 

Additional Inherited Members

- Protected Attributes inherited from CGLCanvas
bool m_DoNotUpdate
 
float m_ClearColor [4]
 

Detailed Description

Definition at line 47 of file gl3d_window.hpp.

Member Enumeration Documentation

◆ EState

enum CGl3dWindow::EState
private
Enumerator
eNormal 
eRotate 
ePan 
eZoom 

Definition at line 72 of file gl3d_window.hpp.

Constructor & Destructor Documentation

◆ CGl3dWindow()

CGl3dWindow::CGl3dWindow ( wxWindow *  parent,
wxWindowID  id 
)

Definition at line 47 of file gl3d_window.cpp.

Member Function Documentation

◆ DECLARE_EVENT_TABLE()

CGl3dWindow::DECLARE_EVENT_TABLE ( )
private

◆ OnMouseDown()

void CGl3dWindow::OnMouseDown ( wxMouseEvent &  event)
protected

Definition at line 304 of file gl3d_window.cpp.

References m_PrevMouseX, and m_PrevMouseY.

◆ OnMouseMove()

void CGl3dWindow::OnMouseMove ( wxMouseEvent &  event)
protected

◆ OnMouseUp()

void CGl3dWindow::OnMouseUp ( wxMouseEvent &  event)
protected

◆ OnSize()

void CGl3dWindow::OnSize ( wxSizeEvent &  event)
protected

◆ SetOrtho()

void CGl3dWindow::SetOrtho ( )

Definition at line 100 of file gl3d_window.cpp.

References CGlCamera::eOrtho, m_Camera, and CGlCamera::SetLayout().

Referenced by CGl3dDemoPanel::OnProjSelected().

◆ SetPerspective()

void CGl3dWindow::SetPerspective ( )

Definition at line 94 of file gl3d_window.cpp.

References CGlCamera::ePerspective, m_Camera, and CGlCamera::SetLayout().

Referenced by CGl3dDemoPanel::OnProjSelected().

◆ SetXRot()

void CGl3dWindow::SetXRot ( float  rot)

Definition at line 74 of file gl3d_window.cpp.

References m_XRot, and val.

Referenced by CGl3dDemoPanel::OnXRotationEnter().

◆ SetYRot()

void CGl3dWindow::SetYRot ( float  rot)

Definition at line 81 of file gl3d_window.cpp.

References m_YRot, and val.

Referenced by CGl3dDemoPanel::OnYRotationEnter().

◆ SetZRot()

void CGl3dWindow::SetZRot ( float  rot)

Definition at line 88 of file gl3d_window.cpp.

References m_ZRot, and val.

Referenced by CGl3dDemoPanel::OnZRotationEnter().

◆ x_Pan()

void CGl3dWindow::x_Pan ( long  x,
long  y 
)
private

◆ x_Render()

void CGl3dWindow::x_Render ( void  )
protectedvirtual

◆ x_Rotate()

void CGl3dWindow::x_Rotate ( long  x,
long  y 
)
private

◆ x_SetupScene()

void CGl3dWindow::x_SetupScene ( )
private

Definition at line 106 of file gl3d_window.cpp.

References CGlArcBall::ApplyGL(), m_Arcball, m_CenterPoint, m_XRot, m_YRot, m_Zoom, and m_ZRot.

Referenced by x_Pan(), and x_Render().

◆ x_Zoom()

void CGl3dWindow::x_Zoom ( long  x,
long  y 
)
private

Definition at line 332 of file gl3d_window.cpp.

References delta(), m_PrevMouseY, and m_Zoom.

Referenced by OnMouseMove().

Member Data Documentation

◆ m_Arcball

CGlArcBall CGl3dWindow::m_Arcball
private

Definition at line 83 of file gl3d_window.hpp.

Referenced by OnMouseMove(), OnMouseUp(), OnSize(), x_Rotate(), and x_SetupScene().

◆ m_Camera

CGlCamera CGl3dWindow::m_Camera
private

Definition at line 69 of file gl3d_window.hpp.

Referenced by OnSize(), SetOrtho(), SetPerspective(), x_Pan(), and x_Render().

◆ m_CenterPoint

CVect3<float> CGl3dWindow::m_CenterPoint
private

Definition at line 100 of file gl3d_window.hpp.

Referenced by x_Pan(), and x_SetupScene().

◆ m_Dlist

CGlDisplayList CGl3dWindow::m_Dlist
private

Definition at line 106 of file gl3d_window.hpp.

Referenced by x_Render().

◆ m_Light1

CGlLight CGl3dWindow::m_Light1
private

Definition at line 86 of file gl3d_window.hpp.

Referenced by x_Render().

◆ m_Light2

CGlLight CGl3dWindow::m_Light2
private

Definition at line 89 of file gl3d_window.hpp.

Referenced by x_Render().

◆ m_Material

CGlMaterial CGl3dWindow::m_Material
private

Definition at line 92 of file gl3d_window.hpp.

Referenced by x_Render().

◆ m_PrevMouseX

int CGl3dWindow::m_PrevMouseX
private

previous mouse position

Definition at line 109 of file gl3d_window.hpp.

Referenced by OnMouseDown(), OnMouseMove(), OnMouseUp(), and x_Pan().

◆ m_PrevMouseY

int CGl3dWindow::m_PrevMouseY
private

Definition at line 110 of file gl3d_window.hpp.

Referenced by OnMouseDown(), OnMouseMove(), OnMouseUp(), x_Pan(), and x_Zoom().

◆ m_State

EState CGl3dWindow::m_State
private

Definition at line 80 of file gl3d_window.hpp.

Referenced by OnMouseMove(), and OnMouseUp().

◆ m_XRot

float CGl3dWindow::m_XRot
private

we also combine Euler angles with this

Definition at line 95 of file gl3d_window.hpp.

Referenced by SetXRot(), and x_SetupScene().

◆ m_YRot

float CGl3dWindow::m_YRot
private

Definition at line 96 of file gl3d_window.hpp.

Referenced by SetYRot(), and x_SetupScene().

◆ m_Zoom

float CGl3dWindow::m_Zoom
private

Definition at line 103 of file gl3d_window.hpp.

Referenced by x_SetupScene(), and x_Zoom().

◆ m_ZRot

float CGl3dWindow::m_ZRot
private

Definition at line 97 of file gl3d_window.hpp.

Referenced by SetZRot(), and x_SetupScene().


The documentation for this class was generated from the following files:
Modified on Tue Apr 16 20:12:03 2024 by modify_doxy.py rev. 669887