mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-12-07 08:34:21 +00:00
24 lines
503 B
Haxe
24 lines
503 B
Haxe
package dif;
|
|
|
|
import dif.io.BytesWriter;
|
|
import dif.io.BytesReader;
|
|
|
|
@:expose
|
|
class Plane {
|
|
public var normalIndex:Int;
|
|
public var planeDistance:Float;
|
|
|
|
public function new(normalIndex, planeDistance) {
|
|
this.normalIndex = normalIndex;
|
|
this.planeDistance = planeDistance;
|
|
}
|
|
|
|
public static function read(io:BytesReader) {
|
|
return new Plane(io.readInt16(), io.readFloat());
|
|
}
|
|
|
|
public function write(io:BytesWriter) {
|
|
io.writeInt16(this.normalIndex);
|
|
io.writeFloat(this.planeDistance);
|
|
}
|
|
}
|