pub fn encode_direction(dir: &[f64; 3], n_freq: usize) -> Vec<f64>Expand description
Encode a unit viewing-direction vector with n_freq frequency bands per component.
Identical in structure to encode_position but intended for the lower-frequency
direction branch of NeRF (typically n_freq = 4).
Output length: 3 * (1 + 2 * n_freq).
§Arguments
dir– unit-length view direction[dx, dy, dz].n_freq– number of frequency bands L.