mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add triangle vcm shape - 'tri'
This commit is contained in:
parent
97d2623a06
commit
79bf3a0f2c
5 changed files with 72 additions and 0 deletions
|
|
@ -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)) {
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue