Lines Matching defs:plane

157  * Calculate the intersection of line segment v0-v1 and a given plane. Line
165 const ClipFloat plane)
169 return (plane*w0 - v0) / ((v1 - v0) - plane*(w1 - w0) + std::numeric_limits<ClipFloat>::epsilon());
250 // even if the another point is not on the plane. Prevent clipping ratio from saturating by using points on line
251 // that are (nearly) on this and (nearly) on the opposite plane.
257 // Find intersection point of line from v0 to v1 and the current plane. Avoid ratios near 1.0
278 void clipTriangleOneVertex (std::vector<TriangleVertex>& clippedEdges, const ClipVolumePlane& plane, const TriangleVertex& clipped, const TriangleVertex& v1, const TriangleVertex& v2)
292 const ClipFloat hitDist = plane.clipLineSegmentEnd(inside.position, outside.position);
304 middle.position = plane.getLineIntersectionPoint(approximatedClipPoint, anotherPointOnLine);
316 const ClipFloat hitDist = plane.clipLineSegmentEnd(inside.position, outside.position);
328 middle.position = plane.getLineIntersectionPoint(approximatedClipPoint, anotherPointOnLine);
352 void clipTriangleTwoVertices (std::vector<TriangleVertex>& clippedEdges, const ClipVolumePlane& plane, const TriangleVertex& v0, const TriangleVertex& clipped1, const TriangleVertex& clipped2)
367 const ClipFloat hitDist = plane.clipLineSegmentEnd(inside.position, outside.position);
379 middle.position = plane.getLineIntersectionPoint(approximatedClipPoint, anotherPointOnLine);
391 const ClipFloat hitDist = plane.clipLineSegmentEnd(inside.position, outside.position);
403 middle.position = plane.getLineIntersectionPoint(approximatedClipPoint, anotherPointOnLine);
440 void clipTriangleToPlane (std::vector<TriangleVertex>& clippedEdges, const TriangleVertex* vertices, const ClipVolumePlane& plane)
442 const bool v0Clipped = !plane.pointInClipVolume(vertices[0].position);
443 const bool v1Clipped = !plane.pointInClipVolume(vertices[1].position);
444 const bool v2Clipped = !plane.pointInClipVolume(vertices[2].position);
455 if (v0Clipped) clipTriangleOneVertex(clippedEdges, plane, vertices[0], vertices[1], vertices[2]);
456 else if (v1Clipped) clipTriangleOneVertex(clippedEdges, plane, vertices[1], vertices[2], vertices[0]);
457 else clipTriangleOneVertex(clippedEdges, plane, vertices[2], vertices[0], vertices[1]);
462 if (!v0Clipped) clipTriangleTwoVertices(clippedEdges, plane, vertices[0], vertices[1], vertices[2]);
463 else if (!v1Clipped) clipTriangleTwoVertices(clippedEdges, plane, vertices[1], vertices[2], vertices[0]);
464 else clipTriangleTwoVertices(clippedEdges, plane, vertices[2], vertices[0], vertices[1]);
555 const ClipVolumePlane* plane = planes[planeNdx];
556 const bool v0InsidePlane = plane->pointInClipVolume(vec4ToClipVec4(list[inputTriangleNdx].v0->position));
557 const bool v1InsidePlane = plane->pointInClipVolume(vec4ToClipVec4(list[inputTriangleNdx].v1->position));
558 const bool v2InsidePlane = plane->pointInClipVolume(vec4ToClipVec4(list[inputTriangleNdx].v2->position));