#include "Mainwindow.h"
Mainwindow::Mainwindow(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
mRender = mRenderComponent->CreateBasicRender();
ui.gridLayout->addWidget(mRender->widget);
{0.0, 0.0, 0.0}, {10.0, 0.0, 0.0}, {10.0, 10.0, 0.0}, {0.0, 10.0, 0.0},
{0.0, 0.0, 10.0}, {10.0, 0.0, 10.0}, {10.0, 10.0, 10.0}, {0.0, 10.0, 10.0},
{0.0, 0.0, 0.0}, {10.0, 0.0, 0.0}, {10.0, 0.0, 10.0}, {0.0, 0.0, 10.0},
{10.0, 10.0, 0.0}, {0.0, 10.0, 0.0}, {0.0, 10.0, 10.0}, {10.0, 10.0, 10.0},
{0.0, 0.0, 0.0}, {0.0, 10.0, 0.0}, {0.0, 10.0, 10.0}, {0.0, 0.0, 10.0},
{10.0, 0.0, 0.0}, {10.0, 10.0, 0.0}, {10.0, 10.0, 10.0}, {10.0, 0.0, 10.0}
};
{0.0, 0.0, -1.0}, {0.0, 0.0, -1.0}, {0.0, 0.0, -1.0}, {0.0, 0.0, -1.0},
{0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, {0.0, 0.0, 1.0},
{0.0, -1.0, 0.0}, {0.0, -1.0, 0.0}, {0.0, -1.0, 0.0}, {0.0, -1.0, 0.0},
{0.0, 1.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 1.0, 0.0},
{-1.0, 0.0, 0.0}, {-1.0, 0.0, 0.0}, {-1.0, 0.0, 0.0}, {-1.0, 0.0, 0.0},
{1.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 0.0, 0.0}
};
0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 0.0,
0.0, 0.0, 10.0, 10.0, 0.0, 10.0, 10.0, 10.0, 10.0, 0.0, 10.0, 10.0
};
{"index", {0, 1}}, {"index", {1, 2}}, {"index", {2, 3}}, {"index", {3, 0}},
{"index", {4, 5}}, {"index", {5, 6}}, {"index", {6, 7}}, {"index", {7, 4}},
{"index", {0, 4}}, {"index", {1, 5}}, {"index", {2, 6}}, {"index", {3, 7}}
};
{{{0, 2, 1}, {0, 3, 2}}, {0, 1, 2, 3}, 4, {{0.0, 0.0, -1.0}}, {}},
{{{4, 5, 6}, {4, 6, 7}}, {4, 5, 6, 7}, 4, {{0.0, 0.0, 1.0}}, {}},
{{{8, 9, 10}, {8, 10, 11}}, {8, 9, 10, 11}, 4, {{0.0, -1.0, 0.0}}, {}},
{{{12, 13, 14}, {12, 14, 15}}, {12, 13, 14, 15}, 4, {{0.0, 1.0, 0.0}}, {}},
{{{16, 18, 17}, {16, 19, 18}}, {16, 17, 18, 19}, 4, {{-1.0, 0.0, 0.0}}, {}},
{{{20, 21, 22}, {20, 22, 23}}, {20, 21, 22, 23}, 4, {{1.0, 0.0, 0.0}}, {}}
};
auto entity = mRender->entityFactory->FromCAXMeshInfo(cube);
mRender->entityManage->AddEntity(entity);
mRender->cameraManage->ResetCamera();
mRender->entityManage->DoRepaint();
}
Mainwindow::~Mainwindow()
{
}
Custom Mesh Data Structure
定义 CAXMeshInfo.h:39
std::vector< Face > faces
Face data collection
定义 CAXMeshInfo.h:46
std::vector< std::vector< double > > points
Point collection
定义 CAXMeshInfo.h:42
std::string id
Unique data ID
定义 CAXMeshInfo.h:41
std::vector< std::vector< double > > normals
Normal vector collection
定义 CAXMeshInfo.h:43
std::string category
Data type, e.g., "SHAPE", "POINT"
定义 CAXMeshInfo.h:40
Vertex vertex
Vertex data collection
定义 CAXMeshInfo.h:44
std::vector< Edge > edges
Edge data collection
定义 CAXMeshInfo.h:45
std::string topoType
Type, e.g., "point"
定义 CAXMeshInfo.h:16