浏览代码

make heightmap abstract

Nicolas Cannasse 1 年之前
父节点
当前提交
8a8e41dd10
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      h3d/col/HeightMap.hx

+ 2 - 4
h3d/col/HeightMap.hx

@@ -5,7 +5,7 @@ package h3d.col;
 	In order to use, you need to extends this class and override the getZ method
 	In order to use, you need to extends this class and override the getZ method
 	in order to return appropriate Z value based on X and Y coordinates.
 	in order to return appropriate Z value based on X and Y coordinates.
 **/
 **/
-class HeightMap extends Collider {
+abstract class HeightMap extends Collider {
 
 
 	/**
 	/**
 		When performing raycast check, tells by how much step we advance.
 		When performing raycast check, tells by how much step we advance.
@@ -24,9 +24,7 @@ class HeightMap extends Collider {
 	/**
 	/**
 		Returns the height value at given coordinates.
 		Returns the height value at given coordinates.
 	**/
 	**/
-	public function getZ( x : Float, y : Float ) : Float {
-		throw "Not implemented: requires override";
-	}
+	abstract function getZ( x : Float, y : Float ) : Float;
 
 
 	public inline function contains( pt : Point ) : Bool {
 	public inline function contains( pt : Point ) : Bool {
 		return getZ(pt.x, pt.y) > pt.z;
 		return getZ(pt.x, pt.y) > pt.z;