Jump to content

[SOLVED] double support for mat4


photo

Recommended Posts

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

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
  • silent changed the title to [SOLVED] double support for mat4
×
×
  • Create New...