g-truc / glm

OpenGL Mathematics (GLM)
https://glm.g-truc.net
Other
9.15k stars 2.12k forks source link

public matrix member variables #714

Closed KageKirin closed 6 years ago

KageKirin commented 6 years ago

Hello again,

col_type mat<>::value[] is set explicitly to be private. Is there any technical reason for this, besides forcing the user to use the operator[] to access the sub-vectors?

I.e. in my case, I wrote a parser for all glm vector, quaternion and matrix types, and being able to directly access the matrix column-vectors greatly simplifies the parser code.

(Full disclosure: the parser is part of an internally developed game engine, and is based on boost.spirit.x3, which is relatively easy to use on variables, but pretty nasty when it comes to having to call functions in order to set a variable).

Your opinions, please.

Cheers.

Groovounet commented 6 years ago

Answered in PR #724