scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
Loading...
Searching...
No Matches
clipping.h
Go to the documentation of this file.
1
8
9#pragma once
10
11#include <scimesh/types.h>
12#include <vector>
13
14namespace scimesh {
15
26
42 const ClipVertex &v0,
43 const ClipVertex &v1,
44 const ClipVertex &v2,
45 std::vector<ClipVertex> &output_vertices,
46 std::vector<Triangle> &output_triangles);
47
66 const Vec3 &v0, const Vec3 &v1, const Vec3 &v2,
67 const Vec3 &n0, const Vec3 &n1, const Vec3 &n2,
68 const Color &c0, const Color &c1, const Color &c2,
69 const Vec2 &uv0, const Vec2 &uv1, const Vec2 &uv2,
70 const ClipPlane &plane,
71 std::vector<ClipVertex> &output_vertices,
72 std::vector<Triangle> &output_triangles);
73
74} // namespace scimesh
glm::vec2 Vec2
2-component floating-point vector (xy).
Definition types.h:32
glm::vec3 Vec3
3-component floating-point vector (xyz).
Definition types.h:46
int 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.
Definition clipping.cpp:162
int 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.
Definition clipping.cpp:67
glm::vec4 Vec4
4-component floating-point vector (xyzw).
Definition types.h:52
Vec2 uv1
Definition renderer.cpp:24
Vec2 uv0
Definition renderer.cpp:24
Vec2 uv2
Definition renderer.cpp:24
A clipping plane that can hide parts of the scene.
Definition types.h:224
A processed vertex in clip space, ready for perspective divide.
Definition clipping.h:20
Color color
Vertex color.
Definition clipping.h:22
Vec2 uv
Texture coordinates.
Definition clipping.h:24
Vec3 normal
Vertex normal (in view space).
Definition clipping.h:23
Vec4 position
Homogeneous clip-space position (before divide by w).
Definition clipping.h:21
An RGBA color with floating-point components.
Definition types.h:88
Fundamental types used throughout the scimesh rendering engine.