Add skeleton structs and impls for noise types
This commit is contained in:
parent
8139e634fb
commit
4159a214da
3 changed files with 46 additions and 2 deletions
|
@ -15,5 +15,8 @@
|
||||||
|
|
||||||
//! Procedural noise generation utility types
|
//! Procedural noise generation utility types
|
||||||
|
|
||||||
|
pub use self::perlin::Perlin;
|
||||||
|
pub use self::simplex::Simplex;
|
||||||
|
|
||||||
pub mod perlin;
|
pub mod perlin;
|
||||||
pub mod simplex;
|
pub mod simplex;
|
||||||
|
|
|
@ -13,4 +13,24 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// 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!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -13,4 +13,25 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// 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!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue