55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
//
|
|
// Created on 2026/3/23.
|
|
//
|
|
// 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_AXIS_H
|
|
#define OPENCAX_AXIS_H
|
|
|
|
#include "AIS_ViewCube.hxx"
|
|
#include "NativeEGLOCCT/common.h"
|
|
#include <AIS_Trihedron.hxx>
|
|
#include <AIS_InteractiveContext.hxx>
|
|
#include <Geom_Axis2Placement.hxx>
|
|
|
|
namespace NativeOpenCAX {
|
|
|
|
class Axis {
|
|
public:
|
|
Axis();
|
|
~Axis();
|
|
bool InitAxis(Handle(AIS_InteractiveContext)& context);
|
|
bool InitAxisCube(Handle(AIS_InteractiveContext) & context,Handle(Prs3d_TextAspect) _textStyle);
|
|
void SetRotationX(float x);
|
|
void SetRotationY(float y);
|
|
void SetRotationZ(float z);
|
|
void SetTranslationX(float x);
|
|
void SetTranslationY(float y);
|
|
void SetTranslationZ(float z);
|
|
void SetZoomLevel(float level);
|
|
private:
|
|
Handle(Geom_Axis2Placement) axiPlacement;
|
|
Handle(AIS_Trihedron) axiTrihedron;
|
|
//定义三面体
|
|
Handle(AIS_ViewCube) axiViewCube;
|
|
private:
|
|
//旋转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_AXIS_H
|