]> git.tdb.fi Git - libs/gl.git/blobdiff - source/scene.cpp
Use matrix column accessors rather than multiplication
[libs/gl.git] / source / scene.cpp
index 3933599ba5c63f13307d1c755ba0cd9323842a1b..9d301fbfb0801ab3d1ea95b5104d88f81b94d902 100644 (file)
@@ -60,7 +60,7 @@ bool Scene::frustum_cull(const Renderable &renderable) const
                return false;
 
        Vector4 center = culling_matrix*(*matrix*compose(bsphere->get_center(), 1.0f));
-       Vector4 x_axis = *matrix*Vector4(bsphere->get_radius(), 0.0f, 0.0f, 0.0f);
+       Vector3 x_axis = (matrix->column(0)*bsphere->get_radius()).slice<3>(0);
        float radius_sq = inner_product(x_axis, x_axis);
 
        for(unsigned i=0; i<6; ++i)