Fixed some things, enable parsing from anything that impl Read

This commit is contained in:
2018-06-07 17:41:02 +02:00
parent f730824f03
commit 66001b2f71
4 changed files with 173 additions and 49 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ use glium::glutin::VirtualKeyCode;
use model_converter::scene::Scene;
use model_converter::math::bounding_box::BoundingBox3;
use model_converter::math::vector::Vector3;
use model_converter::parser::parse;
use model_converter::parser::parse_file;
use model_converter::renderer::Renderer;
use model_converter::controls::{OrbitControls, FirstPersonControls};
use model_converter::camera::Camera;
@@ -65,7 +65,7 @@ fn main() {
let mut models = vec![];
for input in matches.values_of("input").unwrap() {
match parse(&input) {
match parse_file(&input) {
Ok(model) => {
if model.vertices.len() > 0 {
bbox = bbox.union(&model.bounding_box());