|
@@ -53,14 +53,18 @@ IGL_INLINE void igl::parula(
|
|
|
Eigen::PlainObjectBase<DerivedC> & C)
|
|
|
{
|
|
|
C.resize(Z.rows(),3);
|
|
|
+ double denom = (max_z-min_z);
|
|
|
+ denom = denom==0?1:denom;
|
|
|
for(int r = 0;r<Z.rows();r++)
|
|
|
{
|
|
|
- parula((-min_z+Z(r,0))/(max_z-min_z),C(r,0),C(r,1),C(r,2));
|
|
|
+ parula((-min_z+Z(r,0))/denom,C(r,0),C(r,1),C(r,2));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#ifdef IGL_STATIC_LIBRARY
|
|
|
// Explicit template specialization
|
|
|
+// generated by autoexplicit.sh
|
|
|
+template void igl::parula<Eigen::Array<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Array<int, -1, 1, 0, -1, 1> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
|
|
|
template void igl::parula<double>(double, double*);
|
|
|
template void igl::parula<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
|
|
|
#endif
|