111 auto add = [&](
const Vec3 &
p) {
132 size_t size()
const {
return std::min(
from.size(),
to.size()); }
glm::mat4 Mat4
4×4 floating-point matrix.
glm::vec3 Vec3
3-component floating-point vector (xyz).
An RGBA color with floating-point components.
A batch of independent line segments drawn with a fixed screen-space width.
size_t size() const
Number of segments in this layer.
std::vector< Vec3 > from
Segment start points, in world space.
float width
Line width in screen pixels (default: 1.0).
bool lit
Whether to apply lighting to the lines (default: false).
bool depth_test
Whether to test the lines against the depth buffer (default: true).
bool affects_bounds
Whether this layer contributes to the bounding box of its scene (default: true).
bool compute_bounding_box(Vec3 &min_bound, Vec3 &max_bound) const
Compute the bounding box of all segment endpoints.
bool empty() const
Whether this layer holds no segments to draw.
std::vector< Color > colors
One color per segment; may be empty (then the renderer uses RenderOptions::default_color) or shorter ...
Color color_or(size_t i, const Color &fallback) const
Color of segment i, falling back to fallback when the layer holds no colors at all.
std::vector< Vec3 > to
Segment end points, in world space (one per entry in from).
A non-owning reference to one line layer in a scene, together with its placement transform (and optio...
const LineLayer * layer
Pointer to the owned layer (never null for a valid node).
std::string name
Optional node name (used by exporters / debugging).
Mat4 transform
Model matrix placing the lines in world space.
int x
Left edge of the bitmap, in image pixels.
Fundamental types used throughout the scimesh rendering engine.