void Collision::AddPoint(float v[3]){ let base = DT_NewVertexBase (v, 0); let shape= DT_NewComplexShape (base); //どうにもsetShapeしても木は構築されない、sample // //solid-3.5.7\src\complex\DT_BBoxTree //DT_Complex DT_VertexRange (0, 1); DT_EndComplexShape (); DT_Begin (); DT_Vertex (v); DT_End (); }
DT_ShapeHandle Shape::create(const SoMFVec3f& point, const SoMFInt32& coordIndex) { DT_ShapeHandle shape = DT_NewComplexShape(NULL); DT_Vector3 vertex; if (coordIndex.getNum() > 0) { DT_Begin(); } for (int i = 0; i < coordIndex.getNum(); ++i) { if (SO_END_FACE_INDEX == coordIndex[i]) { DT_End(); if (i < coordIndex.getNum() - 1) { DT_Begin(); } } else { vertex[0] = point[coordIndex[i]][0]; vertex[1] = point[coordIndex[i]][1]; vertex[2] = point[coordIndex[i]][2]; DT_Vertex(vertex); } } DT_EndComplexShape(); return shape; }