ForCAX/entry/src/main/cpp/NativeEGLOCCT/NativeRender.h
2026-03-30 21:53:34 +08:00

65 lines
1.7 KiB
C++

#ifndef NATIVE_RENDER_H
#define NATIVE_RENDER_H
#include <string>
#include <vector>
#include "AIS_Shape.hxx"
#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 "V3d/V3dTri/V3dTri.h"
#include "V3d/V3dTri/V3dTriCube.h"
#include "V3d/V3dCa/V3dCa.h"
#include "V3d/V3dCtx/V3dCtx.h"
#include "V3d/V3dOGD/V3dOGD.h"
#include "V3d/V3dWin/V3dWin.h"
#include "V3d/V3dView/V3dView.h"
#include "V3d/V3dViewer/V3dViewer.h"
//TextLabel_Dev
#include <AIS_TextLabel.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 SwitchView(std::string);
void InitDevText();
private:
int width;
int height;
EGLCore eglCore;
V3dTri* v3dTri;
V3dTriCube* v3dTriCube;
V3dCa* v3dcr;
V3dCtx* v3dctx;
V3dOGD* v3dogd;
V3dDrawer* v3ddrawer;
V3dView* v3dview;
V3dViewer* v3dviewer;
V3dWin* v3dwin;
std::vector<Handle(AIS_Shape)> shapes_;
};
} // namespace NativeRender
#endif // NATIVE_RENDER_H