本文整理汇总了C++中Matrix4::clipTriangle方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix4::clipTriangle方法的具体用法?C++ Matrix4::clipTriangle怎么用?C++ Matrix4::clipTriangle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix4
的用法示例。
在下文中一共展示了Matrix4::clipTriangle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Quad_BestPoint
void Quad_BestPoint(const Matrix4& local2view, clipcull_t cull, const VertexCb* vertices, SelectionIntersection& best) {
Vector4 clipped[9];
{
const std::size_t count = local2view.clipTriangle(vertices[0].vertex, vertices[1].vertex, vertices[3].vertex, clipped);
BestPoint(count, clipped, best, cull);
}
{
const std::size_t count = local2view.clipTriangle(vertices[1].vertex, vertices[2].vertex, vertices[3].vertex, clipped);
BestPoint(count, clipped, best, cull);
}
}
示例2: Circle_BestPoint
void Circle_BestPoint(const Matrix4& local2view, clipcull_t cull, const VertexCb* vertices, const std::size_t size, SelectionIntersection& best) {
Vector4 clipped[9];
for(std::size_t i=0; i<size; ++i)
{
const std::size_t count = local2view.clipTriangle(g_vector3_identity, vertices[i].vertex, vertices[(i+1)%size].vertex, clipped);
BestPoint(count, clipped, best, cull);
}
}
示例3: Triangles_BestPoint
void Triangles_BestPoint(const Matrix4& local2view, clipcull_t cull, FlatShadedVertexIterator first, FlatShadedVertexIterator last, SelectionIntersection& best) {
for(FlatShadedVertexIterator x(first), y(first+1), z(first+2); x != last; x += 3, y += 3, z +=3)
{
Vector4 clipped[9];
BestPoint(
local2view.clipTriangle(
x->vertex,
y->vertex,
z->vertex,
clipped
),
clipped,
best,
cull
);
}
}