{"action":"created","issue":{"url":"https://api.github.com/repos/ejmahler/SplineLibrary/issues/3","labels_url":"https://api.github.com/repos/ejmahler/SplineLibrary/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ejmahler/SplineLibrary/issues/3/comments","events_url":"https://api.github.com/repos/ejmahler/SplineLibrary/issues/3/events","html_url":"https://github.com/ejmahler/SplineLibrary/issues/3","id":128532183,"number":3,"title":"Where can I find example code?","user":{"login":"Mviljamaa","id":1913544,"avatar_url":"https://avatars.githubusercontent.com/u/1913544?v=3","gravatar_id":"","url":"https://api.github.com/users/Mviljamaa","html_url":"https://github.com/Mviljamaa","followers_url":"https://api.github.com/users/Mviljamaa/followers","following_url":"https://api.github.com/users/Mviljamaa/following{/other_user}","gists_url":"https://api.github.com/users/Mviljamaa/gists{/gist_id}","starred_url":"https://api.github.com/users/Mviljamaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mviljamaa/subscriptions","organizations_url":"https://api.github.com/users/Mviljamaa/orgs","repos_url":"https://api.github.com/users/Mviljamaa/repos","events_url":"https://api.github.com/users/Mviljamaa/events{/privacy}","received_events_url":"https://api.github.com/users/Mviljamaa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-25T13:00:08Z","updated_at":"2016-02-01T08:03:16Z","closed_at":null,"body":"I'm having difficulties in understanding the library.\r\n\r\nSpecifically,\r\n\r\nHow can getPosition(floating_t t) be looped over so that the loop goes through \"all t\"?\r\nWhere do I find all t parameters that I must loop over?\r\n\r\nWhere can I see example code?"},"comment":{"url":"https://api.github.com/repos/ejmahler/SplineLibrary/issues/comments/177831773","html_url":"https://github.com/ejmahler/SplineLibrary/issues/3#issuecomment-177831773","issue_url":"https://api.github.com/repos/ejmahler/SplineLibrary/issues/3","id":177831773,"user":{"login":"ejmahler","id":1156730,"avatar_url":"https://avatars.githubusercontent.com/u/1156730?v=3","gravatar_id":"","url":"https://api.github.com/users/ejmahler","html_url":"https://github.com/ejmahler","followers_url":"https://api.github.com/users/ejmahler/followers","following_url":"https://api.github.com/users/ejmahler/following{/other_user}","gists_url":"https://api.github.com/users/ejmahler/gists{/gist_id}","starred_url":"https://api.github.com/users/ejmahler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejmahler/subscriptions","organizations_url":"https://api.github.com/users/ejmahler/orgs","repos_url":"https://api.github.com/users/ejmahler/repos","events_url":"https://api.github.com/users/ejmahler/events{/privacy}","received_events_url":"https://api.github.com/users/ejmahler/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T08:03:16Z","updated_at":"2016-02-01T08:03:16Z","body":"Hi,\r\n\r\nSorry for the delay. I originally had a Vector3D class that you could use in place of QVector2D etc, but it fell out of maintenance because I didn't need it. I've made changes  now to make vector.h more useful.\r\n\r\nYou can include spline_library/vector.h, the class is Vector<dimension, floating_t>. the default floating_t is float. the dimension is 3d space vs 2d space etc. There are typedefs for common cases: Vector2 for Vector<2, float> and Vector3 for Vector<3, float>\r\n\r\nSo you could create a std::vector<Vector2> with your data in it, then create a Spline<Vector2> using that std::vector\r\n\r\nAs for using the same range of X coordinates, you will have to transform the range yourself, to go from 0 to spline.maxT. This should be very easy and fast though.\r\n\r\nFinally, if your data is not evenly spaced, your options are somewhat limited. The library theoretically supports it, but you'll have to create your own constructor to support specifying the T value at each point. If you need that, let me know."}}