| | |
| | | if ((!xmlStrcmp(child->name, (const xmlChar *)"tristar"))){ |
| | | parseTrisurfTristar(vesicle, doc, child); |
| | | } |
| | | if ((!xmlStrcmp(child->name, (const xmlChar *)"nucleus"))){ |
| | | parseTrisurfNucleus(vesicle, doc, child); |
| | | } |
| | | if ((!xmlStrcmp(child->name, (const xmlChar *)"constant_volume"))){ |
| | | parseTrisurfConstantVolume(doc, child); |
| | | } |
| | | if ((!xmlStrcmp(child->name, (const xmlChar *)"constant_area"))){ |
| | | parseTrisurfConstantArea(doc, child); |
| | | } |
| | | |
| | | |
| | | child = child->next; |
| | | } |
| | |
| | | |
| | | |
| | | /* Low level tags parsers */ |
| | | ts_bool parseTrisurfConstantVolume(xmlDocPtr doc, xmlNodePtr cur){ |
| | | xmlChar *cvol = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
| | | char *n=(char *)cvol; |
| | | V0=atof(n); |
| | | xmlFree(cvol); |
| | | return TS_SUCCESS; |
| | | } |
| | | ts_bool parseTrisurfConstantArea(xmlDocPtr doc, xmlNodePtr cur){ |
| | | xmlChar *carea = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
| | | char *n=(char *)carea; |
| | | A0=atof(n); |
| | | xmlFree(carea); |
| | | return TS_SUCCESS; |
| | | } |
| | | |
| | | ts_bool parseTrisurfNucleus(ts_vesicle *vesicle, xmlDocPtr doc, xmlNodePtr cur){ |
| | | xmlChar *coords = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
| | | char *n=(char *)coords; |
| | | char *token=strtok(n," "); |
| | | ts_uint i; |
| | | for(i=0;i<3;i++){ |
| | | vesicle->nucleus_center[i]=atof(token); |
| | | token=strtok(NULL," "); |
| | | } |
| | | xmlFree(coords); |
| | | return TS_SUCCESS; |
| | | } |
| | | |
| | | ts_bool parseTrisurfVtxn(ts_vertex_list *vlist, xmlDocPtr doc, xmlNodePtr cur){ |
| | | |