#ifndef NATIVE_RENDER_H #define NATIVE_RENDER_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "common.h" #include #include "EGLCore.h" class Aspect_Window; class gp_Quaternion; class Graphic3d_Camera; namespace NativeOpenCAX { class NativeRender { public: NativeRender(); ~NativeRender(); bool init(int width, int height,EGLCore* eglCore); bool loadModel(const std::string& filePath); void loadDefaultModel(); void render(); void resize(int width, int height); void setRotation(float xAngle, float yAngle); void resetView(); void setClearColor(float r, float g, float b, float a); void setZoomLevel(float zoom); void setTranslation(float x, float y); private: void initViewer(); void initContext(); void initView(); void initTextStyle(); // Bind existing EGL display/context to OCCT OpenGl driver //void loadDefaultModel(); EGLCore* eglCore_; Handle(OpenGl_GraphicDriver) graphicDriver_; Handle(V3d_Viewer) viewer_; Handle(V3d_View) view_; Handle(AIS_InteractiveContext) context_; Handle(Prs3d_TextAspect) text_; std::vector shapes_; float rotationX_; float rotationY_; float zoomLevel_; int width_; int height_; float translationX_; float translationY_; Quantity_Color clearColor_; }; } // namespace NativeRender #endif // NATIVE_RENDER_H