Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/render/mesh.cpp')
-rw-r--r--intern/cycles/render/mesh.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp
index c5eb3a0d3a8..6470b3b1075 100644
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@ -120,6 +120,13 @@ float3 Mesh::Triangle::compute_normal(const float3 *verts) const
return norm / normlen;
}
+bool Mesh::Triangle::valid(const float3 *verts) const
+{
+ return isfinite3_safe(verts[v[0]]) &&
+ isfinite3_safe(verts[v[1]]) &&
+ isfinite3_safe(verts[v[2]]);
+}
+
/* Curve */
void Mesh::Curve::bounds_grow(const int k, const float3 *curve_keys, const float *curve_radius, BoundBox& bounds) const