56 const float bad_point = std::numeric_limits<float>::quiet_NaN ();
58 const int width = input_->width;
59 const int height = input_->height;
64 const int index = y * width + x;
66 const float px = (*input_)[index].x;
67 const float py = (*input_)[index].y;
68 const float pz = (*input_)[index].z;
72 normal.normal_x = bad_point;
73 normal.normal_y = bad_point;
74 normal.normal_z = bad_point;
75 normal.curvature = bad_point;
98 const int index2 = v * width + u;
100 const float qx = (*input_)[
index2].x;
101 const float qy = (*input_)[
index2].y;
102 const float qz = (*input_)[
index2].z;
104 if (std::isnan (
qx))
continue;
107 const float i =
qx -
px;
108 const float j =
qy -
py;
127 const float nx =
ddx;
128 const float ny =
ddy;
135 normal.normal_x = bad_point;
136 normal.normal_y = bad_point;
137 normal.normal_z = bad_point;
138 normal.curvature = bad_point;
142 const float normInv = 1.0f / std::sqrt (length);
147 normal.curvature = bad_point;
157 const float bad_point = std::numeric_limits<float>::quiet_NaN ();
159 const int width = input_->width;
160 const int height = input_->height;
175 for (
int y = 0; y < height; ++y)
177 for (
int x = 0; x < width; ++x)
179 const int index = y * width + x;
181 const float px = (*input_)[index].x;
182 const float py = (*input_)[index].y;
183 const float pz = (*input_)[index].z;
185 if (std::isnan(
px))
continue;
209 const int index2 = v * width + u;
211 const float qx = (*input_)[
index2].x;
212 const float qy = (*input_)[
index2].y;
213 const float qz = (*input_)[
index2].z;
215 if (std::isnan(
qx))
continue;
218 const float i =
qx -
px;
219 const float j =
qy -
py;
240 const float nx =
ddx;
241 const float ny =
ddy;
248 output[index].normal_x = bad_point;
249 output[index].normal_y = bad_point;
250 output[index].normal_z = bad_point;
251 output[index].curvature = bad_point;
255 const float normInv = 1.0f / std::sqrt (length);
260 output[index].curvature = bad_point;