Closed MasonAlice closed 3 years ago
Hi Howell,
On Tue, 5 Oct 2021 at 07:29, Howell @.***> wrote:
why the math library does not include these?
template
t_quat rotate(T angle_radians, const t_vec3 & v); There is a vsg::rotate(T angle_radians, const t_vec3
& v) but it directly converts to tvsg::t_mat4 . We can't provide both so one has to choose which one is more widely useful.
Looking at include/vsg/maths/quat.h I see that we don't yet have a
vsg::t_quat constructor that takes (T angle_radians, const t_vec3
template
constexpr t_vec3 operator*(const t_vec3 & v); GLSL has a component-wise multiplication so this would be a natural thing to add.
I'm in the middle of some other work, so if you can't wait for me to get to them feel free to add them and generate a PR.
Cheers, Robert.
Hi Howel,
FYI, I've recently checked in some working adding vsg::AnimationPath class to the VulkanSceneGraph, as part of this work I've added a vsg::quat constructor and vsg::quat::set(..) method that takes a angle and axis, and ones that take two vectors, computing the quat that rotates between the vectors.
This is now checked into VSG master.
Robert.
I have now checked in vec2, vec3 and vec4 variants on the vec vec and vec = vec operators.
ef2478471e8d6bf5f94cd939b613f03b745418fc
With this change I believe all the items you mentioned are now resolved so will close this issue.
why the math library does not include these?