3d 以编程方式创建(门的)三维模型
我必须使用各种方法生成门的三维模型:3d 以编程方式创建(门的)三维模型,3d,3d,我必须使用各种方法生成门的三维模型: 组件(榫头,45度) 框架 面板 如果我有2个部件、10种框架类型和10种面板类型,我必须生成200个模型。我选择忽略影响外观的其他参数(木纹方向、木材种类、纹理…) 我使用three.js构建了一个简化的原型。由于没有这类工作的经验,我想知道,考虑到以下情况,启动该项目的最佳方式是什么: 模型将生成一次(服务器端,即非动态) 所有门的尺寸都相同 我想输入框架和面板边缘的二维模型,然后“挤出”形状 最后,我想克隆门模型并调整其大小,以便将其放置在厨房的三维模
// Alternative, more compact, method for adding a single vertex
ivp[3]= &*vcg::tri::Allocator<MyMesh>::AddVertex(m,MyMesh::CoordType ( 1.0, 1.0, 0.0));
// Alternative, more compact, method for adding a single face (once you have the vertex pointers)
vcg::tri::Allocator<MyMesh>::AddFace(m, ivp[1],ivp[0],ivp[3]);
//用于添加单个顶点的替代、更紧凑的方法
ivp[3]=&*vcg::tri::Allocator::AddVertex(m,MyMesh::CoordType(1.0,1.0,0.0));
//另一种更紧凑的方法,用于添加单个面(一旦有了顶点指针)
vcg::tri::分配器::AddFace(m,ivp[1],ivp[0],ivp[3]);
应该为您工作,它是一个用于Visual和计算机图形的C++库。请查看its和关于如何使用该库的
示例中trimesh_allocate.cpp的示例代码,用于添加顶点和面
// Alternative, more compact, method for adding a single vertex
ivp[3]= &*vcg::tri::Allocator<MyMesh>::AddVertex(m,MyMesh::CoordType ( 1.0, 1.0, 0.0));
// Alternative, more compact, method for adding a single face (once you have the vertex pointers)
vcg::tri::Allocator<MyMesh>::AddFace(m, ivp[1],ivp[0],ivp[3]);
//用于添加单个顶点的替代、更紧凑的方法
ivp[3]=&*vcg::tri::Allocator::AddVertex(m,MyMesh::CoordType(1.0,1.0,0.0));
//另一种更紧凑的方法,用于添加单个面(一旦有了顶点指针)
vcg::tri::分配器::AddFace(m,ivp[1],ivp[0],ivp[3]);
您使用什么语言using@TGKL我对C语言、C++、java、PHP、JS都很好……你是什么语言?using@TGKL我对C语言、C++、java、PHP、JS都很好。