3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
BasicGLPane Class Reference

#include <glPane.h>

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

Public Member Functions

bool displaySupported () const
 
void setScene (Scene *s)
 
void setSceneInteractionAllowed (bool enabled=true)
 
void setParentStatus (wxStatusBar *statusBar, wxTimer *timer, unsigned int statDelay)
 Must be called before user has a chance to perform interaction. More...
 
bool hasCameraUpdates () const
 
void clearCameraUpdates ()
 
 BasicGLPane (wxWindow *parent)
 
 ~BasicGLPane ()
 
void resized (wxSizeEvent &evt)
 
int getWidth ()
 
int getHeight ()
 
void forceRedraw ()
 
void setMouseMoveFactor (float f)
 
void setMouseZoomFactor (float f)
 
bool isInited ()
 Is the window initialised? More...
 
void setGlClearColour (float r, float g, float b)
 Set the background colour (openGL clear colour) More...
 
void updateClearColour ()
 Pull in the colour from the scene. More...
 
void render (wxPaintEvent &evt)
 Render the view using the scene. More...
 
bool prepare3DViewport (int topleft_x, int topleft_y, int bottomrigth_x, int bottomrigth_y)
 Construct a 3D viewport, ready for openGL output. Returns false if initialisation failed. More...
 
bool saveImage (unsigned int width, unsigned int height, const char *filename, bool showProgress=true, bool needPostPaint=true)
 Save an image to file, return false on failure. More...
 
bool saveImageSequence (unsigned int width, unsigned int height, unsigned int nFrames, wxString &path, wxString &prefix, wxString &extension)
 Save an image sequence to files by orbiting the camera. More...
 
void getGlClearColour (float &r, float &g, float &b)
 Get the background colour. More...
 
void mouseMoved (wxMouseEvent &event)
 
void mouseDown (wxMouseEvent &event)
 
void mouseWheelMoved (wxMouseEvent &event)
 
void mouseReleased (wxMouseEvent &event)
 
void rightClick (wxMouseEvent &event)
 
void mouseLeftWindow (wxMouseEvent &event)
 
void keyPressed (wxKeyEvent &event)
 
void keyReleased (wxKeyEvent &event)
 
void charEvent (wxKeyEvent &event)
 
void OnEraseBackground (wxEraseEvent &)
 
void OnAxisTapTimer (wxTimerEvent &)
 
bool setFullscreen (bool fullscreen)
 
bool setMouseVisible (bool visible)
 

Constructor & Destructor Documentation

◆ BasicGLPane()

BasicGLPane::BasicGLPane ( wxWindow *  parent)

References ID_KEYPRESS_TIMER.

Referenced by clearCameraUpdates().

Here is the caller graph for this function:

◆ ~BasicGLPane()

BasicGLPane::~BasicGLPane ( )

Referenced by clearCameraUpdates().

Here is the caller graph for this function:

Member Function Documentation

◆ charEvent()

void BasicGLPane::charEvent ( wxKeyEvent &  event)

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ clearCameraUpdates()

void BasicGLPane::clearCameraUpdates ( )
inline

References BasicGLPane(), forceRedraw(), getHeight(), getWidth(), resized(), and ~BasicGLPane().

Referenced by MainWindowFrame::MainWindowFrame().

Here is the caller graph for this function:

◆ displaySupported()

bool BasicGLPane::displaySupported ( ) const

References attribList.

Referenced by MainWindowFrame::MainWindowFrame().

Here is the caller graph for this function:

◆ forceRedraw()

void BasicGLPane::forceRedraw ( )

Referenced by clearCameraUpdates().

Here is the caller graph for this function:

◆ getGlClearColour()

void BasicGLPane::getGlClearColour ( float &  r,
float &  g,
float &  b 
)
inline

◆ getHeight()

int BasicGLPane::getHeight ( )

Referenced by clearCameraUpdates(), render(), and resized().

Here is the caller graph for this function:

◆ getWidth()

int BasicGLPane::getWidth ( )

Referenced by clearCameraUpdates(), render(), and resized().

Here is the caller graph for this function:

◆ hasCameraUpdates()

bool BasicGLPane::hasCameraUpdates ( ) const
inline

◆ isInited()

bool BasicGLPane::isInited ( )
inline

◆ keyPressed()

void BasicGLPane::keyPressed ( wxKeyEvent &  event)

References DOUBLE_TAP_DELAY, Scene::ensureVisible(), and TRANS.

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ keyReleased()

void BasicGLPane::keyReleased ( wxKeyEvent &  event)

References CAMERA_KEYBOARD_SCROLL_RATE, Camera::forwardsDolly(), Scene::getActiveCam(), Scene::getTempCam(), and Scene::haveTempCam().

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ mouseDown()

void BasicGLPane::mouseDown ( wxMouseEvent &  event)

References ASSERT, Scene::getLastSelected(), Scene::isInteractionLocked(), and Scene::setSelectionMode().

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ mouseLeftWindow()

void BasicGLPane::mouseLeftWindow ( wxMouseEvent &  event)

References Scene::applyDevice(), Scene::commitTempCam(), Scene::haveTempCam(), and Scene::setSelectionMode().

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ mouseMoved()

void BasicGLPane::mouseMoved ( wxMouseEvent &  event)

◆ mouseReleased()

void BasicGLPane::mouseReleased ( wxMouseEvent &  event)

◆ mouseWheelMoved()

void BasicGLPane::mouseWheelMoved ( wxMouseEvent &  event)

References CAMERA_SCROLL_RATE, Camera::forwardsDolly(), Scene::getActiveCam(), Scene::getTempCam(), and Scene::haveTempCam().

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ OnAxisTapTimer()

void BasicGLPane::OnAxisTapTimer ( wxTimerEvent &  evt)

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ OnEraseBackground()

void BasicGLPane::OnEraseBackground ( wxEraseEvent &  evt)

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ prepare3DViewport()

bool BasicGLPane::prepare3DViewport ( int  topleft_x,
int  topleft_y,
int  bottomrigth_x,
int  bottomrigth_y 
)

Construct a 3D viewport, ready for openGL output. Returns false if initialisation failed.

References ASSERT, Scene::setAspect(), and Scene::setWinSize().

Referenced by isInited(), render(), and resized().

Here is the caller graph for this function:

◆ render()

void BasicGLPane::render ( wxPaintEvent &  evt)

Render the view using the scene.

References Scene::draw(), getHeight(), getWidth(), and prepare3DViewport().

Referenced by isInited().

Here is the caller graph for this function:

◆ resized()

void BasicGLPane::resized ( wxSizeEvent &  evt)

References getHeight(), getWidth(), and prepare3DViewport().

Referenced by clearCameraUpdates().

Here is the caller graph for this function:

◆ rightClick()

void BasicGLPane::rightClick ( wxMouseEvent &  event)

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ saveImage()

bool BasicGLPane::saveImage ( unsigned int  width,
unsigned int  height,
const char *  filename,
bool  showProgress = true,
bool  needPostPaint = true 
)

◆ saveImageSequence()

bool BasicGLPane::saveImageSequence ( unsigned int  width,
unsigned int  height,
unsigned int  nFrames,
wxString &  path,
wxString &  prefix,
wxString &  extension 
)

Save an image sequence to files by orbiting the camera.

References ASSERT, Camera::clone(), digitString(), Scene::discardTempCam(), Scene::getActiveCam(), Scene::haveTempCam(), M_PI, Camera::move(), saveImage(), Scene::setActiveCam(), stlStr(), stream_cast(), and TRANS.

Referenced by isInited().

Here is the caller graph for this function:

◆ setFullscreen()

bool BasicGLPane::setFullscreen ( bool  fullscreen)

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ setGlClearColour()

void BasicGLPane::setGlClearColour ( float  r,
float  g,
float  b 
)

Set the background colour (openGL clear colour)

References ASSERT, and Scene::setBackgroundColour().

Referenced by isInited(), and updateClearColour().

Here is the caller graph for this function:

◆ setMouseMoveFactor()

void BasicGLPane::setMouseMoveFactor ( float  f)
inline

◆ setMouseVisible()

bool BasicGLPane::setMouseVisible ( bool  visible)

Referenced by getGlClearColour().

Here is the caller graph for this function:

◆ setMouseZoomFactor()

void BasicGLPane::setMouseZoomFactor ( float  f)
inline

◆ setParentStatus()

void BasicGLPane::setParentStatus ( wxStatusBar *  statusBar,
wxTimer *  timer,
unsigned int  statDelay 
)
inline

Must be called before user has a chance to perform interaction.

Referenced by MainWindowFrame::MainWindowFrame().

Here is the caller graph for this function:

◆ setScene()

void BasicGLPane::setScene ( Scene s)
inline

References setSceneInteractionAllowed().

Referenced by MainWindowFrame::MainWindowFrame().

Here is the caller graph for this function:

◆ setSceneInteractionAllowed()

void BasicGLPane::setSceneInteractionAllowed ( bool  enabled = true)

◆ updateClearColour()

void BasicGLPane::updateClearColour ( )

Pull in the colour from the scene.

References ASSERT, Scene::getBackgroundColour(), setGlClearColour(), TR_BOTTOM_TO_TOP, trImageBuffer(), trImageSize(), trNew(), trRowOrder(), and trTileSize().

Referenced by isInited(), and saveImage().

Here is the caller graph for this function:

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