[x3d-public] HAnim Joints, Segments, Sites DEF substitution algorithm
John Carlson
yottzumm at gmail.com
Thu Sep 14 18:10:14 PDT 2023
I'm stumped for a while. I need to talk to a teddy bear.
I'd like to prefix all the DEFs for my HAnimJoints, HAnimSites, and
HAnimSegments and all references to them with a prefix, say "Senior_"
Right now, I loop through the file, pulling in all HAnim DEF values into a
HashMap, mapped from old DEF value to new DEF value. Then I examine each
line, trying to substitute the "word" or occurrence of an old DEF value to
the new DEF value. I have a little loop that goes through the whole hash
map for each line. It is extremely slow.
I have thought of storing patterns in the hash map, but I've not done that
before.
Perhaps I should code this up in Rust or C? Does someone know a good
native hash map implementation for Rust/C/C++ or something as fast?
Thanks!
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230914/6b993693/attachment.html>
More information about the x3d-public
mailing list