#include "stdafx.h"
#include <gtest/gtest.h>
#include <Algorithm/IntersectionMesh.h>
#include "GMath/GVec3.h"
#include <vector>
using namespace ggp;
const int num_TestCase = 2;
const int num_xyz = 24;
// Box顶点的xyz信息
float Box[num_TestCase][num_xyz] = {
{ 10001.0, 0.0, -1000.0, -1.0, 0.0, -1000.0, -1.0, 10001.0, -1000.0, 10001.0, 10001.0, -1000.0,
10000.0, 0.0, 1000.0, 0.0, 0.0, 1000.0, 0.0, 10000.0, 1000.0, 10000.0, 10000.0, 1000.0},
{ 10001.0, 0.0, -1000.0, -1.0, 0.0, -1000.0, -1.0, 10001.0, -1000.0, 10001.0, 10001.0, -1000.0,
10000.0, 0.0, 1000.0, 0.0, 0.0, 1000.0, 0.0, 10000.0, 1000.0, 10000.0, 10000.0, 1000.0}};
// 创建一个三角网
template <typename T>
void CreateMesh(vector<CVec3<T>> & meshVertexs, vector<TriFace> & meshFaces)
{
meshVertexs.clear();
meshFaces.clear();
// 点的xyz坐标,每3个代表一个顶点
T pntsXYZ[] = { 500.0, -500.0, -500.0, -500.0, 500.0, -500.0, 500.0, 500.0, -500.0, 500.0, -500.0, 500.0, -500.0, 500.0, 500.0, 500.0, 500.0, 500.0 };
unsigned int faceVIdx[] = { 0,1,2, 4,3,5, 2,4,5, 4,2,1, 3,2,5, 2,3,0}; // 每三个代表一个面,分别对应点的 ID
for(int
框选测试用例架构设计
最新推荐文章于 2021-07-23 00:18:44 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)