double ZFlyEmNeuronRange::getRadius(double z) const { double r = -1.0; if (z >= getMinZ() && z <= getMaxZ()) { double z1 = z; double z2 = z; for (RangeMap::const_iterator iter = m_planeRange.begin(); iter != m_planeRange.end(); ++iter) { z2 = iter->first; if (z2 >= z) { break; } z1 = iter->first; } if (z == z1) { if (m_planeRange.count(z1) > 0) { r = m_planeRange.at(z1); } } else { PROCESS_WARNING(z1 == z2, "Unexpected identical plane", return 0.0); double ratio = (z - z1) / (z2 - z1); r = m_planeRange.at(z1) * (1 - ratio) + m_planeRange.at(z2) * ratio; } }
bool Sphere::isIntersects(Vec3 p) { if (getMaxX() > p.getX() && getMinX() < p.getX()) return true; if (getMaxY() > p.getY() && getMinY() < p.getY()) return true; if (getMaxZ() > p.getZ() && getMinZ() < p.getZ()) return true; return false; }
void displayParameter(){ std::cout<<"----------------------------------"<<std::endl; std::cout<<" Mesh "<<std::endl; std::cout<<"----------------------------------"<<std::endl; std::cout<<"width="<<getWidth()<<std::endl; std::cout<<"height="<<getHeight()<<std::endl; std::cout<<"depth="<<getDepth()<<std::endl; std::cout<<"size="<<getGlobalSize()<<std::endl; std::cout<<"MinX="<<getMinX()<<std::endl; std::cout<<"MaxX="<<getMaxX()<<std::endl; std::cout<<"MinY="<<getMinY()<<std::endl; std::cout<<"MaxY="<<getMaxY()<<std::endl; std::cout<<"MinZ="<<getMinZ()<<std::endl; std::cout<<"MaxZ="<<getMaxZ()<<std::endl; std::cout<<""<<std::endl; std::cout<<"nbVertice="<<getNbVertice()<<std::endl; }