OpenCAX/entry/src/main/cpp/NativeEGLOCCT/NativeRender.h

80 lines
2.1 KiB
C++

#ifndef NATIVE_RENDER_H
#define NATIVE_RENDER_H
#include <string>
#include <vector>
#include "AIS_Shape.hxx"
#include "NativeEGLOCCT/Window/Window.h"
#include "common.h"
#include "EGLCore.h"
#include <Standard_Handle.hxx>
#include <gp_Trsf.hxx>
#include <gp_EulerSequence.hxx>
#include <gp_Quaternion.hxx>
#include <BRepBndLib.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include "Axis/Axis.h"
#include "Camera/Camera.h"
#include "Context/Context.h"
#include "OGD/OpenGLGraphicDriver.h"
#include "TextStyle/TextStyle.h"
#include "View/View.h"
#include "Viewer/Viewer.h"
#include "Viewer/Viewer.h"
#include <native_drawing/drawing_font_collection.h>
#include <native_drawing/drawing_text_typography.h>
#include <native_drawing/drawing_register_font.h>
#include <Font_FontMgr.hxx>
#include <AIS_TextLabel.hxx>
#include <Resource_Unicode.hxx>
namespace NativeOpenCAX {
class NativeRender {
public:
NativeRender(int width, int height);
~NativeRender();
bool init(EGLCore& eglCore);
bool loadModel(const std::string& filePath);
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);
void setCameraRotationMode(bool state);
void fontDev();
//视图
void SwitchView(std::string);
void SetFrontView();
void SetTopView();
void SetLeftSideView();
void SetRightSideView();
void SetBottomView();
void SetRearView();
void SetISOView();
void SetDIMView();
private:
int width;
int height;
EGLCore eglCore;
Axis* mAxis;
Axis* nAxis;
Camera* cr;
Context* ctx;
OpenGlGraphicDriver* ogd;
TextStyle* ts;
View* vw;
Viewer* vr;
Window* win;
std::vector<Handle(AIS_Shape)> shapes_;
};
} // namespace NativeRender
#endif // NATIVE_RENDER_H