rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
ring_cut_t Struct Reference

The directions of a partial ring that need no angle worked out: the middle of its lit part, drawn in the full colour at the full coverage, and the middle of its gap, drawn not at all. More...

Data Fields

float mx
float my
bool has_in
float in_cos
bool has_out
float out_cos

Detailed Description

The directions of a partial ring that need no angle worked out: the middle of its lit part, drawn in the full colour at the full coverage, and the middle of its gap, drawn not at all.

A pixel's distance from the arc's middle direction is read off the dot product with that direction, without atan2f(): within in_cos of it the pixel is further than the fade and half a pixel of arc inside both ends, beyond out_cos it is half a pixel of arc outside them, each with 0.5deg to spare. Between the two the angle is worked out as before, so every pixel comes out as it did.

Field Documentation

◆ has_in

bool ring_cut_t::has_in

in_cos holds

◆ has_out

bool ring_cut_t::has_out

out_cos holds

◆ in_cos

float ring_cut_t::in_cos

cosine within which a pixel is lit whole

◆ mx

float ring_cut_t::mx

the middle direction's x

◆ my

float ring_cut_t::my

its y, up the screen as +y

◆ out_cos

float ring_cut_t::out_cos

cosine beyond which a pixel is in the gap


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