コード例 #1
0
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;
    }
  }
コード例 #2
0
ファイル: Sphere.cpp プロジェクト: baranusta/RayTracer
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;
}
コード例 #3
0
ファイル: mesh.hpp プロジェクト: jjalageas/cpMoteur3D
    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;

    }
コード例 #4
0
int ZDvidInfo::getMaxZ() const
{
  return getMinZ() + m_stackSize[2] - 1;
}
コード例 #5
0
ファイル: ObjModel.cpp プロジェクト: HelloYym/SceneRoam
//添加旋转信息
void ObjModel::setArea(){
    area.x = getMinX() + position.x;
    area.y = getMinY() + position.y;
    area.z = getMinZ() + position.z;
    getDimensions(area.dimensions);
}