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

A world-space point projected into the rendered image. More...

#include <camera.h>

Public Attributes

Vec2 pixel = Vec2(0.0f)
 Pixel coordinates, origin at the top left, y growing down.
 
float depth = 1.0f
 Depth in normalized device coordinates, in [-1, 1]; smaller values are closer to the camera.
 
bool in_front = false
 Whether the point is in front of the camera.
 

Detailed Description

A world-space point projected into the rendered image.

See also
world_to_screen()

Definition at line 135 of file camera.h.

Member Data Documentation

◆ depth

float scimesh::ProjectedPoint::depth = 1.0f

Depth in normalized device coordinates, in [-1, 1]; smaller values are closer to the camera.

Comparable with Rasterizer::z_buffer, which uses the same units.

Definition at line 143 of file camera.h.

◆ in_front

bool scimesh::ProjectedPoint::in_front = false

Whether the point is in front of the camera.

False for points at or behind the camera plane, where pixel is not meaningful and the point cannot be visible.

Definition at line 149 of file camera.h.

◆ pixel

Vec2 scimesh::ProjectedPoint::pixel = Vec2(0.0f)

Pixel coordinates, origin at the top left, y growing down.

Definition at line 137 of file camera.h.


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