mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-01 10:26:12 +03: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.
77 lines
2.4 KiB
C++
Executable File
77 lines
2.4 KiB
C++
Executable File
#ifndef DOCUMENTCOMMON_H
|
|
#define DOCUMENTCOMMON_H
|
|
|
|
#include "MDIWindow.h"
|
|
//#include "IESample.h"
|
|
|
|
#include <QObject>
|
|
#include <QList>
|
|
|
|
#include <AIS_InteractiveContext.hxx>
|
|
#include <V3d_Viewer.hxx>
|
|
|
|
class ApplicationCommonWindow;
|
|
|
|
class COMMONSAMPLE_EXPORT DocumentCommon : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
DocumentCommon( const int, ApplicationCommonWindow* );
|
|
~DocumentCommon();
|
|
|
|
ApplicationCommonWindow* getApplication();
|
|
Handle(AIS_InteractiveContext) getContext();
|
|
void removeView( MDIWindow* );
|
|
void removeViews();
|
|
int countOfWindow();
|
|
void fitAll();
|
|
|
|
protected:
|
|
virtual MDIWindow* createNewMDIWindow( bool theRT = false );
|
|
|
|
signals:
|
|
void selectionChanged();
|
|
void sendCloseDocument( DocumentCommon* );
|
|
|
|
public slots:
|
|
virtual void onCloseView( MDIWindow* );
|
|
virtual void onCreateNewView( bool theRT = false );
|
|
virtual void onMaterial();
|
|
virtual void onMaterial( int );
|
|
virtual void onDelete();
|
|
|
|
#ifdef HAVE_OPENCL
|
|
virtual void onShadows( int state );
|
|
virtual void onReflections( int state );
|
|
virtual void onAntialiasing( int state );
|
|
#endif
|
|
|
|
void onWireframe();
|
|
void onShading();
|
|
void onColor();
|
|
void onTransparency();
|
|
void onTransparency( int );
|
|
|
|
private:
|
|
Handle(V3d_Viewer) Viewer( const Standard_CString aDisplay,
|
|
const Standard_ExtString aName,
|
|
const Standard_CString aDomain,
|
|
const Standard_Real ViewSize,
|
|
const V3d_TypeOfOrientation ViewProj,
|
|
const Standard_Boolean ComputedMode,
|
|
const Standard_Boolean aDefaultComputedMode );
|
|
|
|
protected:
|
|
ApplicationCommonWindow* myApp;
|
|
QList<MDIWindow*> myViews;
|
|
Handle(V3d_Viewer) myViewer;
|
|
Handle(AIS_InteractiveContext) myContext;
|
|
int myIndex;
|
|
int myNbViews;
|
|
};
|
|
|
|
#endif
|
|
|
|
|