From 7b94aff6cd4b638db83168a335aee0bcbe72a51d Mon Sep 17 00:00:00 2001 From: Rene Eichhorn Date: Sun, 10 Apr 2016 15:10:06 +0200 Subject: [PATCH] fixed project name, added travis to build docs --- .travis.yml | 17 ++++++++++++++--- Cargo.lock | 11 +++++++++++ Cargo.toml | 9 +++++---- LICENSE.md | 8 ++++++++ Readme.md | 4 ++-- src/lib.rs | 14 ++++++-------- 6 files changed, 46 insertions(+), 17 deletions(-) create mode 100644 Cargo.lock create mode 100644 LICENSE.md diff --git a/.travis.yml b/.travis.yml index b4f863c..b787ce3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,16 @@ language: rust rust: - - stable - - beta - - nightly +- stable +- beta +- nightly +after_success: | + [ $TRAVIS_BRANCH = master ] && + [ $TRAVIS_PULL_REQUEST = false ] && + cargo doc && + echo "" > target/doc/index.html && + sudo pip install ghp-import && + ghp-import -n target/doc && + git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages +env: + global: + secure: EWhZMkAWuLzClX2ccFavodnxIlthv/Xc/n2oP9lmddvhqVlHC9MeVKZj/9rLYYhDA6AWNPv9m79aRZJ3PNf/iuIuf1jC1VNDIuD4teCbFMrX3C1QcUN37llEIu4n8YlPRFa2gLYRVqyh5rWS+zde/RM/3b8cw0i8/k/yux/ehqbFUSYcRVuZWNtBwUJw0Nmzii/nzzz6zTdPWqsOkoIjDbexQnceZ7TzrZbJBfJeU8xyiGLaZDTUSOsvQWw157uwX1nq9XOLutth0dbbCixFALa6ALU7n+x5XMDZGdo+F61ul3qHX8ZnPZ4Wl2DEzC9zVyB/ECG9TdUUiGHshEhLXa/FBKqTG6D9NSAsrEhcqlQ/ZIIuCS9PQEQCILJqaZbykx0AUi1W237AGUb2sKOCXHqPn7SiiYTtIMNPk8RumeNtxOGp+AAC/50epGocDOXglCEM6EcdwYtp6nSi9dqmRoBkNMJwWYjddx/OA/cU8tBMEVXpgRUe/vLj+gUqNcCGFvQ1Yd+wsBAklvwzn3fuVDgyWo/hIhJy8wpAEoiv+wJbzjnaseGoMRUDEwLHChzMUNbFmVdfve/oZlHyvpHlkwmuwy5B8BsppcJr6CoQ85DD1k4tM3dDGeZ3XSFAd33n5adsrLtx6nQlGfbzTaXZp9u0n7Hv6vBNz9DEreBifa0= diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..2197154 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,11 @@ +[root] +name = "openvr" +version = "0.2.0" +dependencies = [ + "openvr_sys 0.1.0", +] + +[[package]] +name = "openvr_sys" +version = "0.1.0" + diff --git a/Cargo.toml b/Cargo.toml index 11c6caa..bc2fe7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,10 @@ [package] -name = "vr" -version = "0.1.0" +name = "openvr" +version = "0.2.0" authors = [ "Colin Sherratt", - "Erick Tryzelaar" + "Erick Tryzelaar", + "Rene Eichhorn" ] [lib] @@ -11,4 +12,4 @@ name = "vr" path = "src/lib.rs" [dependencies.openvr_sys] -path = "src/sys/" \ No newline at end of file +path = "src/sys/" diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..f51651a --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2016 Colin Sherratt, Erick Tryzelaar, Rene Eichhorn + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Readme.md b/Readme.md index 23b6c27..7a4a2bb 100644 --- a/Readme.md +++ b/Readme.md @@ -29,14 +29,14 @@ Using rust-openvr extern crate openvr; -use ovr::{SensorCapabilities, Ovr}; +use openvr::{SensorCapabilities, Ovr}; fn main() { // Initalize the Oculus VR library let ovr = match Ovr::init() { Some(ovr) => ovr, None => { - println!("Could not initialize Oculus SDK"); + println!("Could not initialize OpenVR SDK"); return; } }; diff --git a/src/lib.rs b/src/lib.rs index 798bdf5..8c6d2fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,3 @@ - - extern crate openvr_sys; pub struct IVRSystem(*const ()); @@ -184,7 +182,7 @@ impl IVRSystem { } } - /// Computes the distortion caused by the optics + /// Computes the distortion caused by the optics pub fn compute_distortion(&self, eye: Eye, u: f32, v: f32) -> DistortionCoordinates { unsafe { let coord = openvr_sys::VR_IVRSystem_ComputeDistortion( @@ -197,10 +195,10 @@ impl IVRSystem { blue: coord.rfBlue, green: coord.rfGreen } - } + } } - /// Computes the distortion caused by the optics + /// Computes the distortion caused by the optics pub fn eye_to_head_transform(&self, eye: Eye) -> [[f32; 4]; 3] { unsafe { let mat = openvr_sys::VR_IVRSystem_GetEyeToHeadTransform( @@ -208,10 +206,10 @@ impl IVRSystem { eye.to_raw(), ); mat.m - } + } } - /// Computes the distortion caused by the optics + /// Computes the distortion caused by the optics pub fn time_since_last_vsync(&self) -> Option<(f32, u64)> { unsafe { let mut frame = 0; @@ -227,7 +225,7 @@ impl IVRSystem { } else { None } - } + } } /// Fetch the tracked results from the HMD