COLLADA2GLTF
COLLADA2GLTF copied to clipboard
Enforcing const methods?
In the spirit of functional programming and easy reasoning about code, I'm a big fan of marking as much as possible with const
.
I noticed that almost none of the GLTF methods are const. For example, TransformMatrix::isIdentity()
is non-const, although it clearly must be. This means that in my own classes, when I have a const TransformMatrix
variable, I now either have to make a copy, or mark it non-const.
What is your opinion about const
?
Thanks, Peter Verswyvelen
I think typically best practice is to make things const wherever they can be. I was more focused on getting the 2.0 converter done than making a perfect API, but I think especially if we are interested in splitting out the C++ glTF code as a library that this would be good to tighten up.