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


C++ SelectionTest::BeginMesh方法代码示例

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


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

示例1: testSelectComponents

void BrushInstance::testSelectComponents (Selector& selector, SelectionTest& test, SelectionSystem::EComponentMode mode)
{
	test.BeginMesh(localToWorld());

	switch (mode) {
	case SelectionSystem::eVertex: {
		for (VertexInstances::iterator i = m_vertexInstances.begin(); i != m_vertexInstances.end(); ++i) {
			(*i).testSelect(selector, test);
		}
	}
		break;
	case SelectionSystem::eEdge: {
		for (EdgeInstances::iterator i = m_edgeInstances.begin(); i != m_edgeInstances.end(); ++i) {
			(*i).testSelect(selector, test);
		}
	}
		break;
	case SelectionSystem::eFace: {
		if (test.getVolume().fill()) {
			for (FaceInstances::iterator i = m_faceInstances.begin(); i != m_faceInstances.end(); ++i) {
				(*i).testSelect(selector, test);
			}
		} else {
			for (FaceInstances::iterator i = m_faceInstances.begin(); i != m_faceInstances.end(); ++i) {
				(*i).testSelect_centroid(selector, test);
			}
		}
	}
		break;
	default:
		break;
	}
}
开发者ID:chrisglass,项目名称:ufoai,代码行数:33,代码来源:BrushInstance.cpp

示例2: testSelectComponents

 void testSelectComponents(Selector& selector, SelectionTest& test, SelectionSystem::EComponentMode mode)
 {
   if(mode == SelectionSystem::eVertex)
   {
     test.BeginMesh(localToWorld());
     m_curveNURBS.testSelect(selector, test);
     m_curveCatmullRom.testSelect(selector, test);
   }
 }
开发者ID:ChunHungLiu,项目名称:GtkRadiant,代码行数:9,代码来源:doom3group.cpp

示例3: testSelect

void NullModel::testSelect(Selector& selector, SelectionTest& test, const Matrix4& localToWorld) {
	test.BeginMesh(localToWorld);

	SelectionIntersection best;
	aabb_testselect(_aabbLocal, test, best);

	if(best.valid()) {
		selector.addIntersection(best);
	}
}
开发者ID:BielBdeLuna,项目名称:DarkRadiant,代码行数:10,代码来源:NullModel.cpp

示例4: testSelect

void MiscParticle::testSelect (Selector& selector, SelectionTest& test, const Matrix4& localToWorld)
{
	test.BeginMesh(localToWorld);

	SelectionIntersection best;
	aabb_testselect(m_aabb_local, test, best);
	if (best.valid()) {
		selector.addIntersection(best);
	}
}
开发者ID:AresAndy,项目名称:ufoai,代码行数:10,代码来源:MiscParticle.cpp

示例5: testSelect

void BrushInstance::testSelect (Selector& selector, SelectionTest& test)
{
	test.BeginMesh(localToWorld());

	SelectionIntersection best;
	for (FaceInstances::iterator i = m_faceInstances.begin(); i != m_faceInstances.end(); ++i) {
		(*i).testSelect(test, best);
	}
	if (best.valid()) {
		selector.addIntersection(best);
	}
}
开发者ID:chrisglass,项目名称:ufoai,代码行数:12,代码来源:BrushInstance.cpp

示例6:

void Doom3GroupNode::testSelectComponents(Selector& selector, SelectionTest& test, SelectionSystem::EComponentMode mode)
{
	if (mode == SelectionSystem::eVertex)
	{
		test.BeginMesh(localToWorld());

		_originInstance.testSelect(selector, test);

		_nurbsEditInstance.testSelect(selector, test);
		_catmullRomEditInstance.testSelect(selector, test);
	}
}
开发者ID:Zbyl,项目名称:DarkRadiant,代码行数:12,代码来源:Doom3GroupNode.cpp

示例7: testSelect

  void testSelect(Selector& selector, SelectionTest& test)
  {
    test.BeginMesh(localToWorld());
    SelectionIntersection best;

    m_contained.testSelect(selector, test, best);

    if(best.valid())
    {
      Selector_add(selector, getSelectable(), best);
    }
  }
开发者ID:ChunHungLiu,项目名称:GtkRadiant,代码行数:12,代码来源:doom3group.cpp

示例8: selectPlanes

void BrushInstance::selectPlanes (Selector& selector, SelectionTest& test, const PlaneCallback& selectedPlaneCallback)
{
	test.BeginMesh(localToWorld());

	PlanePointer brushPlanes[c_brush_maxFaces];
	PlanesIterator j = brushPlanes;

	for (Brush::const_iterator i = m_brush.begin(); i != m_brush.end(); ++i) {
		*j++ = &(*i)->plane3();
	}

	for (FaceInstances::iterator i = m_faceInstances.begin(); i != m_faceInstances.end(); ++i) {
		(*i).selectPlane(selector, Line(test.getNear(), test.getFar()), brushPlanes, j, selectedPlaneCallback);
	}
}
开发者ID:chrisglass,项目名称:ufoai,代码行数:15,代码来源:BrushInstance.cpp

示例9: IndexPointer

// Selection test
void MD5Surface::testSelect(Selector& selector,
							SelectionTest& test,
							const Matrix4& localToWorld)
{
	test.BeginMesh(localToWorld);

	SelectionIntersection best;
	test.TestTriangles(
	  vertexpointer_arbitrarymeshvertex(_vertices.data()),
	  IndexPointer(_indices.data(), IndexPointer::index_type(_indices.size())),
	  best
	);

	if(best.valid()) {
		selector.addIntersection(best);
	}
}
开发者ID:BielBdeLuna,项目名称:DarkRadiant,代码行数:18,代码来源:MD5Surface.cpp

示例10: testSelect

// Perform selection test for this surface
void RenderablePicoSurface::testSelect(Selector& selector,
									   SelectionTest& test,
									   const Matrix4& localToWorld) const
{
	if (!_vertices.empty() && !_indices.empty())
	{
		// Test for triangle selection
		test.BeginMesh(localToWorld);
		SelectionIntersection result;

		test.TestTriangles(
			VertexPointer(&_vertices[0].vertex, sizeof(ArbitraryMeshVertex)),
      		IndexPointer(&_indices[0],
      					 IndexPointer::index_type(_indices.size())),
			result
		);

		// Add the intersection to the selector if it is valid
		if(result.valid()) {
			selector.addIntersection(result);
		}
	}
}
开发者ID:DerSaidin,项目名称:DarkRadiant,代码行数:24,代码来源:RenderablePicoSurface.cpp

示例11: testSelectComponents

void LightNode::testSelectComponents(Selector& selector, SelectionTest& test, SelectionSystem::EComponentMode mode) {
	// Get the Origin of the Light Volume AABB (NOT the localAABB() which includes the light center)
	Vector3 lightOrigin = _light.lightAABB().origin;

	Matrix4 local2World = Matrix4::getTranslation(lightOrigin);

	test.BeginMesh(local2World);

	if (mode == SelectionSystem::eVertex) {
		if (_light.isProjected()) {
			// Test the projection components for selection
			_lightTargetInstance.testSelect(selector, test);
			_lightRightInstance.testSelect(selector, test);
			_lightUpInstance.testSelect(selector, test);
			_lightStartInstance.testSelect(selector, test);
			_lightEndInstance.testSelect(selector, test);
		}
		else {
			// Test if the light center is hit by the click
			_lightCenterInstance.testSelect(selector, test);
		}
	}
}
开发者ID:OpenTechEngine,项目名称:DarkRadiant,代码行数:23,代码来源:LightNode.cpp

示例12: selectPlanes

void LightNode::selectPlanes(Selector& selector, SelectionTest& test, const PlaneCallback& selectedPlaneCallback) {
	test.BeginMesh(localToWorld());
	// greebo: Make sure to use the local lightAABB() for the selection test, excluding the light center
	AABB localLightAABB(Vector3(0,0,0), _light.getDoom3Radius().m_radiusTransformed);
	m_dragPlanes.selectPlanes(localLightAABB, selector, test, selectedPlaneCallback, rotation());
}
开发者ID:OpenTechEngine,项目名称:DarkRadiant,代码行数:6,代码来源:LightNode.cpp


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