Add skeleton structs and impls for noise types

This commit is contained in:
Brendan Zabarauskas 2013-07-12 12:20:11 +10:00
parent 8139e634fb
commit 4159a214da
3 changed files with 46 additions and 2 deletions

View file

@ -15,5 +15,8 @@
//! Procedural noise generation utility types
pub use self::perlin::Perlin;
pub use self::simplex::Simplex;
pub mod perlin;
pub mod simplex;

View file

@ -13,4 +13,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// TODO
use geom::{Point2, Point3};
pub struct Perlin<T>;
impl<T> Perlin<T> {
pub fn new() -> Perlin<T> {
fail!("Not yet implemented!")
}
pub fn noise1(&self, _x: T) -> T {
fail!("Not yet implemented!")
}
pub fn noise2(&self, _pos: Point2<T>) -> T {
fail!("Not yet implemented!")
}
pub fn noise3(&self, _pos: Point3<T>) -> T {
fail!("Not yet implemented!")
}
}

View file

@ -13,4 +13,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// TODO
use core::Vec4;
use geom::{Point2, Point3};
pub struct Simplex<T>;
impl<T> Simplex<T> {
pub fn new() -> Simplex<T> {
fail!("Not yet implemented!")
}
pub fn noise2(&self, _pos: Point2<T>) -> T {
fail!("Not yet implemented!")
}
pub fn noise3(&self, _pos: Point3<T>) -> T {
fail!("Not yet implemented!")
}
pub fn noise4(&self, _vec: Vec4<T>) -> T {
fail!("Not yet implemented!")
}
}