|
scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
|
Triangle clipping against planes (view frustum and clip planes). More...


Go to the source code of this file.
Classes | |
| struct | scimesh::ClipVertex |
| A processed vertex in clip space, ready for perspective divide. More... | |
Namespaces | |
| namespace | scimesh |
Functions | |
| int | scimesh::clip_triangle_near_plane (const ClipVertex &v0, const ClipVertex &v1, const ClipVertex &v2, std::vector< ClipVertex > &output_vertices, std::vector< Triangle > &output_triangles) |
| Clip a triangle against the near clipping plane in clip space. | |
| int | scimesh::clip_triangle_view_plane (const Vec3 &v0, const Vec3 &v1, const Vec3 &v2, const Vec3 &n0, const Vec3 &n1, const Vec3 &n2, const Color &c0, const Color &c1, const Color &c2, const Vec2 &uv0, const Vec2 &uv1, const Vec2 &uv2, const ClipPlane &plane, std::vector< ClipVertex > &output_vertices, std::vector< Triangle > &output_triangles) |
| Clip a triangle against an arbitrary plane in view space. | |
Triangle clipping against planes (view frustum and clip planes).
Clipping ensures that only the visible portion of triangles that cross the view frustum boundaries or user-specified clip planes is drawn. Without clipping, triangles that extend outside the view would produce visual artifacts.
Definition in file clipping.h.