hello , I'm creating an application witch import .obj files and read it with customized data structure . now I want to convert the read data to gtsSurface to use gts Simplification . any help or useful links?
GtsSurface* Mesh::TO_gts(GtsSurface* s) { for( auto CMFace : HEF ) { GtsVertex* v1=gts_vertex_new(s->vertex_class,CMFace->edge->cMVertex->vertex.x,CMFace->edge->cMVertex->vertex.y,CMFace->edge->cMVertex->vertex.z); GtsVertex* v2=gts_vertex_new(s->vertex_class,CMFace->edge->next->cMVertex->vertex.x,CMFace->edge->next->cMVertex->vertex.y,CMFace->edge->next->cMVertex->vertex.z); GtsVertex* v3 = gts_vertex_new(s->vertex_class,CMFace->edge->next->next->cMVertex->vertex.x,CMFace->edge->next->next->cMVertex->vertex.y,CMFace->edge->next->next->cMVertex->vertex.z); GtsEdge* e1 = gts_edge_new (s->edge_class,v1, v2); GtsEdge* e2 = gts_edge_new (s->edge_class,v1, v3); GtsEdge* e3 = gts_edge_new (s->edge_class,v3, v2); GtsFace * f = gts_face_new (s->face_class,e1, e2, e3); gts_surface_add_face (s, f); return s; }
and this conversion try doesn't work
Log in to post a comment.
and this conversion try doesn't work
Last edit: nourhan 2021-02-09