当前位置: 首页>>代码示例>>C++>>正文


C++ CAABBox::setCenter方法代码示例

本文整理汇总了C++中nlmisc::CAABBox::setCenter方法的典型用法代码示例。如果您正苦于以下问题:C++ CAABBox::setCenter方法的具体用法?C++ CAABBox::setCenter怎么用?C++ CAABBox::setCenter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nlmisc::CAABBox的用法示例。


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

示例1: getSelectBox

// *********************************************************************************************************
NLMISC::CAABBox CDisplayerVisualEntity::getSelectBox() const
{
	//H_AUTO(R2_NLMISC_CAABBox )
	if (!_Entity)
	{
		if (_PlaceHolder)
		{
			return _PlaceHolder->getSelectBox();
		}
		return CDisplayerVisual::getSelectBox();
	}
	if (getSelectionType() == ISelectableObject::LocalSelectBox ||
		getSelectionType() == ISelectableObject::GroundProjected
	   )
	{
		if (_Entity->isAsyncLoading())
		{
			NLMISC::CAABBox result;
			result.setCenter(CVector::Null);
			result.setHalfSize(CVector::Null);
			return result;
		}
		return getEditor().getLocalSelectBox(*_Entity);
	}
	else
	{
		return getEditor().getSelectBox(*_Entity);
	}
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:30,代码来源:displayer_visual_entity.cpp

示例2:

///===========================================================================
void	CParticleSystemShape::getAABBox(NLMISC::CAABBox &bbox) const
{
	if (!_UsePrecomputedBBox)
	{
		bbox.setCenter(NLMISC::CVector::Null);
		bbox.setHalfSize(NLMISC::CVector(1, 1, 1));
	}
	else
	{
		bbox = _PrecomputedBBox;
	}
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:13,代码来源:particle_system_shape.cpp

示例3:

// ***************************************************************************
void		CTransformShape::getAABBox(NLMISC::CAABBox &bbox) const
{
	if(Shape)
	{
		Shape->getAABBox(bbox);
	}
	else
	{
		bbox.setCenter(CVector::Null);
		bbox.setHalfSize(CVector::Null);
	}
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:13,代码来源:transform_shape.cpp

示例4: main


//.........这里部分代码省略.........
					{
						

						// Progress
						progress ("Build bounding boxes", (float)(x+y*lastX)/(float)(lastX*lastY));

						// Make a zone file name
						string zoneName;
						getZoneNameByCoord (x, y, zoneName);

						// Open the file
						CIFile file;
						if (file.open (dir+zoneName+ext))
						{							
							// The zone
							CZone zone;

							try
							{
								// Serial the zone
								file.serial (zone);

								/// get bbox from the ig of this zone
								CLightingBBox igBBox;								
								if (computeDependenciesWithIgs)
								{
									computeZoneIGBBox(zoneName.c_str(), igBBox, shapeMap, villagesBBox);
								}								
								// Create a zone descriptor
								

								
								NLMISC::CAABBox zoneBox;
								zoneBox.setCenter(zone.getZoneBB().getCenter());
								zoneBox.setHalfSize(zone.getZoneBB().getHalfSize());

								CLightingBBox zoneLBox;
								zoneLBox.OccludingBox = zoneLBox.ReceivingBox = zoneBox; // can't be void
								zoneLBox.makeUnion(igBBox);								
								nlassert(!zoneLBox.ReceivingBox.IsVoid);
								//
								CZoneDescriptorBB zoneDesc;
								zoneDesc.X=x;
								zoneDesc.Y=y;
								zoneDesc.BBox=zoneLBox.ReceivingBox.Box;
								//
								if (!zoneLBox.OccludingBox.IsVoid)
								{
									quadGrid.insert (zoneLBox.ReceivingBox.Box.getMin(), zoneLBox.ReceivingBox.Box.getMax(), zoneDesc);
								}
																								
								// Insert in the dependencies
								// Index 
								uint index=(x-firstX)+(y-firstY)*(lastX-firstX+1);
								

								// Loaded
								dependencies[index].Loaded=true;
								dependencies[index].X=x;
								dependencies[index].Y=y;
								dependencies[index].BBox=zoneLBox.OccludingBox.Box;

								// ZMin
								float newZ=zoneLBox.ReceivingBox.Box.getMin().z;
								if (newZ<minZ)
									minZ=newZ;
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:67,代码来源:zone_dependencies.cpp

示例5:

//***************************************************************************************************************
void				CFlareShape::getAABBox(NLMISC::CAABBox &bbox) const
{
	// the flare himself is a point
	bbox.setCenter(CVector::Null);
	bbox.setHalfSize(CVector::Null);
}
开发者ID:mixxit,项目名称:solinia,代码行数:7,代码来源:flare_shape.cpp

示例6:

//============================================
void	CWaveMakerShape::getAABBox(NLMISC::CAABBox &bbox) const
{
	// its just a point
	bbox.setCenter(NLMISC::CVector::Null);
	bbox.setHalfSize(NLMISC::CVector::Null);
}
开发者ID:mixxit,项目名称:solinia,代码行数:7,代码来源:water_shape.cpp


注:本文中的nlmisc::CAABBox::setCenter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。