84 lines
2.3 KiB
C++
84 lines
2.3 KiB
C++
//
|
|
// Created on 2026/3/6.
|
|
//
|
|
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
|
|
// please include "napi/native_api.h".
|
|
|
|
#ifndef OPENCAX_REDCOMMON_H
|
|
#define OPENCAX_REDCOMMON_H
|
|
|
|
#include "common.h"
|
|
#include <cstdio>
|
|
#include <cmath>
|
|
#include <EGL/egl.h>
|
|
#include <GLES3/gl3.h>
|
|
#include <OpenGl_GraphicDriver.hxx>
|
|
#include <V3d_View.hxx>
|
|
#include <V3d_Viewer.hxx>
|
|
#include <Font_NameOfFont.hxx>
|
|
#include <Aspect_NeutralWindow.hxx>
|
|
#include <Aspect_TypeOfTriedronPosition.hxx>
|
|
#include <Geom_Axis2Placement.hxx>
|
|
#include <OpenGl_Window.hxx>
|
|
#include <OSD_Environment.hxx>
|
|
#include <AIS_Shape.hxx>
|
|
#include <AIS_Trihedron.hxx>
|
|
#include <AIS_InteractiveObject.hxx>
|
|
#include <AIS_InteractiveContext.hxx>
|
|
#include <Prs3d_Drawer.hxx>
|
|
#include <Prs3d_TextAspect.hxx>
|
|
#include <Prs3d_ShadingAspect.hxx>
|
|
#include <Graphic3d_ZLayerSettings.hxx>
|
|
#include <Graphic3d_GraphicDriver.hxx>
|
|
#include <Graphic3d_MaterialAspect.hxx>
|
|
#include <Graphic3d_NameOfMaterial.hxx>
|
|
#include <Graphic3d_TextureEnv.hxx>
|
|
#include <BRepBndLib.hxx>
|
|
#include <BRepBuilderAPI_Transform.hxx>
|
|
#include <BRepPrimAPI_MakeBox.hxx>
|
|
#include <BRepPrimAPI_MakeSphere.hxx>
|
|
#include <BRepPrimAPI_MakeCylinder.hxx>
|
|
#include <V3d_TypeOfOrientation.hxx>
|
|
#include "EGLCore.h"
|
|
|
|
#include <STEPControl_Reader.hxx>
|
|
|
|
namespace NativeOpenCAX {
|
|
|
|
struct RenderOption{
|
|
int width;
|
|
int height;
|
|
Quantity_Color clearColor;
|
|
EGLCore* eglCore;
|
|
Handle(OpenGl_GraphicDriver) graphicDriver;
|
|
Handle(Aspect_DisplayConnection) displayConnection;
|
|
Handle(Aspect_NeutralWindow) window;
|
|
Handle(V3d_Viewer) viewer;
|
|
Handle(V3d_View) view;
|
|
Handle(Graphic3d_Camera) camera;
|
|
Handle(AIS_InteractiveContext) context;
|
|
Handle(Prs3d_TextAspect) text;
|
|
Handle(Geom_Axis2Placement) worldAxisPlacement;
|
|
Handle(Geom_Axis2Placement) localAxisPlacement;
|
|
Handle(AIS_Trihedron) worldAxis;
|
|
Handle(AIS_Trihedron) localAxis;
|
|
};
|
|
struct AxisOption{
|
|
//旋转X轴
|
|
float rotationX=0.0f;
|
|
//旋转Y轴
|
|
float rotationY=0.0f;
|
|
//旋转Z轴
|
|
float rotationZ=0.0f;
|
|
//缩放等级
|
|
float zoomLevel=1.0f;
|
|
//翻转X轴
|
|
float translationX=0.0f;
|
|
//翻转Y轴
|
|
float translationY=0.0f;
|
|
//翻转Z轴
|
|
float translationZ=0.0f;
|
|
};
|
|
}
|
|
#endif //OPENCAX_REDCOMMON_H
|