(******************************************************************************
*                                PNT3I11 .DEF                                 *
*                              ABO Software Dep.                              *
*                                                                             *
* Purpose : To provide a 3D integer point definition,and all the simple vector*
*         operations                                                          *
*                                                                             *
*   Notes : Also included are routines for conversion to and from real points.*
*                                                                             *
*         Version Date : 22/10/92                                             *
******************************************************************************)
DEFINITION MODULE PNT3I1;

FROM PNT3D1 IMPORT Point3D;

TYPE
  Point3I = RECORD
    X   :LONGINT;
    Y   :LONGINT;
    Z   :LONGINT;
  END;

CONST
  ovector = Point3I(0, 0, 0);
  ivector = Point3I(1, 0, 0);
  jvector = Point3I(0, 1, 0);
  kvector = Point3I(0, 0, 1);

PROCEDURE topoint3D(p1	:Point3I):Point3D;

PROCEDURE topoint3I(p1	:Point3D):Point3I;

PROCEDURE debugp(p1      :Point3I);

PROCEDURE length(p1      : Point3I):LONGINT;

PROCEDURE dot (p1,p2     : Point3I):LONGINT;

PROCEDURE cross(p1,p2    : Point3I):Point3I;

PROCEDURE sub (p1,p2     : Point3I):Point3I;

PROCEDURE add (p1,p2     : Point3I):Point3I;

PROCEDURE neg (p1        : Point3I):Point3I;

PROCEDURE scale(scale    : LONGINT;
                p1       : Point3I) :Point3I;

PROCEDURE normal(po,p1,p2:Point3I):Point3I;

PROCEDURE surfacex(
	po,norm: Point3I;
	y,z    : LONGINT) :LONGINT;

PROCEDURE surfacey(
	po,norm: Point3I;
	x,z    : LONGINT) :LONGINT;

PROCEDURE surfacez(
	po,norm: Point3I;
	x,y    : LONGINT) :LONGINT;

END PNT3I1.
