Browse Source

make heightmap abstract

Nicolas Cannasse 1 year ago
parent
commit
8a8e41dd10
1 changed files with 2 additions and 4 deletions
  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 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.
@@ -24,9 +24,7 @@ class HeightMap extends Collider {
 	/**
 		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 {
 		return getZ(pt.x, pt.y) > pt.z;