consolidate imports
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
#[macro_use] extern crate gfx;
|
||||
#[macro_use] extern crate log;
|
||||
extern crate nalgebra as na;
|
||||
extern crate num_traits;
|
||||
extern crate piston;
|
||||
|
||||
pub mod arena;
|
||||
pub mod ega;
|
||||
|
||||
10
src/scene.rs
10
src/scene.rs
@@ -1,11 +1,9 @@
|
||||
use gfx;
|
||||
use na;
|
||||
use piston;
|
||||
use view;
|
||||
use vr;
|
||||
|
||||
extern crate gfx;
|
||||
extern crate gfx_device_gl;
|
||||
extern crate nalgebra as na;
|
||||
extern crate piston_window;
|
||||
|
||||
pub trait Scene<D: gfx::Device,
|
||||
F: gfx::Factory<D::Resources>> {
|
||||
fn event(&mut self, event: Event);
|
||||
@@ -24,5 +22,5 @@ pub trait Scene<D: gfx::Device,
|
||||
|
||||
pub enum Event {
|
||||
Vr(vr::Event),
|
||||
Piston(piston_window::Input),
|
||||
Piston(piston::input::Input),
|
||||
}
|
||||
|
||||
@@ -5,22 +5,17 @@ use vr;
|
||||
use world as model;
|
||||
use world::HasMap;
|
||||
|
||||
extern crate gfx;
|
||||
extern crate memmap;
|
||||
extern crate nalgebra as na;
|
||||
extern crate num_traits;
|
||||
extern crate openvr_sys;
|
||||
extern crate piston;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::marker::PhantomData;
|
||||
use std::time::SystemTime;
|
||||
|
||||
use gfx::tex;
|
||||
use gfx::{self, tex};
|
||||
use gfx::traits::FactoryExt;
|
||||
use self::na::ToHomogeneous;
|
||||
use self::num_traits::identities::One;
|
||||
use self::piston::input::{Button, Input, Key};
|
||||
use na::{self, ToHomogeneous};
|
||||
use num_traits::identities::One;
|
||||
use piston::input::{Button, Input, Key};
|
||||
|
||||
const PI: f32 = ::std::f32::consts::PI;
|
||||
const TWO_PI_CIRC: f32 = 2.0 * PI / 256.0;
|
||||
@@ -140,7 +135,7 @@ pub struct WorldScene<D: gfx::Device,
|
||||
|
||||
start_time: SystemTime,
|
||||
treadmills: (f32, f32),
|
||||
pads: BTreeMap<u32, (TrackMode, Option<openvr_sys::VRControllerState_t>)>,
|
||||
pads: BTreeMap<u32, (TrackMode, Option<vr::VRControllerState_t>)>,
|
||||
|
||||
_worldmap: model::World,
|
||||
lat: u8,
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
extern crate gfx;
|
||||
|
||||
use ega;
|
||||
|
||||
use ::std;
|
||||
use std::io::Read;
|
||||
use std::path::Path;
|
||||
|
||||
use self::gfx::{CommandBuffer, Typed};
|
||||
use self::gfx::tex;
|
||||
use gfx::{self, CommandBuffer, Typed};
|
||||
use gfx::tex;
|
||||
|
||||
const TILEDIM: u16 = 16;
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
use vr;
|
||||
use vr::{AsMatrix4, VR};
|
||||
use vr::{self, AsMatrix4, VR};
|
||||
|
||||
extern crate gfx_device_gl;
|
||||
extern crate nalgebra as na;
|
||||
extern crate num_traits;
|
||||
extern crate piston_window;
|
||||
|
||||
use gfx;
|
||||
use gfx::Device;
|
||||
use gfx::traits::FactoryExt;
|
||||
use self::na::{Inverse, ToHomogeneous};
|
||||
use na::{self, Inverse, ToHomogeneous};
|
||||
use self::piston_window::{PistonWindow, Window};
|
||||
|
||||
pub type ColorFormat = gfx::format::Srgba8;
|
||||
|
||||
14
src/vr.rs
14
src/vr.rs
@@ -1,19 +1,17 @@
|
||||
extern crate gfx;
|
||||
extern crate gfx_device_gl;
|
||||
extern crate nalgebra as na;
|
||||
extern crate num_traits;
|
||||
extern crate openvr as vr;
|
||||
extern crate openvr_sys;
|
||||
|
||||
pub use self::vr::Eye;
|
||||
pub use self::vr::common::Size;
|
||||
pub use self::vr::tracking::{TrackedDeviceClass, TrackedDevicePoses};
|
||||
pub use self::openvr_sys::VRControllerState_t;
|
||||
|
||||
use gfx::{self, tex, Factory, Typed};
|
||||
use na::{self, Inverse};
|
||||
use num_traits::identities::Zero;
|
||||
use num_traits::identities::One;
|
||||
|
||||
use self::gfx::{tex, Factory, Typed};
|
||||
use self::gfx_device_gl::Resources as GLResources;
|
||||
use self::na::Inverse;
|
||||
use self::num_traits::identities::Zero;
|
||||
use self::num_traits::identities::One;
|
||||
use self::openvr_sys::{VREvent_Controller_t, VREvent_t};
|
||||
|
||||
pub struct VR {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
extern crate core;
|
||||
extern crate itertools;
|
||||
|
||||
use self::itertools::Itertools;
|
||||
|
||||
Reference in New Issue
Block a user