ultimate-research / ssbh_lib

Reading and writing SSBH file formats in Rust
MIT License
8 stars 3 forks source link

add functions to generate normals, tangents, and bitangents (binormals) #62

Open ScanMountGoat opened 3 years ago

ScanMountGoat commented 3 years ago

This will require updating geometry_tools.

ScanMountGoat commented 3 years ago

Potential usage example for ssbh_data (and ssbh_data_py). It might be nice for the function to handle different vector lengths automatically.

let normals: Vec<[f32; 4]> = calculate_normals(&data.positions[0].data, &data.vertex_indices)?;