Loading...
Searching...
No Matches
scene.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_WIDGETS_SCENE_H
#define BALL_VIEW_WIDGETS_SCENE_H
#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
# include <BALL/VIEW/KERNEL/modularWidget.h>
#endif
#ifndef BALL_VIEW_RENDERING_RENDERERSGLRENDERER_H
# include <BALL/VIEW/RENDERING/RENDERERS/glRenderer.h>
#endif
#ifndef BALL_VIEW_KERNEL_COMMON_H
# include <BALL/VIEW/KERNEL/common.h>
#endif
#ifndef BALL_VIEW_RENDERING_RENDERWINDOW_H
# include <BALL/VIEW/RENDERING/renderWindow.h>
#endif
#ifndef BALL_VIEW_RENDERING_GLRENDERWINDOW_H
# include <BALL/VIEW/RENDERING/glRenderWindow.h>
#endif
#ifndef BALL_VIEW_RENDERING_RENDERSETUP_H
# include <BALL/VIEW/RENDERING/renderSetup.h>
#endif
#ifndef BALL_VIEW_DIALOGS_EDITSETTINGS_H
# include <BALL/VIEW/DIALOGS/editSettings.h>
#endif
#ifndef BALL_VIEW_KERNEL_EDITOPERATION_H
# include <BALL/VIEW/KERNEL/editOperation.h>
#endif
#ifndef BALL_VIEW_KERNEL_MODES_INTERACTIONMODEMANAGER_H
# include <BALL/VIEW/KERNEL/MODES/interactionModeManager.h>
#endif
#include <QtCore/QThread>
#include <QtCore/QTimer>
#include <QtGui/QDragEnterEvent>
#include <QtGui/QDropEvent>
#include <QtWidgets/QToolBar>
#include <QtGui/QFont>
#include <QtGui/QPicture>
#include <boost/shared_ptr.hpp>
#ifdef BALL_HAS_RTFACT
#ifndef BALL_VIEW_RENDERING_RAYTRACINGRENDERER_H
# include <BALL/VIEW/RENDERING/RENDERERS/raytracingRenderer.h>
#endif
#endif // BALL_HAS_RTFACT
class QMouseEvent;
class QRubberBand;
class QMenu;
class QImage;
class QAction;
class QWheelEvent;
class QKeyEvent;
namespace BALL
{
class Bond;
class PDBAtom;
class AtomContainer;
namespace VIEW
{
class ColorMap;
class InteractionMode;
class Preferences;
class LightSettings;
class StageSettings;
class MaterialSettings;
class AnimationThread;
class ClippingPlane;
class CompositeMessage;
class ControlSelectionMessage;
class RepresentationMessage;
class DatasetMessage;
class SceneMessage;
class TransformationEvent6D;
class MotionTrackingEvent;
class ButtonEvent;
class RenderToBufferFinishedEvent;
class BALL_VIEW_EXPORT Scene
: public QWidget,
public ModularWidget
{
friend class AnimationThread;
friend class RenderSetup;
#ifdef BALL_HAS_RTFACT
typedef boost::shared_ptr<RaytracingRenderer> RaytracingRendererPtr;
typedef boost::shared_ptr<RenderWindow> RaytracingWindowPtr;
#endif
Q_OBJECT
public:
BALL_EMBEDDABLE(Scene, ModularWidget)
enum WindowType
{
CONTROL_WINDOW = 0,
LEFT_EYE_WINDOW,
RIGHT_EYE_WINDOW
};
Scene(QWidget* parent_widget = 0, const char* name = NULL, Qt::WindowFlags w_flags = 0);
virtual ~Scene();
virtual void clear();
virtual void onNotify(Message *message);
virtual bool exportScene(Renderer &er) const;
String getBondOrderString_(Index order);
virtual void initializeWidget(MainControl& main_control);
virtual void fetchPreferences(INIFile& inifile);
virtual void writePreferences(INIFile& inifile);
virtual void checkMenu(MainControl& main_control);
virtual bool isValid() const;
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
void setInfo(const QString& info_string);
bool isRecording() const;
void captureCamera();
Atom* getCurrentAtom() { return current_atom_; }
void setCurrentAtom(Atom* atom) { current_atom_ = atom; }
void notify(Message* msg) { notify_(msg); }
Vector2 map3DToViewport(const Vector3& coords);
Vector3 mapViewportTo3D(const Vector2& coords);
Vector3 mapViewportTo3D(int x, int y);
void setRubberBandGeometry(const QRect& rect);
void setRubberBandVisible(bool show);
void pickObjects(const QPoint& pos, list<GeometricObject*>& objects);
void pickObjects(const QPoint& pos1, const QPoint& pos2, list<GeometricObject*>& objects);
void merge(Composite* a1, Composite* a2);
std::list<AtomContainer*> getContainers();
void enterPickingMode();
void exitPickingMode();
void drawLine(const QPointF& a, const QPointF& b, QPainter* painter = 0);
void drawLine(const Vector2& a, const Vector2& b, QPainter* painter = 0);
Bond* getCurrentBond() { return current_bond_; }
void setCurrentBond(Bond* b) { current_bond_ = b; }
void changeBondOrder();
void changeBondOrder(Index delta);
void activatedOrderItem_(QAction* action);
void createMolecule_();
void setFormalCharge_();
void deselect(bool update=true);
void getClickedItems(const QPoint& p);
Stage* getStage()
{ return stage_;}
const Stage* getStage() const
{ return stage_;}
StageSettings* getStageSettings()
{ return stage_settings_; }
const StageSettings* getStageSettings() const
{ return stage_settings_; }
MaterialSettings* getMaterialSettings()
{ return material_settings_; }
const MaterialSettings* getMaterialSettings() const
{ return material_settings_; }
void setCamera(const Camera& camera);
std::list<Camera>& getAnimationPoints()
{ return animation_points_;}
static void setAnimationSmoothness(float value)
{ animation_smoothness_ = value;}
static float getAnimationSmoothness()
{ return animation_smoothness_;}
float getDownsamplingFactor() const
{ return downsampling_factor_;}
void setDownsamplingFactor(float ds_factor);
void setDefaultLighting(bool update_GL = true);
BALL_DEPRECATED static void setMouseSensitivity(float /* sensitivity */) {}
BALL_DEPRECATED static float getMouseSensitivity() { return 0; }
BALL_DEPRECATED static void setMouseWheelSensitivity(float /* sensitivity */) {}
BALL_DEPRECATED static float getMouseWheelSensitivity() { return 0; }
static void setShowLightSources(bool state)
{ show_light_sources_ = state;}
static bool showLightSourcesEnabled()
{ return show_light_sources_;}
GLRenderer& getGLRenderer()
{ return *gl_renderer_;}
#ifdef BALL_HAS_RTFACT
RaytracingRenderer& getRaytracingRenderer()
{ return *rt_renderer_;}
#endif
void setGLRenderer(GLRenderer& renderer);
static bool stereoBufferSupportTest();
bool inMoveMode() const;
bool exportPNG(const String& filename);
virtual void setWidgetVisible(bool state);
void setOffScreenRendering(bool enabled, Size factor);
virtual void paintEvent(QPaintEvent* e);
virtual bool eventFilter(QObject* object, QEvent* event);
virtual void projectionModeChanged();
static void setScreenShotNumber(Position pos) { screenshot_nr_ = pos;}
static void setPOVNumber(Position pos) { pov_nr_ = pos;}
static void setVRMLNumber(Position pos) {vrml_nr_ = pos;}
void rotate(float degree_right, float degree_up);
void rotateClockwise(float degree);
void move(Vector3 v);
// TODO: move this and the next function somewhere else...
void moveComposites(const std::list<Composite*>& composites, Vector3 v);
void rotateComposites(const std::list<Composite*>& composites, float degree_right, float degree_up, float degree_clockwise = 0);
bool isAnimationRunning() const;
void setTurnPoint(const Vector3& v) { system_origin_ = v;}
const Vector3& getTurnPoint() const { return system_origin_;}
void setFullScreen(bool state);
void setFPSEnabled(bool state) { show_fps_ = state; }
void showText(const String& text, Size font_size = 20);
bool isUpdateRunning() const { return update_running_;}
void resetTracking() {tracking_initialized_ = false;}
// TODO: this pretty hacky!
void updateAllMaterials();
void updateMaterialForRepresentation(Representation* rep, const Stage::Material& new_material);
void lightsUpdated(bool redraw = false);
void setupEnvironmentMap(const QImage& image);
Position prepareGridTextures(const RegularData3D& grid, const ColorMap& map);
void updateGL();
void initializePreferencesTab(Preferences &preferences);
void finalizePreferencesTab(Preferences &preferences);
virtual void applyPreferences();
void showContextMenu(QPoint pos);
// Allow to use the base class setCursor, too
using QWidget::setCursor;
void setCursor(String c);
void setElementCursor(int number);
virtual void addToolBarEntries(QToolBar* tb);
virtual void keyPressEvent(QKeyEvent* e);
public Q_SLOTS:
void createCoordinateSystem();
void createCoordinateSystemAtOrigin();
String exportPNG();
void exportPOVRay();
void exportNextPOVRay();
void printScene();
void showExportPNGDialog();
void showExportVRMLDialog();
void setPreview(bool state) { use_preview_ = state; }
bool usePreview() const { return use_preview_; }
bool useVertexBuffers() const { return want_to_use_vertex_buffer_; }
virtual void switchShowWidget();
void switchRenderer(RenderSetup::RendererType new_type);
void addGlWindow();
#ifdef BALL_HAS_RTFACT
void addRTfactWindow();
#endif
void exitStereo();
void enterStereo();
void enterActiveStereo();
void enterDualStereo();
void enterDualStereoDifferentDisplays();
void clearRecordedAnimation();
void startAnimation();
void stopAnimation();
void switchToLastMode();
void switchShowGrid();
void showInfos();
void setupViewVolume();
void storeViewPoint();
void restoreViewPoint();
void startContinuousLoop();
void stopContinuousLoop();
void toggleContinuousLoop();
void applyStereoDefaults();
#ifdef BALL_HAS_RTFACT
RaytracingWindowPtr getWindow(WindowType aWindowType);
#endif
void createNewMolecule();
void saturateWithHydrogens();
void optimizeStructure();
void computeBondOrders();
// slots for communication with PTEDialog
void setEditElementType(int element_number);
int getEditElementType();
InteractionModeManager& getInteractionModeManager() { return mode_manager_; }
protected Q_SLOTS:
virtual void showViewPoint_();
virtual void setViewPoint_();
virtual void resetCamera_();
virtual void resetRepresentationsForRenderer_(RenderSetup& rs);
virtual void dropEvent(QDropEvent* e);
virtual void dragEnterEvent(QDragEnterEvent* e);
// dummy slot for menu entries without immediate action (saves many lines code this way)
void dummySlot(){}
Q_SIGNALS:
// signal for communication with EditOperationDialog
void newEditOperation(EditOperation &eo);
protected:
void handleRepresentationMessage_(RepresentationMessage* rm);
void handleDatasetMessage_(DatasetMessage* dm);
void handleSceneMessage_(SceneMessage* sm);
void handleCompositeMessage_(CompositeMessage* cm);
void handleControlSelectionMessage_(ControlSelectionMessage* csm);
virtual void handleRenderToBufferFinishedEvent_(RenderToBufferFinishedEvent* evt);
void renderText_(QPointF const& point, QString const& text, QPaintDevice* current_dev);
void insert_(int x_, int y_, PDBAtom &atom_);
TVector2<float> getScreenPosition_(Vector3 vec);
void initializeMembers_();
void renderGrid_();
QAction *new_molecule_action_, *optimize_action_;
QAction *add_hydrogens_action_;
QAction *bondorders_action_;
Atom* current_atom_;
Bond* current_bond_;
// pick atoms/bonds only in highlighted AtomContainer?
static bool only_highlighted_;
// element for new atoms
int atomic_number_;
//undo stack
vector<EditOperation> undo_;
EditSettings* edit_settings_;
QList<QAction*> toolbar_actions_edit_controls_;
virtual void init();
virtual void paintGL();
virtual void resizeEvent(QResizeEvent* event);
virtual void customEvent(QEvent* evt);
virtual void transformationEvent6D(TransformationEvent6D* evt);
virtual void motionTrackingEvent(MotionTrackingEvent* evt);
virtual void buttonPressEvent(ButtonEvent* evt);
virtual void buttonReleaseEvent(ButtonEvent* evt);
virtual void mouseMoveEvent(QMouseEvent* qmouse_event);
virtual void mousePressEvent(QMouseEvent* qmouse_event);
virtual void mouseReleaseEvent(QMouseEvent* qmouse_event);
virtual void wheelEvent(QWheelEvent* qmouse_event);
virtual void mouseDoubleClickEvent(QMouseEvent* e);
//_
void animate_();
void rotateSystemClockwise_();
void zoomSystem_();
void selectionPressed_();
void selectionPressedMoved_();
void selectObjects_();
void pickParent_(QPoint p);
void writeLights_(INIFile& inifile) const;
void readLights_(const INIFile& inifile);
void createCoordinateSystem_(bool at_origin);
void registerRenderers_();
String createFPSInfo_(Renderer* renderer);
// Menu entry IDs
QAction *no_stereo_action_, *enter_stereo_action_, *active_stereo_action_, *dual_stereo_action_, *dual_stereo_different_display_action_;
QAction *record_animation_action_, *start_animation_action_, *clear_animation_action_, *cancel_animation_action_;
QAction *animation_export_POV_action_, *animation_export_VRML_action_, *animation_export_PNG_action_, *animation_repeat_action_;
#ifdef BALL_HAS_RTFACT
QAction *toggle_continuous_loop_action_;
#endif
QAction *switch_grid_;
QMenu* create_coordinate_system_;
Vector3 system_origin_;
Vector3 old_trackorigin_;
bool tracking_initialized_;
Quaternion old_trackrotation_;
bool update_running_;
QRubberBand* rb_;
Stage* stage_;
Camera stereo_camera_;
Camera stored_camera_;
std::vector<boost::shared_ptr<RenderSetup> > renderers_;
GLRenderer* gl_renderer_;
#ifdef BALL_HAS_RTFACT
RaytracingRenderer* rt_renderer_;
RaytracingWindowPtr rt_window_;
#endif
static bool show_light_sources_;
static float animation_smoothness_;
static float downsampling_factor_;
LightSettings* light_settings_;
StageSettings* stage_settings_;
MaterialSettings* material_settings_;
// nr of last png file export
static Position screenshot_nr_;
// nr of last pov file export
static Position pov_nr_;
//nr of last vrml or stl export
static Position vrml_nr_;
std::list<Camera> animation_points_;
AnimationThread* animation_thread_;
bool stop_animation_;
#ifdef BALL_HAS_RTFACT
bool continuous_loop_;
#endif
bool want_to_use_vertex_buffer_;
bool use_preview_;
PreciseTime time_;
QPoint info_point_;
QByteArray last_state_;
list<float> fps_;
bool show_fps_;
static bool offscreen_rendering_;
Size offscreen_factor_;
Size font_size_;
QToolBar* toolbar_view_controls_;
QToolBar* toolbar_edit_controls_;
QList<QAction*> toolbar_actions_view_controls_;
QString info_string_;
GLRenderWindow* main_display_;
Position main_renderer_;
Index stereo_left_eye_;
Index stereo_right_eye_;
QFont default_font_;
QPicture overlay_;
bool has_overlay_;
InteractionModeManager mode_manager_;
};
class BALL_VIEW_EXPORT AnimationThread
: public QThread
{
public:
AnimationThread(){};
virtual void run() {scene_->animate_();}
void mySleep(Size msec);
void setScene(Scene* scene) { scene_ = scene;}
Scene* getScene() { return scene_;}
protected:
Scene* scene_;
};
} // namespace VIEW
} // namespace BALL
#endif // BALL_VIEW_WIDGETS_SCENE_H
BALL_DEPRECATED
#define BALL_DEPRECATED
Definition COMMON/global.h:64
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
common.h
BALL::AtomContainer
Definition atomContainer.h:32
BALL::Atom
Definition atom.h:90
BALL::Bond
Definition bond.h:57
BALL::Composite
Definition composite.h:74
BALL::INIFile
Definition INIFile.h:29
BALL::PDBAtom
Definition PDBAtom.h:40
BALL::PreciseTime
Definition timeStamp.h:38
BALL::String
Definition string.h:57
BALL::TVector2
Definition vector2.h:63
BALL::VIEW::AnimationThread
Definition scene.h:937
BALL::VIEW::AnimationThread::mySleep
void mySleep(Size msec)
BALL::VIEW::AnimationThread::getScene
Scene * getScene()
Definition scene.h:953
BALL::VIEW::AnimationThread::setScene
void setScene(Scene *scene)
Definition scene.h:950
BALL::VIEW::AnimationThread::run
virtual void run()
Definition scene.h:944
BALL::VIEW::AnimationThread::scene_
Scene * scene_
Definition scene.h:957
BALL::VIEW::AnimationThread::AnimationThread
AnimationThread()
Definition scene.h:941
BALL::VIEW::ButtonEvent
Definition buttonEvent.h:35
BALL::VIEW::Camera
Definition camera.h:24
BALL::VIEW::ClippingPlane
Definition clippingPlane.h:26
BALL::VIEW::ColorMap
Definition colorMap.h:30
BALL::VIEW::CompositeMessage
Definition message.h:202
BALL::VIEW::ConnectionObject::notify_
void notify_(Message *message)
BALL::VIEW::ControlSelectionMessage
Definition message.h:487
BALL::VIEW::DatasetMessage
Definition message.h:139
BALL::VIEW::EditOperation
Definition editOperation.h:23
BALL::VIEW::EditSettings
Definition editSettings.h:36
BALL::VIEW::GLRenderWindow
Definition glRenderWindow.h:40
BALL::VIEW::GLRenderer
Definition glRenderer.h:76
BALL::VIEW::InteractionModeManager
Definition interactionModeManager.h:28
BALL::VIEW::InteractionMode
Definition interactionMode.h:25
BALL::VIEW::LightSettings
Definition lightSettings.h:43
BALL::VIEW::MainControl
Definition mainControl.h:118
BALL::VIEW::MaterialSettings
Definition materialSettings.h:37
BALL::VIEW::Message
Definition message.h:53
BALL::VIEW::ModularWidget::ModularWidget
ModularWidget(const char *name="<ModularWidget>")
BALL::VIEW::MotionTrackingEvent
Definition motionTrackingEvent.h:15
BALL::VIEW::Preferences
Definition preferences.h:43
BALL::VIEW::RaytracingRenderer
Definition raytracingRenderer.h:34
BALL::VIEW::RenderSetup::RendererType
RendererType
Definition renderSetup.h:63
BALL::VIEW::RenderToBufferFinishedEvent
Definition renderSetup.h:370
BALL::VIEW::Renderer
Definition renderer.h:55
BALL::VIEW::RepresentationMessage
Base class for all messages concerning a Representation.
Definition message.h:570
BALL::VIEW::Representation
Definition representation.h:59
BALL::VIEW::SceneMessage
Definition message.h:329
BALL::VIEW::Scene
Definition scene.h:141
BALL::VIEW::Scene::applyStereoDefaults
void applyStereoDefaults()
BALL::VIEW::Scene::pov_nr_
static Position pov_nr_
Definition scene.h:892
BALL::VIEW::Scene::switchShowGrid
void switchShowGrid()
BALL::VIEW::Scene::exitPickingMode
void exitPickingMode()
BALL::VIEW::Scene::show_fps_
bool show_fps_
Definition scene.h:909
BALL::VIEW::Scene::selectObjects_
void selectObjects_()
BALL::VIEW::Scene::registerRenderers_
void registerRenderers_()
BALL::VIEW::Scene::no_stereo_action_
QAction * no_stereo_action_
Definition scene.h:850
BALL::VIEW::Scene::add_hydrogens_action_
QAction * add_hydrogens_action_
Definition scene.h:734
BALL::VIEW::Scene::setPOVNumber
static void setPOVNumber(Position pos)
Definition scene.h:425
BALL::VIEW::Scene::dragEnterEvent
virtual void dragEnterEvent(QDragEnterEvent *e)
BALL::VIEW::Scene::switchShowWidget
virtual void switchShowWidget()
BALL::VIEW::Scene::setShowLightSources
static void setShowLightSources(bool state)
Definition scene.h:374
BALL::VIEW::Scene::rb_
QRubberBand * rb_
Definition scene.h:867
BALL::VIEW::Scene::animation_export_POV_action_
QAction * animation_export_POV_action_
Definition scene.h:852
BALL::VIEW::Scene::changeBondOrder
void changeBondOrder(Index delta)
BALL::VIEW::Scene::showText
void showText(const String &text, Size font_size=20)
BALL::VIEW::Scene::getEditElementType
int getEditElementType()
BALL::VIEW::Scene::handleCompositeMessage_
void handleCompositeMessage_(CompositeMessage *cm)
BALL::VIEW::Scene::setMouseSensitivity
static BALL_DEPRECATED void setMouseSensitivity(float)
Definition scene.h:362
BALL::VIEW::Scene::printScene
void printScene()
BALL::VIEW::Scene::setOffScreenRendering
void setOffScreenRendering(bool enabled, Size factor)
BALL::VIEW::Scene::drawLine
void drawLine(const Vector2 &a, const Vector2 &b, QPainter *painter=0)
BALL::VIEW::Scene::isUpdateRunning
bool isUpdateRunning() const
Definition scene.h:479
BALL::VIEW::Scene::setEditElementType
void setEditElementType(int element_number)
BALL::VIEW::Scene::merge
void merge(Composite *a1, Composite *a2)
BALL::VIEW::Scene::saturateWithHydrogens
void saturateWithHydrogens()
BALL::VIEW::Scene::animation_export_VRML_action_
QAction * animation_export_VRML_action_
Definition scene.h:852
BALL::VIEW::Scene::getGLRenderer
GLRenderer & getGLRenderer()
Definition scene.h:382
BALL::VIEW::Scene::storeViewPoint
void storeViewPoint()
BALL::VIEW::Scene::time_
PreciseTime time_
Definition scene.h:905
BALL::VIEW::Scene::setMouseWheelSensitivity
static BALL_DEPRECATED void setMouseWheelSensitivity(float)
Definition scene.h:368
BALL::VIEW::Scene::keyPressEvent
virtual void keyPressEvent(QKeyEvent *e)
Catch key events.
BALL::VIEW::Scene::buttonReleaseEvent
virtual void buttonReleaseEvent(ButtonEvent *evt)
BALL::VIEW::Scene::handleControlSelectionMessage_
void handleControlSelectionMessage_(ControlSelectionMessage *csm)
BALL::VIEW::Scene::getClickedItems
void getClickedItems(const QPoint &p)
BALL::VIEW::Scene::stop_animation_
bool stop_animation_
Definition scene.h:898
BALL::VIEW::Scene::stage_settings_
StageSettings * stage_settings_
Definition scene.h:886
BALL::VIEW::Scene::setCurrentAtom
void setCurrentAtom(Atom *atom)
Definition scene.h:283
BALL::VIEW::Scene::info_string_
QString info_string_
Definition scene.h:917
BALL::VIEW::Scene::getCurrentBond
Bond * getCurrentBond()
Definition scene.h:300
BALL::VIEW::Scene::setTurnPoint
void setTurnPoint(const Vector3 &v)
Definition scene.h:462
BALL::VIEW::Scene::stored_camera_
Camera stored_camera_
Definition scene.h:871
BALL::VIEW::Scene::setRubberBandGeometry
void setRubberBandGeometry(const QRect &rect)
BALL::VIEW::Scene::exportNextPOVRay
void exportNextPOVRay()
Export to POVRay whithout showing file dialog.
BALL::VIEW::Scene::mapViewportTo3D
Vector3 mapViewportTo3D(const Vector2 &coords)
BALL::VIEW::Scene::stage_
Stage * stage_
Definition scene.h:869
BALL::VIEW::Scene::restoreViewPoint
void restoreViewPoint()
BALL::VIEW::Scene::RenderSetup
friend class RenderSetup
Definition scene.h:143
BALL::VIEW::Scene::stopContinuousLoop
void stopContinuousLoop()
BALL::VIEW::Scene::setDefaultLighting
void setDefaultLighting(bool update_GL=true)
BALL::VIEW::Scene::toolbar_actions_edit_controls_
QList< QAction * > toolbar_actions_edit_controls_
Definition scene.h:748
BALL::VIEW::Scene::current_atom_
Atom * current_atom_
Definition scene.h:737
BALL::VIEW::Scene::toolbar_actions_view_controls_
QList< QAction * > toolbar_actions_view_controls_
Definition scene.h:915
BALL::VIEW::Scene::offscreen_factor_
Size offscreen_factor_
Definition scene.h:911
BALL::VIEW::Scene::getMouseSensitivity
static BALL_DEPRECATED float getMouseSensitivity()
Definition scene.h:365
BALL::VIEW::Scene::only_highlighted_
static bool only_highlighted_
Definition scene.h:741
BALL::VIEW::Scene::dual_stereo_different_display_action_
QAction * dual_stereo_different_display_action_
Definition scene.h:850
BALL::VIEW::Scene::readLights_
void readLights_(const INIFile &inifile)
BALL::VIEW::Scene::use_preview_
bool use_preview_
Definition scene.h:903
BALL::VIEW::Scene::dummySlot
void dummySlot()
Definition scene.h:673
BALL::VIEW::Scene::setVRMLNumber
static void setVRMLNumber(Position pos)
Definition scene.h:428
BALL::VIEW::Scene::clearRecordedAnimation
void clearRecordedAnimation()
BALL::VIEW::Scene::getStage
const Stage * getStage() const
Definition scene.h:317
BALL::VIEW::Scene::inMoveMode
bool inMoveMode() const
BALL::VIEW::Scene::isAnimationRunning
bool isAnimationRunning() const
BALL::VIEW::Scene::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *qmouse_event)
BALL::VIEW::Scene::pickObjects
void pickObjects(const QPoint &pos1, const QPoint &pos2, list< GeometricObject * > &objects)
BALL::VIEW::Scene::rotateComposites
void rotateComposites(const std::list< Composite * > &composites, float degree_right, float degree_up, float degree_clockwise=0)
BALL::VIEW::Scene::show_light_sources_
static bool show_light_sources_
Definition scene.h:881
BALL::VIEW::Scene::animation_thread_
AnimationThread * animation_thread_
Definition scene.h:897
BALL::VIEW::Scene::animate_
void animate_()
BALL::VIEW::Scene::main_renderer_
Position main_renderer_
The index of the renderer responsible for the main display.
Definition scene.h:921
BALL::VIEW::Scene::getMaterialSettings
const MaterialSettings * getMaterialSettings() const
Definition scene.h:333
BALL::VIEW::Scene::exportPNG
String exportPNG()
Export PNG image and return the filename.
BALL::VIEW::Scene::updateGL
void updateGL()
BALL::VIEW::Scene::getAnimationSmoothness
static float getAnimationSmoothness()
Definition scene.h:348
BALL::VIEW::Scene::createCoordinateSystem_
void createCoordinateSystem_(bool at_origin)
BALL::VIEW::Scene::setPreview
void setPreview(bool state)
Enable or disable model previews e.g. while rotating.
Definition scene.h:550
BALL::VIEW::Scene::startContinuousLoop
void startContinuousLoop()
BALL::VIEW::Scene::initializeMembers_
void initializeMembers_()
BALL::VIEW::Scene::getCurrentAtom
Atom * getCurrentAtom()
Definition scene.h:282
BALL::VIEW::Scene::captureCamera
void captureCamera()
BALL::VIEW::Scene::handleSceneMessage_
void handleSceneMessage_(SceneMessage *sm)
BALL::VIEW::Scene::useVertexBuffers
bool useVertexBuffers() const
Definition scene.h:555
BALL::VIEW::Scene::moveComposites
void moveComposites(const std::list< Composite * > &composites, Vector3 v)
BALL::VIEW::Scene::pickObjects
void pickObjects(const QPoint &pos, list< GeometricObject * > &objects)
BALL::VIEW::Scene::animation_repeat_action_
QAction * animation_repeat_action_
Definition scene.h:852
BALL::VIEW::Scene::animation_points_
std::list< Camera > animation_points_
Definition scene.h:896
BALL::VIEW::Scene::getScreenPosition_
TVector2< float > getScreenPosition_(Vector3 vec)
BALL::VIEW::Scene::record_animation_action_
QAction * record_animation_action_
Definition scene.h:851
BALL::VIEW::Scene::setGLRenderer
void setGLRenderer(GLRenderer &renderer)
BALL::VIEW::Scene::setupViewVolume
void setupViewVolume()
BALL::VIEW::Scene::stopAnimation
void stopAnimation()
BALL::VIEW::Scene::mousePressEvent
virtual void mousePressEvent(QMouseEvent *qmouse_event)
BALL::VIEW::Scene::WindowType
WindowType
Definition scene.h:165
BALL::VIEW::Scene::RIGHT_EYE_WINDOW
@ RIGHT_EYE_WINDOW
Window into which right eye should be renderer. Indicates same window as CONTROL_WINDOW if no stereo ...
Definition scene.h:173
BALL::VIEW::Scene::CONTROL_WINDOW
@ CONTROL_WINDOW
Main window that is always being displayed directly in the QT main interface.
Definition scene.h:167
BALL::VIEW::Scene::LEFT_EYE_WINDOW
@ LEFT_EYE_WINDOW
Window into which left eye should be rendered. Indicates same window as CONTROL_WINDOW if no stereo i...
Definition scene.h:170
BALL::VIEW::Scene::setFormalCharge_
void setFormalCharge_()
BALL::VIEW::Scene::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *qmouse_event)
BALL::VIEW::Scene::old_trackorigin_
Vector3 old_trackorigin_
Definition scene.h:861
BALL::VIEW::Scene::paintGL
virtual void paintGL()
BALL::VIEW::Scene::startAnimation
void startAnimation()
BALL::VIEW::Scene::pickParent_
void pickParent_(QPoint p)
BALL::VIEW::Scene::resetTracking
void resetTracking()
Definition scene.h:481
BALL::VIEW::Scene::wheelEvent
virtual void wheelEvent(QWheelEvent *qmouse_event)
BALL::VIEW::Scene::addToolBarEntries
virtual void addToolBarEntries(QToolBar *tb)
BALL::VIEW::Scene::showLightSourcesEnabled
static bool showLightSourcesEnabled()
Definition scene.h:378
BALL::VIEW::Scene::prepareGridTextures
Position prepareGridTextures(const RegularData3D &grid, const ColorMap &map)
BALL::VIEW::Scene::setDownsamplingFactor
void setDownsamplingFactor(float ds_factor)
BALL::VIEW::Scene::cancel_animation_action_
QAction * cancel_animation_action_
Definition scene.h:851
BALL::VIEW::Scene::overlay_
QPicture overlay_
Definition scene.h:928
BALL::VIEW::Scene::deselect
void deselect(bool update=true)
BALL::VIEW::Scene::stereo_right_eye_
Index stereo_right_eye_
Definition scene.h:924
BALL::VIEW::Scene::~Scene
virtual ~Scene()
BALL::VIEW::Scene::exportPOVRay
void exportPOVRay()
BALL::VIEW::Scene::exitStereo
void exitStereo()
BALL::VIEW::Scene::createFPSInfo_
String createFPSInfo_(Renderer *renderer)
Estimate current fps and convert into a string.
BALL::VIEW::Scene::enterPickingMode
void enterPickingMode()
BALL::VIEW::Scene::updateMaterialForRepresentation
void updateMaterialForRepresentation(Representation *rep, const Stage::Material &new_material)
BALL::VIEW::Scene::last_state_
QByteArray last_state_
Definition scene.h:907
BALL::VIEW::Scene::getInteractionModeManager
InteractionModeManager & getInteractionModeManager()
Returns a reference to the Scene's interaction mode manager.
Definition scene.h:641
BALL::VIEW::Scene::isValid
virtual bool isValid() const
BALL::VIEW::Scene::clear_animation_action_
QAction * clear_animation_action_
Definition scene.h:851
BALL::VIEW::Scene::resetCamera_
virtual void resetCamera_()
Reset the camera to standard values.
BALL::VIEW::Scene::buttonPressEvent
virtual void buttonPressEvent(ButtonEvent *evt)
BALL::VIEW::Scene::enterDualStereo
void enterDualStereo()
BALL::VIEW::Scene::toolbar_edit_controls_
QToolBar * toolbar_edit_controls_
Definition scene.h:914
BALL::VIEW::Scene::system_origin_
Vector3 system_origin_
Definition scene.h:860
BALL::VIEW::Scene::animation_export_PNG_action_
QAction * animation_export_PNG_action_
Definition scene.h:852
BALL::VIEW::Scene::resizeEvent
virtual void resizeEvent(QResizeEvent *event)
BALL::VIEW::Scene::switchToLastMode
void switchToLastMode()
BALL::VIEW::Scene::enterStereo
void enterStereo()
BALL::VIEW::Scene::atomic_number_
int atomic_number_
Definition scene.h:743
BALL::VIEW::Scene::getStage
Stage * getStage()
Definition scene.h:313
BALL::VIEW::Scene::setRubberBandVisible
void setRubberBandVisible(bool show)
BALL::VIEW::Scene::paintEvent
virtual void paintEvent(QPaintEvent *e)
BALL::VIEW::Scene::switch_grid_
QAction * switch_grid_
Definition scene.h:857
BALL::VIEW::Scene::drawLine
void drawLine(const QPointF &a, const QPointF &b, QPainter *painter=0)
BALL::VIEW::Scene::start_animation_action_
QAction * start_animation_action_
Definition scene.h:851
BALL::VIEW::Scene::AnimationThread
friend class AnimationThread
Definition scene.h:142
BALL::VIEW::Scene::material_settings_
MaterialSettings * material_settings_
Definition scene.h:887
BALL::VIEW::Scene::optimizeStructure
void optimizeStructure()
BALL::VIEW::Scene::mapViewportTo3D
Vector3 mapViewportTo3D(int x, int y)
BALL::VIEW::Scene::isRecording
bool isRecording() const
BALL::VIEW::Scene::info_point_
QPoint info_point_
Definition scene.h:906
BALL::VIEW::Scene::stereo_camera_
Camera stereo_camera_
Definition scene.h:870
BALL::VIEW::Scene::active_stereo_action_
QAction * active_stereo_action_
Definition scene.h:850
BALL::VIEW::Scene::activatedOrderItem_
void activatedOrderItem_(QAction *action)
BALL::VIEW::Scene::createCoordinateSystemAtOrigin
void createCoordinateSystemAtOrigin()
Create an coordinate system at origin.
BALL::VIEW::Scene::undo_
vector< EditOperation > undo_
Definition scene.h:746
BALL::VIEW::Scene::downsampling_factor_
static float downsampling_factor_
Definition scene.h:883
BALL::VIEW::Scene::renderers_
std::vector< boost::shared_ptr< RenderSetup > > renderers_
Definition scene.h:873
BALL::VIEW::Scene::enterDualStereoDifferentDisplays
void enterDualStereoDifferentDisplays()
BALL::VIEW::Scene::getContainers
std::list< AtomContainer * > getContainers()
BALL::VIEW::Scene::new_molecule_action_
QAction * new_molecule_action_
Definition scene.h:733
BALL::VIEW::Scene::createNewMolecule
void createNewMolecule()
BALL::VIEW::Scene::selectionPressedMoved_
void selectionPressedMoved_()
BALL::VIEW::Scene::showExportPNGDialog
void showExportPNGDialog()
show an dialog to save an PNG file to
BALL::VIEW::Scene::dual_stereo_action_
QAction * dual_stereo_action_
Definition scene.h:850
BALL::VIEW::Scene::stereo_left_eye_
Index stereo_left_eye_
Definition scene.h:923
BALL::VIEW::Scene::exportPNG
bool exportPNG(const String &filename)
BALL::VIEW::Scene::setElementCursor
void setElementCursor(int number)
BALL::VIEW::Scene::handleRenderToBufferFinishedEvent_
virtual void handleRenderToBufferFinishedEvent_(RenderToBufferFinishedEvent *evt)
BALL::VIEW::Scene::changeBondOrder
void changeBondOrder()
BALL::VIEW::Scene::newEditOperation
void newEditOperation(EditOperation &eo)
BALL::VIEW::Scene::setViewPoint_
virtual void setViewPoint_()
Set the viewpoint.
BALL::VIEW::Scene::clear
virtual void clear()
BALL::VIEW::Scene::old_trackrotation_
Quaternion old_trackrotation_
Definition scene.h:863
BALL::VIEW::Scene::writeLights_
void writeLights_(INIFile &inifile) const
BALL::VIEW::Scene::renderText_
void renderText_(QPointF const &point, QString const &text, QPaintDevice *current_dev)
BALL::VIEW::Scene::fps_
list< float > fps_
Definition scene.h:908
BALL::VIEW::Scene::move
void move(Vector3 v)
BALL::VIEW::Scene::customEvent
virtual void customEvent(QEvent *evt)
BALL::VIEW::Scene::showExportVRMLDialog
void showExportVRMLDialog()
opens the VIEW/DIALOGS/GeometryExportDialog for vrml and stl export
BALL::VIEW::Scene::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::VIEW::Scene::setWidgetVisible
virtual void setWidgetVisible(bool state)
BALL::VIEW::Scene::selectionPressed_
void selectionPressed_()
BALL::VIEW::Scene::initializeWidget
virtual void initializeWidget(MainControl &main_control)
BALL::VIEW::Scene::update_running_
bool update_running_
Definition scene.h:865
BALL::VIEW::Scene::getMouseWheelSensitivity
static BALL_DEPRECATED float getMouseWheelSensitivity()
Definition scene.h:371
BALL::VIEW::Scene::computeBondOrders
void computeBondOrders()
BALL::VIEW::Scene::toggleContinuousLoop
void toggleContinuousLoop()
BALL::VIEW::Scene::current_bond_
Bond * current_bond_
Definition scene.h:738
BALL::VIEW::Scene::enterActiveStereo
void enterActiveStereo()
BALL::VIEW::Scene::showContextMenu
void showContextMenu(QPoint pos)
BALL::VIEW::Scene::setCamera
void setCamera(const Camera &camera)
BALL::VIEW::Scene::notify
void notify(Message *msg)
Definition scene.h:284
BALL::VIEW::Scene::offscreen_rendering_
static bool offscreen_rendering_
Definition scene.h:910
BALL::VIEW::Scene::default_font_
QFont default_font_
Definition scene.h:926
BALL::VIEW::Scene::enter_stereo_action_
QAction * enter_stereo_action_
Definition scene.h:850
BALL::VIEW::Scene::setCursor
void setCursor(String c)
BALL::VIEW::Scene::stereoBufferSupportTest
static bool stereoBufferSupportTest()
BALL::VIEW::Scene::setFPSEnabled
void setFPSEnabled(bool state)
Definition scene.h:471
BALL::VIEW::Scene::exportScene
virtual bool exportScene(Renderer &er) const
BALL::VIEW::Scene::mode_manager_
InteractionModeManager mode_manager_
Definition scene.h:930
BALL::VIEW::Scene::switchRenderer
void switchRenderer(RenderSetup::RendererType new_type)
BALL::VIEW::Scene::toolbar_view_controls_
QToolBar * toolbar_view_controls_
Definition scene.h:913
BALL::VIEW::Scene::rotate
void rotate(float degree_right, float degree_up)
BALL::VIEW::Scene::getStageSettings
StageSettings * getStageSettings()
Definition scene.h:321
BALL::VIEW::Scene::getAnimationPoints
std::list< Camera > & getAnimationPoints()
Definition scene.h:340
BALL::VIEW::Scene::bondorders_action_
QAction * bondorders_action_
Definition scene.h:735
BALL::VIEW::Scene::transformationEvent6D
virtual void transformationEvent6D(TransformationEvent6D *evt)
BALL::VIEW::Scene::getStageSettings
const StageSettings * getStageSettings() const
Definition scene.h:325
BALL::VIEW::Scene::showViewPoint_
virtual void showViewPoint_()
Show the viewpoint and the look at point in the statusline of the mainwidget.
BALL::VIEW::Scene::zoomSystem_
void zoomSystem_()
BALL::VIEW::Scene::setupEnvironmentMap
void setupEnvironmentMap(const QImage &image)
Try to setup an environment map for all renderers that support it.
BALL::VIEW::Scene::map3DToViewport
Vector2 map3DToViewport(const Vector3 &coords)
BALL::VIEW::Scene::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QMouseEvent *e)
BALL::VIEW::Scene::renderGrid_
void renderGrid_()
BALL::VIEW::Scene::initializePreferencesTab
void initializePreferencesTab(Preferences &preferences)
BALL::VIEW::Scene::setAnimationSmoothness
static void setAnimationSmoothness(float value)
Definition scene.h:344
BALL::VIEW::Scene::lightsUpdated
void lightsUpdated(bool redraw=false)
BALL::VIEW::Scene::init
virtual void init()
BALL::VIEW::Scene::motionTrackingEvent
virtual void motionTrackingEvent(MotionTrackingEvent *evt)
BALL::VIEW::Scene::Scene
Scene(QWidget *parent_widget=0, const char *name=NULL, Qt::WindowFlags w_flags=0)
BALL::VIEW::Scene::eventFilter
virtual bool eventFilter(QObject *object, QEvent *event)
BALL::VIEW::Scene::showInfos
void showInfos()
Popup informations for object under mouse cursor.
BALL::VIEW::Scene::create_coordinate_system_
QMenu * create_coordinate_system_
Definition scene.h:858
BALL::VIEW::Scene::tracking_initialized_
bool tracking_initialized_
Definition scene.h:862
BALL::VIEW::Scene::updateAllMaterials
void updateAllMaterials()
BALL::VIEW::Scene::gl_renderer_
GLRenderer * gl_renderer_
Definition scene.h:874
BALL::VIEW::Scene::handleDatasetMessage_
void handleDatasetMessage_(DatasetMessage *dm)
BALL::VIEW::Scene::want_to_use_vertex_buffer_
bool want_to_use_vertex_buffer_
Definition scene.h:902
BALL::VIEW::Scene::projectionModeChanged
virtual void projectionModeChanged()
BALL::VIEW::Scene::writePreferences
virtual void writePreferences(INIFile &inifile)
BALL::VIEW::Scene::has_overlay_
bool has_overlay_
Definition scene.h:929
BALL::VIEW::Scene::setFullScreen
void setFullScreen(bool state)
BALL::VIEW::Scene::rotateClockwise
void rotateClockwise(float degree)
BALL::VIEW::Scene::getDownsamplingFactor
float getDownsamplingFactor() const
Definition scene.h:352
BALL::VIEW::Scene::insert_
void insert_(int x_, int y_, PDBAtom &atom_)
BALL::VIEW::Scene::getBondOrderString_
String getBondOrderString_(Index order)
BALL::VIEW::Scene::setInfo
void setInfo(const QString &info_string)
BALL::VIEW::Scene::getMaterialSettings
MaterialSettings * getMaterialSettings()
Definition scene.h:329
BALL::VIEW::Scene::vrml_nr_
static Position vrml_nr_
Definition scene.h:894
BALL::VIEW::Scene::onNotify
virtual void onNotify(Message *message)
BALL::VIEW::Scene::animation_smoothness_
static float animation_smoothness_
Definition scene.h:882
BALL::VIEW::Scene::checkMenu
virtual void checkMenu(MainControl &main_control)
BALL::VIEW::Scene::finalizePreferencesTab
void finalizePreferencesTab(Preferences &preferences)
BALL::VIEW::Scene::setCurrentBond
void setCurrentBond(Bond *b)
Definition scene.h:301
BALL::VIEW::Scene::setScreenShotNumber
static void setScreenShotNumber(Position pos)
Definition scene.h:422
BALL::VIEW::Scene::getTurnPoint
const Vector3 & getTurnPoint() const
Definition scene.h:465
BALL::VIEW::Scene::applyPreferences
virtual void applyPreferences()
BALL::VIEW::Scene::optimize_action_
QAction * optimize_action_
Definition scene.h:733
BALL::VIEW::Scene::font_size_
Size font_size_
Definition scene.h:912
BALL::VIEW::Scene::addGlWindow
void addGlWindow()
BALL::VIEW::Scene::edit_settings_
EditSettings * edit_settings_
Definition scene.h:747
BALL::VIEW::Scene::usePreview
bool usePreview() const
Returns the state of the preview mode.
Definition scene.h:553
BALL::VIEW::Scene::screenshot_nr_
static Position screenshot_nr_
Definition scene.h:890
BALL::VIEW::Scene::main_display_
GLRenderWindow * main_display_
Definition scene.h:919
BALL::VIEW::Scene::createMolecule_
void createMolecule_()
BALL::VIEW::Scene::dropEvent
virtual void dropEvent(QDropEvent *e)
BALL::VIEW::Scene::resetRepresentationsForRenderer_
virtual void resetRepresentationsForRenderer_(RenderSetup &rs)
BALL::VIEW::Scene::rotateSystemClockwise_
void rotateSystemClockwise_()
BALL::VIEW::Scene::createCoordinateSystem
void createCoordinateSystem()
Create an coordinate system at current position.
BALL::VIEW::Scene::handleRepresentationMessage_
void handleRepresentationMessage_(RepresentationMessage *rm)
BALL::VIEW::Scene::fetchPreferences
virtual void fetchPreferences(INIFile &inifile)
BALL::VIEW::Scene::light_settings_
LightSettings * light_settings_
Definition scene.h:885
BALL::VIEW::StageSettings
Definition stageSettings.h:54
BALL::VIEW::Stage::Material
Definition stage.h:246
BALL::VIEW::Stage
Definition stage.h:239
BALL::VIEW::TransformationEvent6D
Definition transformationEvent6D.h:14
QEvent
QMouseEvent
QObject
QPaintDevice
QThread
QWidget
editOperation.h
editSettings.h
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
glRenderWindow.h
glRenderer.h
BALL::Vector2
TVector2< float > Vector2
Definition vector2.h:771
interactionModeManager.h
modularWidget.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::RegularData3D
TRegularData3D< float > RegularData3D
Definition regularData3D.h:515
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
BALL::Quaternion
TQuaternion< float > Quaternion
Definition quaternion.h:626
BALL::Index
BALL_INDEX_TYPE Index
Definition COMMON/global.h:105
raytracingRenderer.h
renderSetup.h
renderWindow.h