| 261 | } |
| 262 | |
| 263 | inline void computeNormalHeight(const GEO::Mesh& mesh, |
| 264 | double orientation, |
| 265 | double t, |
| 266 | GEO::index_t f, |
| 267 | const Eigen::Matrix3d& m, |
| 268 | const GEO::vec3& q, |
| 269 | const GEO::vec3& qA, |
| 270 | const GEO::vec3& qB, |
| 271 | float& out_height, |
| 272 | image::RGBfColor& out_normal) |
| 273 | { |
| 274 | GEO::vec3 intersectionPoint = t * qB + (1.0 - t) * qA; |
| 275 | out_height = q.distance(intersectionPoint) * orientation; |
| 276 | |
| 277 | // Use facet normal |
| 278 | // GEO::vec3 denseMeshNormal_f = normalize(GEO::Geom::mesh_facet_normal(mesh, f)); |
| 279 | // Use per pixel normal using weighted interpolation of the facet vertex normals |
| 280 | const GEO::vec3 denseMeshNormal = mesh_facet_interpolate_normal_at_point(mesh, f, intersectionPoint); |
| 281 | |
| 282 | Eigen::Vector3d dNormal = m * toEigen(denseMeshNormal); |
| 283 | dNormal.normalize(); |
| 284 | out_normal = image::RGBfColor(dNormal(0), dNormal(1), dNormal(2)); |
| 285 | } |
| 286 | |
| 287 | void Texturing::generateUVsBasicMethod(mvsUtils::MultiViewParams& mp) |
| 288 | { |
no test coverage detected