您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BoundingBox函数代码示例

51自学网 2021-06-01 19:55:36
  C++
这篇教程C++ BoundingBox函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中BoundingBox函数的典型用法代码示例。如果您正苦于以下问题:C++ BoundingBox函数的具体用法?C++ BoundingBox怎么用?C++ BoundingBox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了BoundingBox函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ti

// -----------------------------// QtImage_IO::getVolumeFileInfo// -----------------------------// Purpose://   Nothing yet.// ---- Change History ----// 04/24/2010 -- Joe R. -- Initial implementation.void QtImage_IO::getVolumeFileInfo(VolumeFileInfo::Data& data,                                   const std::string& filename) const{    CVC::ThreadInfo ti(BOOST_CURRENT_FUNCTION);    QImage img(filename.c_str());    if(img.isNull())        throw ReadError(            boost::str(                boost::format("QImage could not read %1%") % filename            )        );    data._filename = filename;    data._dimension = Dimension(img.width(),img.height(),1);    data._boundingBox = BoundingBox(0.0,0.0,0.0,                                    img.width()+1,                                    img.height()+1,                                    0.0);    data._numVariables = 1; //just using grayscale for now, so 1 var    data._numTimesteps = 1;    data._voxelTypes = std::vector<VoxelType>(1,UChar);    data._names.clear();    data._names.push_back("QImage");    data._tmin = 0.0;    data._tmax = 0.0;    data._minIsSet.clear();    data._minIsSet.resize(data._numVariables);    for(int i=0; i<data._minIsSet.size(); i++) data._minIsSet[i].resize(data._numTimesteps);    data._min.clear();    data._min.resize(data._numVariables);    for(int i=0; i<data._min.size(); i++) data._min[i].resize(data._numTimesteps);    data._maxIsSet.clear();    data._maxIsSet.resize(data._numVariables);    for(int i=0; i<data._maxIsSet.size(); i++) data._maxIsSet[i].resize(data._numTimesteps);    data._max.clear();    data._max.resize(data._numVariables);    for(int i=0; i<data._max.size(); i++) data._max[i].resize(data._numTimesteps);}
开发者ID:SoumyajitG,项目名称:VolRoverN,代码行数:48,


示例2: BoundedObject

World::World(double _width, double _height)	: BoundedObject(Pd(), Qd(),	  BoundingBox(Pd(-_width/2, -_height/2, 0), Pd(_width,0,0), Pd(0,_height,0), Pd(_width,_height,0), Pd(), Pd(), Pd(), Pd(_width/2, _height/2, HIGH)),	  Assets::WorldMaterial){	ObjectHandle tHandle;	tHandle = Terrain(_width, _height);	terrain = TO(Terrain, tHandle);	children.insert(tHandle);	ObjectHandle hudHandle;	hudHandle = HUD(640, 480);	hud = TO(HUD, hudHandle);	children.insert(hudHandle);	children.insert(Sky((int) _width, (int) _height));	width = _width;	height = _height;}
开发者ID:FerryT,项目名称:OGO-2.3,代码行数:21,


示例3: switch

void ImagePane::deleteCurrentBox()        //if an inscription or surface box is deleted        //all boxes below it in the hierarchy (graphs, or graphs and inscriptions)        //are deleted too{    if(locked || currentBoxIndex == -1)        return;    switch(mode)    {    case SURFACE:        if(surf->inscriptionCount() == 0 || confirmDelete("inscription"))        {            *surf = BoundingBox(QPoint(0,0), QPoint(0,0), 0);            surf->deleteAllInscriptions();            emit inscrImgListModified(); //signal picked up by TranscriptionWindow            currentBoxIndex = -1;        }        break;	case INSCRIPTION:        if(surf->ptrInscrAt(currentBoxIndex)->boxCount() == 0           || confirmDelete("graph"))        {            surf->deleteInscr(currentBoxIndex);            emit inscrImgListModified(); //signal picked up by TranscriptionWindow            currentBoxIndex--;            if(currentBoxIndex == -1)                currentBoxIndex = surf->inscriptionCount() - 1;        }        break;	case GRAPH:        surf->ptrInscrAt(currentInscrIndex)->deleteBox(currentBoxIndex);        currentBoxIndex--;        if(currentBoxIndex == -1)            currentBoxIndex = surf->ptrInscrAt(currentInscrIndex)->count() - 1;        break;    default:       break;    }    update();}
开发者ID:cangjie-info,项目名称:ecdbgui,代码行数:40,


示例4: KDTree

void PhotonMapping::TracePhotons() {  std::cout << "trace photons" << std::endl;  // first, throw away any existing photons  delete kdtree;  // consruct a kdtree to store the photons  BoundingBox *bb = mesh->getBoundingBox();  Vec3f min = bb->getMin();  Vec3f max = bb->getMax();  Vec3f diff = max-min;  min -= 0.001*diff;  max += 0.001*diff;  kdtree = new KDTree(BoundingBox(min,max));  // photons emanate from the light sources  const std::vector<Face*>& lights = mesh->getLights();  // compute the total area of the lights  double total_lights_area = 0;  for (unsigned int i = 0; i < lights.size(); i++) {    total_lights_area += lights[i]->getArea();  }  // shoot a constant number of photons per unit area of light source  // (alternatively, this could be based on the total energy of each light)  for (unsigned int i = 0; i < lights.size(); i++) {      double my_area = lights[i]->getArea();    int num = args->num_photons_to_shoot * my_area / total_lights_area;    // the initial energy for this photon    Vec3f energy = my_area/double(num) * lights[i]->getMaterial()->getEmittedColor();    Vec3f normal = lights[i]->computeNormal();    for (int j = 0; j < num; j++) {      Vec3f start = lights[i]->RandomPoint();      // the initial direction for this photon (for diffuse light sources)      Vec3f direction = RandomDiffuseDirection(normal);      TracePhoton(start,direction,energy,0);    }  }}
开发者ID:HowOriginal,项目名称:AdvGraphicsProject,代码行数:40,


示例5: BraunnerPoint

BraunnerTree::BraunnerTree(int _depth,vec3 _halfDimension, vec3 _center){	if (_depth>=0)	{		this->nodeObjects = new BraunnerPoint();		this->depth = depth;		this->origin = _center;		this->halfDimension = _halfDimension;		myBox = BoundingBox(origin-halfDimension,origin+halfDimension);		for(int i=0; i<8; ++i)			{			// Calcular a nova bounding box das folhas (ou ramos)			vec3 newOrigin = origin;			newOrigin.x += _halfDimension.x * (i&4 ? .5f : -.5f);//SImplifica
C++ Box函数代码示例
C++ BoundAbs函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。