ForCAX/entry/src/main/cpp/NativeEGLOCCT/Visualization/Drawer/V3dDrawer.h
JackLee 45176b5d7e 1-调整部分UI组件
2-调整背景颜色为有限度透明

提醒:OpenCAX由于商标已经被注册,所以本软件即日起改名NXEA
2026-04-28 21:57:30 +08:00

68 lines
3.2 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Created on 2026/3/30.
//
// 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_V3DDRAWER_H
#define OPENCAX_V3DDRAWER_H
#include "AIS_InteractiveContext.hxx"
#include "NativeEGLOCCT/common.h"
#include "PrsMgr_PresentationManager.hxx"
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Prs3d_PlaneAspect.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_DatumAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
namespace NativeNXEA{
class V3dDrawer {
public:
V3dDrawer();
~V3dDrawer();
bool InitV3dAllAspect(Handle(AIS_InteractiveContext)& ctx);
private:
void InitV3dDrawer();
void InitV3dIsoAspectOpts();
void InitV3dLineAspectOpts();
void InitV3dTextAspectOpts();
void InitV3dShadingAspectOpts();
void InitV3dPlaneAspectOpts();
void InitV3dArrowAspectOpts();
void InitV3dDatumAspectOpts();
void InitV3dDimAspectOpts();
public:
Handle(Prs3d_Drawer) drawer;
//曲面上等参线:颜色、线型(实线、虚线等)、线宽。
Handle(Prs3d_IsoAspect) v3d_IsoAspect;
//直线和线段的基本外观。这包括模型的边缘线、轴线、构造线
//颜色、线型、线宽。
Handle(Prs3d_LineAspect) v3d_LineAspect;
//定义文本的外观。例如,在模型旁边添加的标签、注释或尺寸数值等
//文本颜色、字体名称、字体大小、文本样式(粗体、斜体等)、文本方向
Handle(Prs3d_TextAspect) v3d_TextAspect;
//用于定义实体模型表面在着色模式下的外观。它决定了物体的填充颜色和材质特性
//前后表面颜色、材料属性(如环境光、漫反射、镜面反射系数)、线框/着色模式
Handle(Prs3d_ShadingAspect) v3d_ShadingAspect;
//用于定义平面的外观。例如,在可视化中表示一个无限大的平面对象或坐标系中的参考平面
//平面边界线的样式LineAspect、平面填充的样式InteriorStyle如网格、阴影等、颜色
Handle(Prs3d_PlaneAspect) v3d_PlaneAspect;
//用于定义箭头的外观。例如,向量的方向指示、坐标轴的箭头、尺寸标注的引出线箭头等
//箭头的样式(实心三角形、空心、线条等)、颜色、大小。
Handle(Prs3d_ArrowAspect) v3d_ArrowAspect;
//用于定义基准Datum的外观。在 CAD/CAM 和工程图纸中,基准是用于测量和定位的参考元素,如基准点、基准线、基准面。这个 Aspect 专门用来设置这些特殊参考元素的显示样式
//通常包含定义基准符号、线条、文本等组合元素的样式。
Handle(Prs3d_DatumAspect) v3d_DatumAspect;
//用于定义尺寸标注Dimension的外观。如上一个问题所述它控制着尺寸线、延伸线、箭头、文本等尺寸标注所有组成部分的视觉表现。
//尺寸线颜色/样式、文本颜色/字体、箭头样式、公差显示格式等。
Handle(Prs3d_DimensionAspect) v3d_DimAspect;
};
}
#endif //OPENCAX_V3DDRAWER_H