mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-07-20 06:09:50 +08:00
The purpose of this functionality is to bring a basic ray-tracing solution to existing OCCT visualization toolkit (TKOpenGL). Currently ray-tracing visualization core supports sharp shadows, specular reflections, transparency and adaptive anti-aliasing. However, the basis for all ray-tracing algorithms is versatile, allowing you to add new ray-tracing features easily (such as ambient occlusion). All ray-tracing computations are performed on the GPU using OpenCL framework, allowing real-time rendering performance. It is important to note, that real-time ray-tracing is possible using high-performance GPUs with support of OpenCL 1.1 and higher (such as NVIDIA GeForce 660 or ATI/AMD Radeon 7850). When using low-end GPUs (such as NVIDIA GeForce 640) the ray-tracing performance may slow down significantly. Therefore, even with NVIDIA GeForce 640 you can render scenes with the millions of triangles. The support of OpenCL-enabled CPUs and integrated graphics cards is not guaranteed.
63 lines
1.7 KiB
C++
Executable File
63 lines
1.7 KiB
C++
Executable File
#ifndef MDIWINDOW_H
|
|
#define MDIWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include "CommonSample.h"
|
|
|
|
class DocumentCommon;
|
|
class View;
|
|
|
|
class COMMONSAMPLE_EXPORT MDIWindow: public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MDIWindow( DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags, bool theRT = false );
|
|
MDIWindow( View* aView, DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags );
|
|
~MDIWindow();
|
|
|
|
DocumentCommon* getDocument();
|
|
void fitAll();
|
|
virtual QSize sizeHint() const;
|
|
|
|
#ifdef HAVE_OPENCL
|
|
|
|
void setRaytracedShadows( int state );
|
|
void setRaytracedReflections( int state );
|
|
void setRaytracedAntialiasing( int state );
|
|
|
|
bool ShadowsEnabled() { return myShadowsEnabled; }
|
|
bool ReflectionsEnabled() { return myReflectionsEnabled; }
|
|
bool AntialiasingEnabled() { return myAntialiasingEnabled; }
|
|
|
|
#endif
|
|
|
|
signals:
|
|
void selectionChanged();
|
|
void message(const QString&, int );
|
|
void sendCloseView(MDIWindow* theView);
|
|
|
|
public slots:
|
|
void closeEvent(QCloseEvent* e);
|
|
void onWindowActivated ();
|
|
void dump();
|
|
|
|
protected:
|
|
void createViewActions();
|
|
|
|
protected:
|
|
DocumentCommon* myDocument;
|
|
View* myView;
|
|
|
|
#ifdef HAVE_OPENCL
|
|
|
|
bool myShadowsEnabled;
|
|
bool myReflectionsEnabled;
|
|
bool myAntialiasingEnabled;
|
|
|
|
#endif
|
|
};
|
|
|
|
#endif
|
|
|