[of-dev] glm

Elliot Woods elliot at kimchiandchips.com
Mon Mar 28 10:39:13 PDT 2016

I hope we figure this out

The current vector math has given me nightmares
You never know when it's going to fail. Which cans drive you insane as you
don't know if it's you or the library that's wrong
Simple inversions often go crazy, and the API is totally asymmetrical right
So if ofMatrix3x3 got to that standard... Then it would still be horrifying

One suggestion is we should move to:
1. using glm internally in ofVec*, etc. Use glm for calculating the math
2. Use glm universally as arguments/returns in our API
3. Auto convert between the two (without toOf/toGlm, even if that means
making a copy when it's a vector)

I.e. a side by side approach with glm being the core usage, and ofVec*
being 'utility classes' (optimised for keeping past styles, not speed)

(Maybe that's what's on the table already?)


On Mon, 28 Mar 2016 at 23:11, arturo castro <arturo at openframeworks.cc>

> > Call me old-fashioned, but I prefer the last option, with separate
> explicit functions for degrees and radians. It's ultra-clear and it doesn't
> require creating a new Angle class.  Introductory students will appreciate
> the lack of ambiguity.
> >
> Yes i also think it might be the easiest/simplest. the angle class would
> have some advantages if it was something standard but being only in the
> OF calls it won't make much difference anyway.
> > I would be much more in favor of an approach that let you easily convert
> ofVec3f and a vector of ofVec3f to glm::vec3. I think making it available
> to advanced users more in the way addons are available makes more sense
> that swapping the whole vector math API in one big go.
> This is already there, or do you mean not using glm at all in the core
> and still use ofVec3f?
> >
> > I think it could still make sense to take the steps of making angle
> arguments clear.  We already have ofGetAngleDifferenceDegrees and
> ofGetAngleDifferenceRadians so ofRotateDegrees etc fits
> Makes sense although those 2 are actually useless since the current
> implementation is unit independent :) we just keep them cause at some
> point it wasn't
> >
> > I know our current vector math is not perfect but whatever we do we are
> going to need to rely on it for a while longer, so we could take a look at
> fixing the things which don't work or are confusing and bring the matrix3x3
> class up to par with the 4x4
> Who's going to fix and maintain ofMatrix3x3 an 4x4 and in general the
> whole vector math code? i think it's the kind of code that it's way out
> of our scope it's been unmaintained for years and i doubt anybody is
> going to fix it, much less maintain it over time. glm has some issues,
> mainly differences with how we are used to do things right now but it's
> kind of a standard so i think it's probably the best choice going forward.
> _______________________________________________
> of-dev mailing list
> of-dev at dev.openframeworks.cc
> http://dev.openframeworks.cc/listinfo.cgi/of-dev-openframeworks.cc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.openframeworks.cc/pipermail/of-dev-openframeworks.cc/attachments/20160328/85d88459/attachment.htm>

More information about the of-dev mailing list