summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-23 15:44:50 +0200
committerErich Eckner <git@eckner.net>2018-06-23 15:44:50 +0200
commitabdf1f9dd7520230a1eea1a7d15cc1beec3a73dd (patch)
tree703acb54e79a6314c6075d589b823b617817bfd5
parentf3e362ad5a6f8f4b79bb2fa209f40d597fb46edc (diff)
downloadunits-abdf1f9dd7520230a1eea1a7d15cc1beec3a73dd.tar.xz
lowlevelunit.pas: neue tExtPoint3d-Routinen
-rw-r--r--lowlevelunit.pas35
1 files changed, 35 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas
index 5a09da9..7c7ade1 100644
--- a/lowlevelunit.pas
+++ b/lowlevelunit.pas
@@ -66,16 +66,19 @@ operator + (x1,x2: t2x2Extended): t2x2Extended;
operator + (x1,x2: tInt64Point): tInt64Point;
operator + (x1,x2: tIntPoint): tIntPoint;
operator + (x1,x2: tExtPoint): tExtPoint;
+operator + (x1,x2: tExt3dPoint): tExt3dPoint;
operator - (x1,x2: t2x2Extended): t2x2Extended;
operator - (x1,x2: tInt64Point): tInt64Point;
operator - (x1,x2: tIntPoint): tIntPoint;
operator - (x1,x2: tExtPoint): tExtPoint;
+operator - (x1,x2: tExt3dPoint): tExt3dPoint;
operator * (a: extended; x: t2x2Extended): t2x2Extended;
operator * (a: int64; x: tInt64Point): tInt64Point;
operator * (a: extended; x: tInt64Point): tExtPoint;
operator * (a: longint; x: tIntPoint): tIntPoint;
operator * (a: extended; x: tIntPoint): tExtPoint;
operator * (a: extended; x: tExtPoint): tExtPoint;
+operator * (a: extended; x: tExt3dPoint): tExt3dPoint;
function round(x: tExtPoint): tInt64Point; overload;
function symmetrischModulo(x,m: tInt64Point): tInt64Point; overload;
@@ -131,6 +134,7 @@ function extPoint(x,y: extended): tExtPoint; overload;
function extPoint(x: tInt64Point): tExtPoint; overload;
function _2x2Longint(xx,xy,yx,yy: longint): t2x2Longint;
function _2x2Extended(xx,xy,yx,yy: extended): t2x2Extended;
+function ext3dPoint(x,y,z: extended): tExt3dPoint;
function hexDump(p: pointer; cnt: longint): string;
function base64ToBin(var s: string): boolean;
@@ -256,6 +260,14 @@ begin
result[c]:=x1[c]+x2[c];
end;
+operator + (x1,x2: tExt3dPoint): tExt3dPoint;
+var
+ c: char;
+begin
+ for c:='x' to 'z' do
+ result[c]:=x1[c]+x2[c];
+end;
+
operator - (x1,x2: t2x2Extended): t2x2Extended;
var
c,d: char;
@@ -289,6 +301,14 @@ begin
result[c]:=x1[c]-x2[c];
end;
+operator - (x1,x2: tExt3dPoint): tExt3dPoint;
+var
+ c: char;
+begin
+ for c:='x' to 'z' do
+ result[c]:=x1[c]-x2[c];
+end;
+
operator * (a: extended; x: t2x2Extended): t2x2Extended;
var
c,d: char;
@@ -338,6 +358,14 @@ begin
result[c]:=a*x[c];
end;
+operator * (a: extended; x: tExt3dPoint): tExt3dPoint;
+var
+ c: char;
+begin
+ for c:='x' to 'z' do
+ result[c]:=a*x[c];
+end;
+
// allgemeine Funktionen *******************************************************
function round(x: tExtPoint): tInt64Point;
@@ -970,6 +998,13 @@ begin
result['y','y']:=yy;
end;
+function ext3dPoint(x,y,z: extended): tExt3dPoint;
+begin
+ result['x']:=x;
+ result['y']:=y;
+ result['z']:=z;
+end;
+
function hexDump(p: pointer; cnt: longint): string;
var
i: longint;