scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
Loading...
Searching...
No Matches
scimesh::ClipPlane Struct Reference

A clipping plane that can hide parts of the scene. More...

#include <types.h>

Public Attributes

Vec3 normal = Vec3(0.0f, 0.0f, -1.0f)
 The plane normal vector (should be unit-length).
 
float offset = 0.0f
 Offset along the normal.
 

Detailed Description

A clipping plane that can hide parts of the scene.

A clip plane is defined by a normal vector and an offset. Anything on the "negative" side of the plane (where dot(point, normal) + offset < 0) is discarded during rendering.

Clip planes are useful for cross-section views (e.g., slicing through a brain mesh to show internal structures).

Example: clip everything behind Z=0
opts.clip_planes.push_back(ClipPlane{Vec3(0, 0, -1), 0.0f});
// negates everything with Z < 0
glm::vec3 Vec3
3-component floating-point vector (xyz).
Definition types.h:46
A clipping plane that can hide parts of the scene.
Definition types.h:224
All settings that control rendering output.
std::vector< ClipPlane > clip_planes
Optional clip planes for cross-section views.
See also
RenderOptions, RenderOptions::clip_planes

Definition at line 224 of file types.h.

Member Data Documentation

◆ normal

Vec3 scimesh::ClipPlane::normal = Vec3(0.0f, 0.0f, -1.0f)

The plane normal vector (should be unit-length).

Points toward the "keep" side of the plane. Default: (0, 0, -1), i.e., removing things behind Z=0.

Definition at line 229 of file types.h.

◆ offset

float scimesh::ClipPlane::offset = 0.0f

Offset along the normal.

A point p is kept when dot(p, normal) + offset >= 0.

Definition at line 234 of file types.h.


The documentation for this struct was generated from the following file: