ForCAX/entry/src/main/cpp/NativeEGLOCCT/NativeRender.h
JackLee 406cd03b02 增加两个模型
修改世界坐标系
测试鼠标旋转相机
2026-03-07 18:46:12 +08:00

45 lines
1.1 KiB
C++

#ifndef NATIVE_RENDER_H
#define NATIVE_RENDER_H
#include <string>
#include <vector>
#include "common.h"
#include "EGLCore.h"
#include <Standard_Handle.hxx>
#include "Context/Context.h"
#include "Camera/Camera.h"
#include "Axis/WorldAxis.h"
#include "Axis/LocalAxis.h"
#include "OpenGLGraphicDriver/OpenGLGraphicDriver.h"
#include "TextStyle/TextStyle.h"
#include "View/View.h"
#include "Viewer/Viewer.h"
#include <gp_Trsf.hxx>
#include <gp_EulerSequence.hxx>
#include <gp_Quaternion.hxx>
namespace NativeOpenCAX {
class NativeRender {
public:
NativeRender();
~NativeRender();
bool init(int width, int height,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);
private:
RenderOption rendOption;
AxisOption axis;
std::vector<Handle(AIS_Shape)> shapes_;
};
} // namespace NativeRender
#endif // NATIVE_RENDER_H