MCPcopy Create free account
hub / github.com/assimp/assimp / ReadTriangle

Function ReadTriangle

code/AssetLib/3MF/XmlSerializer.cpp:69–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69aiFace ReadTriangle(XmlNode &node, int &texId0, int &texId1, int &texId2) {
70 aiFace face;
71
72 face.mNumIndices = 3;
73 face.mIndices = new unsigned int[face.mNumIndices];
74 face.mIndices[0] = static_cast<unsigned int>(std::atoi(node.attribute(XmlTag::v1).as_string()));
75 face.mIndices[1] = static_cast<unsigned int>(std::atoi(node.attribute(XmlTag::v2).as_string()));
76 face.mIndices[2] = static_cast<unsigned int>(std::atoi(node.attribute(XmlTag::v3).as_string()));
77
78 texId0 = texId1 = texId2 = IdNotSet;
79 XmlParser::getIntAttribute(node, XmlTag::p1, texId0);
80 XmlParser::getIntAttribute(node, XmlTag::p2, texId1);
81 XmlParser::getIntAttribute(node, XmlTag::p3, texId2);
82
83 return face;
84}
85
86aiVector3D ReadVertex(XmlNode &node) {
87 aiVector3D vertex;

Callers 1

ImportTrianglesMethod · 0.85

Calls 2

as_stringMethod · 0.80
attributeMethod · 0.45

Tested by

no test coverage detected