static vec3_t RotateZ(K rot_sin, K rot_cos, const vec3_t& v) { return vec3_t { rot_cos*v.x() - rot_sin*v.y(), rot_sin*v.x() + rot_cos*v.y(), v.z() }; }
vec2_t projectCameraOnRetina(const vec3_t& x_cam) const { const float q = retina_proj_param_ / x_cam.z(); return q * vec2_t(x_cam.x(), x_cam.y()); }
/** Checks if a point in camera coordinates is visible by the retina */ bool isVisible(const vec3_t& pos) const { const int ix = static_cast<int>(pos.x() / pos.z() * retina_proj_param_); const int iy = static_cast<int>(pos.y() / pos.z() * retina_proj_param_); return -RETINA_SIZE/2 <= ix && ix <= RETINA_SIZE/2 && -RETINA_SIZE/2 <= iy && iy <= RETINA_SIZE/2; }