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

Function ply_parser_call_back

src/IO/PLYParser.cpp:34–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 }
33
34 int ply_parser_call_back(p_ply_argument argument) {
35 p_ply_element elem;
36 p_ply_property prop;
37 const char* elem_name;
38 const char* prop_name;
39 PLYParser* parser;
40 long prop_len;
41 long value_idx;
42
43 assert_success(ply_get_argument_element(argument, &elem, NULL));
44 assert_success(ply_get_argument_property(argument, &prop, &prop_len, &value_idx));
45 assert_success(ply_get_element_info(elem, &elem_name, NULL));
46 assert_success(ply_get_property_info(prop, &prop_name, NULL, NULL, NULL));
47 assert_success(ply_get_argument_user_data(argument, (void**)&parser, NULL));
48
49 Float value = ply_get_argument_value(argument);
50
51 if (value_idx >= 0)
52 parser->add_property_value(elem_name, prop_name, value);
53 return 1;
54 }
55
56 void parse_ply(const std::string& filename, PLYParser* parser) {
57 p_ply ply = ply_open(filename.c_str(), NULL, 0, NULL);

Callers

nothing calls this directly

Calls 8

ply_get_argument_elementFunction · 0.85
ply_get_element_infoFunction · 0.85
ply_get_property_infoFunction · 0.85
ply_get_argument_valueFunction · 0.85
add_property_valueMethod · 0.80
assert_successFunction · 0.70

Tested by

no test coverage detected