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

32 lines
1005 B
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".
#include "LocalAxis.h"
#ifndef NATIVE_TAG
#define NATIVE_TAG "InitLocalAxis"
#endif
namespace NativeOpenCAX {
bool InitLocalAxis(RenderOption& opt) {
if (opt.localAxisPlacement.IsNull()) {
// 创建场景中心参考坐标系
opt.localAxisPlacement = new Geom_Axis2Placement(gp::XOY());
opt.localAxis = new AIS_Trihedron(opt.localAxisPlacement);
opt.localAxis->SetSize(50.0);
opt.localAxis->SetDatumPartColor(Prs3d_DP_XAxis,Quantity_NOC_RED);
opt.localAxis->SetDatumPartColor(Prs3d_DP_YAxis,Quantity_NOC_GREEN);
opt.localAxis->SetDatumPartColor(Prs3d_DP_ZAxis,Quantity_NOC_BLUE);
opt.context->Display(opt.localAxis, 0, 0, true);
HILOG_INFO(NATIVE_TAG,"InitLocalAxis Done");
return true;
}
return false;
}
void ChangeLocalAxis() {
}
}