g-truc / glm

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

is glm::cubic broken? #1284

Open perkele1989 opened 4 months ago

perkele1989 commented 4 months ago

From gtx splines

I assume it's intended to be used like catmullRom, however given the same parameters it shows unexpected(?) results.

example for cubic, running code glm::cubic(prevHexPos, currHexPos, nextHexPos, nextNextHexPos, ii) image

example for catmullRom, running code glm::catmullRom(prevHexPos, currHexPos, nextHexPos, nextNextHexPos, ii) image

they are both passed the exact same valid positional vectors. The lines drawn seem to point from the correct origin, however the target seems to be off in the distance somewhere away from the world origin (seems to be complete opposite direction of origin, so maybe the resulting vector is scaled somehow?)

I don't remember exact version of glm but I think its 1.0.1.