add triangle vcm shape - 'tri'

This commit is contained in:
MihailRis 2026-01-05 15:09:19 +03:00
parent 97d2623a06
commit 79bf3a0f2c
5 changed files with 72 additions and 0 deletions

View file

@ -105,6 +105,19 @@ glm::vec4 Attribute::asColor() const {
}
}
int Attribute::asNumbers(float* dst, size_t dstSize) const {
size_t pos = 0;
size_t count = 0;
while (pos < text.length() && count < dstSize) {
size_t end = text.find(',', pos);
dst[count++] = util::parse_double(
text, pos, std::min<size_t>(end - pos, text.length() - pos)
);
pos = end + 1;
}
return count;
}
Node::Node(std::string tag) : tag(std::move(tag)) {
}