david.sanda Posted March 22, 2020 Share Posted March 22, 2020 We are switching to _double_ and this is not really nice. There is no dmat4 ctr from dvec4 quad, so i have to do Math::Mat4 m( Math::mat4(//this is slightly unoptimal Math::vec4(l.v1x, l.v1y, l.v1z, 0), Math::vec4(l.v2x, l.v2y, l.v2z, 0), Math::vec4(l.v3x, l.v3y, l.v3z, 0), Math::vec4(l.x, l.y, l.z, 1)) ); Link to comment
andrey-kozlov Posted March 23, 2020 Share Posted March 23, 2020 Hello David, dmat4 is 4x3 (no projection part). So there is a constructor from dvec3 quad. You can do it like this Math::Vec4 a,b,c,d; Math::Mat4 m {a.xyz, b.xyz, c.xyz, d.xyz}; or Math::Mat4 m1{Math::Vec3(a), Math::Vec3(b), Math::Vec3(c), Math::Vec3(d)}; Link to comment
david.sanda Posted March 23, 2020 Author Share Posted March 23, 2020 Thanks, i understand. You can close this. Link to comment
Recommended Posts