MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / ply_add_element

Function ply_add_element

src/IO/rply.c:482–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482int ply_add_element(p_ply ply, const char *name, long ninstances) {
483 p_ply_element element = NULL;
484 assert(ply && ply->fp && ply->io_mode == PLY_WRITE);
485 assert(name && strlen(name) < WORDSIZE && ninstances >= 0);
486 if (strlen(name) >= WORDSIZE || ninstances < 0) {
487 ply_ferror(ply, "Invalid arguments");
488 return 0;
489 }
490 element = ply_grow_element(ply);
491 if (!element) return 0;
492 strcpy(element->name, name);
493 element->ninstances = ninstances;
494 return 1;
495}
496
497int ply_add_scalar_property(p_ply ply, const char *name, e_ply_type type) {
498 p_ply_element element = NULL;

Callers 3

Calls 2

ply_ferrorFunction · 0.85
ply_grow_elementFunction · 0.85

Tested by

no test coverage detected