OpenCAX/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/Render.h

63 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 <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/V3dCamera/V3dCamera.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 Render {
public:
Render(int width, int height);
~Render();
bool init(EGLDisplay eglDisp,EGLContext ctx,EGLConfig eglConfig);
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;
V3dTri* v3dTri;
V3dTriCube* v3dTriCube;
V3dCamera* v3dCamera;
V3dCtx* v3dCtx;
V3dOGD* v3dOgd;
V3dDrawer* v3dDrawer;
V3dView* v3dView;
V3dViewer* v3dViewer;
V3dWin* v3dWin;
std::vector<Handle(AIS_Shape)> shapes_;
};
} // namespace NativeRender
#endif // NATIVE_RENDER_H