Home Index classes Index static functions Index enumerations Index structure types

{Geometry|_point_rectangle}


CLASS {Geometry|_point_rectangle} , UNTESTED, ABSTRACT:



IMPORT : {Mathematics} .


---------------------------------------------------- 'geometric primitives'

                     

STRUCTURE {point|_coordinates}

      REAL X|_position

      REAL Y|_position .



STRUCTURE {rect|angle}

      {point} Loc|ation

      REAL Width||W|_rectangle

      REAL Height||H|_rectangle .



FUNCTION Left|_of_rectangle ( {rect} R|ectangle ) ==> REAL



FUNCTION Top|_of_rectangle ( {rect} R|ectangle ) ==> REAL



FUNCTION Right|_of_rectangle ( {rect} R|ectangle ) ==> REAL



FUNCTION Bottom|_of_rectangle ( {rect} R|ectangle ) ==> REAL



FUNCTION Pt|_definition (
     
REAL X|_position ,
     
REAL Y|_position ) ==> {point}



FUNCTION Distance (
     
{point} P1|_coordinates ,
     
{point} P2|_coordinates ) ==> REAL



FUNCTION Contains|_pt (
     
{rect} R|ectangle ,
     
{point} P|t_to_check ) ==> BOOL



FUNCTION In|_point_in_rectangle (
     
{point} P|oint_tested ,
     
{rect} R|ectangle ) ==> BOOL



FUNCTION Same_pt|_point (
     
{point} P1|_to_compare ,
     
{point} P2|_to_compare ) ==> BOOL



FUNCTION Same_rect|angle (
     
{rect} R1|_to_compare ,
     
{rect} R2|_to_compare ) ==> BOOL



FUN Intersect|ed|_2_rectangles (
     
{rect} A|_parameter ,
     
{rect} B|_parameter ) ==> BOOL



FUNCTION Offset|_rectangle_or_point (
     
BOOL,{rect},{point} A|rgument ,
     
REAL Dx|_delta_x ,
     
REAL Dy|_delta_y ) ==> BOOL,{rect},{point}



FUNCTION Offset_by|_point (
     
BOOL,{rect},{point} A|rgument ,
     
{point} Off|set_x_y ) ==> BOOL,{rect},{point}



FUNCTION Offset_rect|angle (
     
{rect} R|ectangle_to_offset ,
     
REAL Dx|_delta_x ,
     
REAL Dy|_delta_y ) ==> {rect}



FUNCTION Offset_pt (
     
{point} P|oint_to_offset ,
     
REAL Dx|_delta_x ,
     
REAL Dy|_delta_y ) ==> {point}



FUNCTION Inflate|_rectagle (
     
{rect} R|ectangle_source ,
     
REAL Dx|_inflate ,
     
REAL Dy|_inflate ) ==> {rect}



FUNCTION S|tr|ing_from_rect_or_point (
     
STR,{rect},{point} V|alue_to_convert ) ==> STR



FUNCTION S_rect|angle_as_STR ( {rect} R|ectangle ) ==> STR



FUNCTION Sp|oint_as_STR || S_p|oint|_as_STR (
     
{point} P|oint_to_out ) ==> STR


END