#ifndef SRC_FORCES_LABELLER_FRAME_DATA_H_

#define SRC_FORCES_LABELLER_FRAME_DATA_H_

#include <Eigen/Core>
#include <iostream>

namespace Forces
{
/**
 * \brief
 *
 *
 */
class LabellerFrameData
{
 public:
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
  LabellerFrameData(double frameTime, Eigen::Matrix4f projection,
                    Eigen::Matrix4f view)
    : frameTime(frameTime), projection(projection), view(view),
      viewProjection(projection * view)
  {
  }

  const double frameTime;
  const Eigen::Matrix4f projection;
  const Eigen::Matrix4f view;
  const Eigen::Matrix4f viewProjection;

  Eigen::Vector3f project(Eigen::Vector3f vector) const
  {
    Eigen::Vector4f projected =
        viewProjection * Eigen::Vector4f(vector.x(), vector.y(), vector.z(), 1);

    std::cout << "projected" << projected / projected.w() << std::endl;

    return projected.head<3>() / projected.w();
  }
};
}  // namespace Forces

#endif  // SRC_FORCES_LABELLER_FRAME_DATA_H_

#ifndef SRC_FORCES_LABELLER_FRAME_DATA_H_

#define SRC_FORCES_LABELLER_FRAME_DATA_H_

#include "../eigen.h"
#include <iostream>

namespace Forces
{
/**
 * \brief
 *
 *
 */
class LabellerFrameData
{
 public:
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
  LabellerFrameData(double frameTime, Eigen::Matrix4f projection,
                    Eigen::Matrix4f view)
    : frameTime(frameTime), projection(projection), view(view),
      viewProjection(projection * view)
  {
  }

  const double frameTime;
  const Eigen::Matrix4f projection;
  const Eigen::Matrix4f view;
  const Eigen::Matrix4f viewProjection;

  Eigen::Vector3f project(Eigen::Vector3f vector) const
  {
    Eigen::Vector4f projected = mul(viewProjection, vector);

    return projected.head<3>() / projected.w();
  }
};
}  // namespace Forces

#endif  // SRC_FORCES_LABELLER_FRAME_DATA_H_

Use new mul function in LabellerFrameData::project.
Use new mul function in LabellerFrameData::project.
