本文整理汇总了C++中SelectionTest::TestTriangles方法的典型用法代码示例。如果您正苦于以下问题:C++ SelectionTest::TestTriangles方法的具体用法?C++ SelectionTest::TestTriangles怎么用?C++ SelectionTest::TestTriangles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SelectionTest
的用法示例。
在下文中一共展示了SelectionTest::TestTriangles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
}
示例2: 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);
}
}
}