コード例 #1
0
MeshListGeometry MeshListGeometry::clip(const tgt::vec4& clipplane, double epsilon) {
    MeshListGeometry closingFaces;
    for (iterator it = begin(); it != end(); ++it) {
        MeshGeometry closingFace = it->clip(clipplane, epsilon);
        if (!closingFace.empty())
            closingFaces.addMesh(closingFace);
    }
    return closingFaces;
}
コード例 #2
0
void MeshListGeometry::clip(const tgt::vec4& clipPlane, MeshListGeometry& closingFaces, double epsilon) {
    tgtAssert(epsilon >= 0.0, "negative epsilon");
    for (iterator it = begin(); it != end(); ++it) {
        MeshGeometry closingFace;
        it->clip(clipPlane, closingFace, epsilon);
        if (!closingFace.empty())
            closingFaces.addMesh(closingFace);
    }
}