|
3Depict
|
#include <glPane.h>


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) |
| BasicGLPane::BasicGLPane | ( | wxWindow * | parent | ) |
References ID_KEYPRESS_TIMER.
Referenced by clearCameraUpdates().

| BasicGLPane::~BasicGLPane | ( | ) |
| void BasicGLPane::charEvent | ( | wxKeyEvent & | event | ) |
|
inline |
References BasicGLPane(), forceRedraw(), getHeight(), getWidth(), resized(), and ~BasicGLPane().
Referenced by MainWindowFrame::MainWindowFrame().

| bool BasicGLPane::displaySupported | ( | ) | const |
References attribList.
Referenced by MainWindowFrame::MainWindowFrame().

| void BasicGLPane::forceRedraw | ( | ) |
|
inline |
Get the background colour.
References charEvent(), Scene::getBackgroundColour(), keyPressed(), keyReleased(), mouseDown(), mouseLeftWindow(), mouseMoved(), mouseReleased(), mouseWheelMoved(), OnAxisTapTimer(), OnEraseBackground(), rightClick(), setFullscreen(), and setMouseVisible().
| int BasicGLPane::getHeight | ( | ) |
Referenced by clearCameraUpdates(), render(), and resized().

| int BasicGLPane::getWidth | ( | ) |
Referenced by clearCameraUpdates(), render(), and resized().

|
inline |
|
inline |
Is the window initialised?
References extension, prepare3DViewport(), render(), saveImage(), saveImageSequence(), setGlClearColour(), and updateClearColour().
| void BasicGLPane::keyPressed | ( | wxKeyEvent & | event | ) |
References DOUBLE_TAP_DELAY, Scene::ensureVisible(), and TRANS.
Referenced by getGlClearColour().

| void BasicGLPane::keyReleased | ( | wxKeyEvent & | event | ) |
References CAMERA_KEYBOARD_SCROLL_RATE, Camera::forwardsDolly(), Scene::getActiveCam(), Scene::getTempCam(), and Scene::haveTempCam().
Referenced by getGlClearColour().

| void BasicGLPane::mouseDown | ( | wxMouseEvent & | event | ) |
References ASSERT, Scene::getLastSelected(), Scene::isInteractionLocked(), and Scene::setSelectionMode().
Referenced by getGlClearColour().

| void BasicGLPane::mouseLeftWindow | ( | wxMouseEvent & | event | ) |
References Scene::applyDevice(), Scene::commitTempCam(), Scene::haveTempCam(), and Scene::setSelectionMode().
Referenced by getGlClearColour().

| void BasicGLPane::mouseMoved | ( | wxMouseEvent & | event | ) |
References Scene::applyDevice(), ASSERT, CAMERA_MOVE_RATE, Scene::commitTempCam(), Scene::discardTempCam(), FLAG_CMD, FLAG_SHIFT, Scene::getTempCam(), Scene::haveTempCam(), Scene::isInteractionLocked(), M_PI, Camera::move(), Camera::pivot(), Camera::roll(), SELECT_BUTTON_LEFT, SELECT_BUTTON_MIDDLE, SELECT_BUTTON_RIGHT, Scene::setTempCam(), and Camera::translate().
Referenced by getGlClearColour().

| void BasicGLPane::mouseReleased | ( | wxMouseEvent & | event | ) |
References Scene::applyDevice(), Scene::commitTempCam(), Scene::finaliseCam(), Scene::haveTempCam(), Scene::isInteractionLocked(), and Scene::setSelectionMode().
Referenced by getGlClearColour().

| void BasicGLPane::mouseWheelMoved | ( | wxMouseEvent & | event | ) |
References CAMERA_SCROLL_RATE, Camera::forwardsDolly(), Scene::getActiveCam(), Scene::getTempCam(), and Scene::haveTempCam().
Referenced by getGlClearColour().

| void BasicGLPane::OnAxisTapTimer | ( | wxTimerEvent & | evt | ) |
| void BasicGLPane::OnEraseBackground | ( | wxEraseEvent & | evt | ) |
| 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().

| void BasicGLPane::render | ( | wxPaintEvent & | evt | ) |
Render the view using the scene.
References Scene::draw(), getHeight(), getWidth(), and prepare3DViewport().
Referenced by isInited().

| void BasicGLPane::resized | ( | wxSizeEvent & | evt | ) |
References getHeight(), getWidth(), and prepare3DViewport().
Referenced by clearCameraUpdates().

| void BasicGLPane::rightClick | ( | wxMouseEvent & | event | ) |
| bool BasicGLPane::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.
unpack the tile buffer into a wx image
References ASSERT, CAM_LOOKAT, combineWxImage(), copyRGBAtoWXImage(), Scene::draw(), Scene::drawOverlays(), Scene::getActiveCam(), Scene::getAspect(), Scene::getBackgroundColour(), Scene::getBound(), CameraLookAt::getFOV(), Scene::getLightPos(), BoundCube::getMaxDistanceToBox(), CameraLookAt::getNearPlane(), Camera::getOrigin(), Camera::getOrthoScale(), Camera::getProjectionMode(), Scene::hasOverlays(), PROJECTION_MODE_PERSPECTIVE, Scene::setLightPos(), TR_COLUMNS, TR_ROWS, TRANS, trBeginTile(), trDelete(), trEndTile(), trGet(), trOrtho(), trPerspective(), Camera::type(), and updateClearColour().
Referenced by isInited(), and 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().

| bool BasicGLPane::setFullscreen | ( | bool | fullscreen | ) |
| 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().

|
inline |
| bool BasicGLPane::setMouseVisible | ( | bool | visible | ) |
|
inline |
|
inline |
Must be called before user has a chance to perform interaction.
Referenced by MainWindowFrame::MainWindowFrame().

|
inline |
References setSceneInteractionAllowed().
Referenced by MainWindowFrame::MainWindowFrame().

| void BasicGLPane::setSceneInteractionAllowed | ( | bool | enabled = true | ) |
References Scene::getLastHover(), Scene::getLastSelected(), Scene::glSelect(), Scene::isInteractionLocked(), Scene::lockInteraction(), Scene::setHoverMode(), and Scene::setLastHover().
Referenced by setScene().

| 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().

1.8.13