0.3.1
Depth Calculations

Files

file  mic3d.h
 

Functions

int32_t depth_value_normalize (fix16_t z)
 Normalize the Z value relative to the sort depth set by.
 
int16_t depth_min_calculate (const int16_t *z_values)
 Given 4 z_values, calculate the unnormalized Z value closest to the camera.
 
int16_t depth_max_calculate (const int16_t *z_values)
 Given 4 z_values, calculate the unnormalized Z value furthest from the camera.
 
int16_t depth_center_calculate (const int16_t *z_values)
 Give 4 z_values, calculate the center Z point.
 

Detailed Description

Function Documentation

◆ depth_value_normalize()

int32_t depth_value_normalize ( fix16_t  z)

Normalize the Z value relative to the sort depth set by.

See also
render_sort_depth_set.
Parameters
z
Returns
Normalized Z depth from 0 to sort depth.

◆ depth_min_calculate()

int16_t depth_min_calculate ( const int16_t z_values)

Given 4 z_values, calculate the unnormalized Z value closest to the camera.

Parameters
[in]z_values
Returns
The closest unnormalized Z value to the camera.

◆ depth_max_calculate()

int16_t depth_max_calculate ( const int16_t z_values)

Given 4 z_values, calculate the unnormalized Z value furthest from the camera.

Parameters
[in]z_values
Returns
The furtherst unnormalized Z value from the camera.

◆ depth_center_calculate()

int16_t depth_center_calculate ( const int16_t z_values)

Give 4 z_values, calculate the center Z point.

Parameters
[in]z_values
Returns
The unnormalized center Z point.