Пример #1
0
	// 指定区域id, 指定点的id, 指定位置, 添加一个小球.
	void CPathFindAction::AddNewPoint(unsigned long ulPointId, Ogre::Vector3 position)
	{
		// 得到当前正在编辑的区域的信息.
		CUnreachRegion* pRegion = NULL;
		pRegion = GetRegionById(m_ulCurEditRegionId);
		if(pRegion)
		{
			pRegion->AddNewPoint1(ulPointId, position);

			getSceneManipulator()->_fireAddDijkPoint(ulPointId, position);
		}
	}
Пример #2
0
	// 在当前编辑的区域中添加一个新的点
	unsigned long CPathFindAction::AddNewPoint(Ogre::Vector3 position)
	{
		if(0 == m_UnreachRegionMap.count(m_ulCurEditRegionId))
		{
			return 0 ;
		}

		CUnreachRegion* pRegion = NULL;

		pRegion = m_UnreachRegionMap[m_ulCurEditRegionId];
		if(pRegion)
		{

			m_ulCurEditPointId = pRegion->AddNewPoint1(position);
			return m_ulCurEditPointId;
		}

		return 0;

	}