Module #02.03.03 : Incremental spatial search

All PVT documentation can be found under PHIGS Validation Tests - Overview. You may also return to the hierarchical table of topics covered by the PVT. For an explanation of the format of the individual module documentation, please see section 2.5 of the User's Guide.


DESCRIPTION: This module tests the capabilities of the
incremental spatial search feature.  This feature should allow
the program to look for graphical primitives within a specified
section of a structure network, based on their location in world
co-ordinates.  The term "ISS" is used throughout to apply to both
the two-dimensional and three-dimensional incremental spatial
search.

SEMANTIC REQUIREMENTS:

*** *** *** ***   2D vs. 3D   *** *** *** ***


SR1. <Incremental spatial search> behaves exactly like <incremental spatial search 3> with the z-co-ordinate of the search reference point = 0.
#F 311 312
#D
#S
#T P01/1 P01/2 P01/4 P01/7 P01/9 P01/11 P01/12 P01/14 P01/16 P02/1
#T P02/3 P02/5 P02/6 P02/8 P02/10 P02/12 P02/15 P05/1 P05/2 P05/3
#T P05/4 P05/5 P05/6
*** *** *** ***   Conceptual traversal   *** *** *** ***


SR2. ISS performs a conceptual traversal (including the setting of the PHIGS traversal state list) of the structure network whose root is the first structure in the starting path. This conceptual traversal consists of a setup process and a search process.
#F 113 311 312
#D 3 7
#S 4.4.6/30/9
#T P01/1 P01/2 P01/3 P01/4 P01/5 P01/6 P01/7 P01/8 P01/9 P01/10 P01/11
#T P01/12 P01/13 P01/14 P01/15 P01/16 P01/17 P02/1 P02/2 P02/3 P02/4
#T P02/5 P02/6 P02/7 P02/8 P02/9 P02/10 P02/11 P02/12 P02/13 P02/14
#T P02/15 P02/16 P03/1 P03/2 P03/3 P03/4 P03/5 P03/6 P03/7 P03/8 P03/9
#T P03/10 P03/11 P03/12 P03/13 P04/1 P04/2 P04/3 P04/4 P04/5 P04/6
#T P05/1 P05/2 P05/3 P05/4 P05/5 P05/6 P06/1 P06/2 P06/3 P06/4 P06/5
#T P06/6

SR3. The setup process is the part of the conceptual traversal up to and including the position specified by the starting path; the PHIGS traversal state list is maintained, but no graphical primitives are examined.
#F 311 312
#D 3 7
#S 4.4.6/30/9
#T P05/1 P05/2 P05/3 P05/4 P05/5 P05/6 P06/1 P06/2 P06/3 P06/4 P06/5
#T P06/6 P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P07/9 P07/10
#T P07/11 P07/12 P07/15 P07/16 P07/17

SR4. The search process is the part of the conceptual traversal beginning immediately after the position specified by the starting path is reached and ending either immediately after the last element of the structure indicated by the search ceiling is reached or when a qualifying graphical primitive is found, whichever occurs first.
#F 311 312
#D 3 7
#S 4.4.6/30/9 4.4.6/31/4 4.4.6/31/5
#T P01/1 P01/2 P01/3 P01/4 P01/5 P01/6 P01/7 P01/8 P01/9 P01/10 P01/11
#T P01/12 P01/13 P01/14 P01/15 P01/16 P01/17 P02/1 P02/2 P02/3 P02/4
#T P02/5 P02/6 P02/7 P02/8 P02/9 P02/10 P02/11 P02/12 P02/13 P02/14
#T P02/15 P02/16 P03/1 P03/2 P03/3 P03/4 P03/5 P03/6 P03/7 P03/8 P03/9
#T P03/10 P03/11 P03/12 P03/13 P04/1 P04/2 P04/3 P04/4 P04/5 P04/6
#T P05/1 P05/2 P05/3 P05/4 P05/5 P05/6 P06/1 P06/2 P06/3 P06/4 P06/5
#T P06/6 P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P07/9 P07/10
#T P07/11 P07/12 P07/15 P07/16 P07/17

SR5. If a qualifying graphical primitive is found, ISS returns the path (from the root of the network) of the structure element which generated it, otherwise ISS returns a null path.
#F 311 312
#D 3 7
#S 4.4.6/31/6
#T P01/1 P01/2 P01/3 P01/4 P01/5 P01/6 P01/7 P01/8 P01/9 P01/10 P01/11
#T P01/12 P01/13 P01/14 P01/15 P01/16 P01/17 P02/1 P02/2 P02/3 P02/4
#T P02/5 P02/6 P02/7 P02/8 P02/9 P02/10 P02/11 P02/12 P02/13 P02/14
#T P02/15 P02/16 P03/1 P03/2 P03/3 P03/4 P03/5 P03/6 P03/7 P03/8 P03/9
#T P03/10 P03/11 P03/12 P03/13 P04/1 P04/2 P04/3 P04/4 P04/5 P04/6
#T P05/1 P05/2 P05/3 P05/4 P05/5 P05/6 P06/1 P06/2 P06/3 P06/4 P06/5
#T P06/6 P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P07/9 P07/10
#T P07/11 P07/12 P07/15 P07/16 P07/17

SR6. A graphical primitive qualifies if and only if its locus intersects the search reference volume and its nameset is compatible with the normal and inverted filter list.
#F 9-24 60 61 311 312
#D 3 3.11 7 7.3.2.7.1 7.3.2.7.2
#S 4.4.6/30/9 4.4.6/31/1
#T P01/1 P01/2 P01/3 P01/4 P01/5 P01/6 P01/7 P01/8 P01/9 P01/10 P01/11
#T P01/12 P01/13 P01/14 P01/15 P01/16 P01/17 P02/1 P02/2 P02/3 P02/4
#T P02/5 P02/6 P02/7 P02/8 P02/9 P02/10 P02/11 P02/12 P02/13 P02/14
#T P02/15 P02/16 P03/1 P03/2 P03/3 P03/4 P03/5 P03/6 P03/7 P03/8 P03/9
#T P03/10 P03/11 P03/12 P03/13 P04/1 P04/2 P04/3 P04/4 P04/5 P04/6
#T P05/1 P05/2 P05/3 P05/4 P05/5 P05/6 P06/1 P06/2 P06/3 P06/4 P06/5
#T P06/6 P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P07/9 P07/10
#T P07/11 P07/12 P07/15 P07/16 P07/17

SR7. If the element position of the last entry in the starting path is 0, the specified position is that immediately preceding the first element (if any) of the structure named in that entry.
#F 311 312
#D 7.1 7.3
#S 4.4.6/30/9
#T P01/1 P01/2 P01/3 P01/4 P01/5 P01/6 P01/7 P01/8 P01/9 P01/10 P01/11
#T P01/12 P01/13 P01/14 P01/15 P01/16 P01/17 P02/1 P02/2 P02/3 P02/4
#T P02/5 P02/6 P02/7 P02/8 P02/9 P02/10 P02/11 P02/12 P02/13 P02/14
#T P02/15 P02/16 P03/1 P03/2 P03/3 P03/4 P03/5 P03/6 P03/7 P03/8 P03/9
#T P03/10 P03/11 P03/12 P03/13 P04/3 P05/1 P05/2 P05/3 P05/4 P05/5

SR8. The structure indicated by a search ceiling = n is the structure specified in the nth element of the starting path.
#F 311 312
#D 7.1 7.3.4
#S 4.4.6/31/5
#T P04/3 P04/5 P04/6 P06/1

*** *** *** ***   Search reference volume   *** *** *** ***


SR9. If the search distance is greater than zero, the search reference volume (in world co-ordinates) is the sphere whose center is the search reference point and whose radius equals the search distance; otherwise it is simply the search reference point.
#F 311 312
#D
#S 4.4.6/31/1
#T P01/1 P01/2 P01/3 P01/4 P01/5 P01/6 P01/7 P01/8 P01/9 P01/10 P01/11
#T P01/12 P01/13 P01/14 P01/15 P01/16 P01/17 P02/1 P02/2 P02/3 P02/4
#T P02/5 P02/6 P02/7 P02/8 P02/9 P02/10 P02/11 P02/12 P02/13 P02/14
#T P02/15 P02/16 P03/1 P03/2 P03/3 P03/4 P03/5 P03/6 P03/7 P03/8 P03/9
#T P03/10 P03/11 P03/12 P03/13 P04/1 P04/2 P04/3 P04/4 P04/5 P04/6
*** *** *** ***   Locus of graphical primitives   *** *** *** ***


SR10. The locus of a graphical primitive (in world co-ordinates) is obtained from the locus of the generating structure element (in modelling co-ordinates) by first applying the current composite modelling transformation, and then, if and only if the modelling clip flag parameter is CLIP, applying the current modelling clipping volume.
#F 9-24 75-80 82 311 312
#D 3.12.1 3.12.2 3.12.3
#D 7.3.1 7.3.3.1 7.3.3.2 7.3.3.3 7.3.3.4 7.3.3.5 7.3.3.6 7.3.3.8
#S 4.7.3/80/1
#T P01/1 P01/2 P01/3 P01/4 P01/5 P01/6 P01/7 P01/8 P01/9 P01/10 P01/11
#T P01/12 P01/13 P01/14 P01/15 P01/16 P01/17 P02/1 P02/2 P02/3 P02/4
#T P02/5 P02/6 P02/7 P02/8 P02/9 P02/10 P02/11 P02/12 P02/13 P02/14
#T P02/15 P02/16 P03/1 P03/2 P03/3 P03/4 P03/5 P03/6 P03/7 P03/8 P03/9
#T P03/10 P03/11 P03/12 P03/13 P06/1 P06/2 P06/3 P06/4 P06/5 P06/6
#T P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P07/9 P07/10 P07/11
#T P07/12 P07/15 P07/16 P07/17
#X 06.01.02
#C The current modelling clipping indicator in the PHIGS
traversal state list is ignored.


SR11. The locus of a polymarker structure element is the specified set of points.
#F 11 12 311 312
#D 7.3.1.3 7.3.1.4
#S 4.5.1/34/1
#T P01/1 P01/2 P01/3 P02/1 P02/2

SR12. The locus of a polyline structure element is set of line segments connecting the specified sequence of points.
#F 9 10 311 312
#D 7.3.1.1 7.3.1.2
#S 4.5.1/34/1
#T P01/4 P01/5 P01/6 P02/3 P02/4 P03/1 P03/2

SR13. The locus of a fill area structure element is the border defined by the specified sequence of points and the portion of the fill area plane interior to the border.
#F 17 18 311 312
#D 7.3.1.9 7.3.1.10
#S 4.5.1/34/1 4.5.1/35/4 4.5.1/35/6 4.5.1/35/7
#T P01/7 P01/8 P02/5 P02/6 P02/7 P03/9 P03/10 P03/11 P03/12 P06/5
#T P06/6

SR14. The locus of a fill area set structure element is the set of borders defined by the specified set of point sequences and the portion of the fill area plane interior to those borders.
#F 19 20 311 312
#D 7.3.1.11 7.3.1.12
#S 4.5.1/34/1 4.5.1/35/4 4.5.1/35/6 4.5.1/35/7
#T P01/9 P01/10 P01/11 P02/8 P02/9 P03/13 #C SRs in module 04.01.06 define the interior of a fill area set as
follows: the interior of a fill area set is determined by the number
of intersections between a straight line drawn from a given point to
infinity in the plane of the primitive and the subarea boundaries. If
the number of intersections is odd, the point is in the interior,
otherwise it is outside. Note that this is not equivalent to the
union of the subareas.

SR15. The locus of a text structure element is the text extent rectangle generated by the current geometric text attributes, together with text font = 1, text precision = STROKE, character expansion factor = 1, and character spacing = 0.
#F 13 14 311 312
#D 3.3.12 3.3.13 3.3.14 3.3.15 3.3.16 3.3.17 3.3.18
#D 7.3.1.5 7.3.1.6 7.3.2.4.6 7.3.2.4.7 7.3.2.4.8 7.3.2.4.9
#S 4.4.6/31/2 4.5.1/34/1 4.5.1/35/1
#T P01/12 P01/13 P02/10 P02/11 P03/3 P03/4 P03/5 P03/6
#X 04.02.03.03
#C The default non-geometric attribute values are the same as for
<inquire text extent>.  Note that text precision STROKE is used,
and thus the current text precision in the PHIGS traversal state
list is ignored.


SR16. The locus of an annotation text relative structure element is the annotation reference point.
#F 15 16 311 312
#D 7.3.1.7 7.3.1.8
#S 4.4.6/31/3 4.5.1/34/1
#T P01/14 P01/15 P02/12 P02/13 P02/14

SR17. The locus of a cell array structure element is the cell array parallelogram defined by the specified corner points.
#F 21 22 311 312
#D 7.3.1.13 7.3.1.14
#S 4.5.1/34/1 4.5.1/36/1 4.5.1/37/1
#T P01/16 P01/17 P02/15 P02/16 P03/7 P03/8 #C For a 2D cell array, the parallelogram is a rectangle in the
z=0 plane of modelling co-ordinate space.

*** *** *** ***   Namesets and filters   *** *** *** ***


SR18. The nameset of a graphical primitive is compatible with the normal filter list if it is accepted by every filter in the list.
#F 60 61 311 312
#D 3.11 7.3.2.7.1 7.3.2.7.2
#S 4.4.6/31/11
#T P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P07/9 P07/10 P07/11
#T P07/12 P07/15 P07/16 P07/17 #C This condition is vacuously true if the list is empty.

SR19. The nameset of a graphical primitive is compatible with the inverted filter list if it is rejected by every filter in the list.
#F 60 61 311 312
#D 3.11 7.3.2.7.1 7.3.2.7.2
#S 4.4.6/31/11
#T P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P07/9 P07/10 P07/11
#T P07/12 P07/15 P07/16 P07/17 #C This condition is vacuously true if the list is empty.

SR20. A nameset is accepted by a filter if it has at least one name in common with the filter's inclusion set and no names in common with the filter's exclusion set; otherwise it is rejected.
#F 60 61 311 312
#D 3.11 7.3.2.7.1 7.3.2.7.2
#S 4.4.6/31/9
#T P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P07/9 P07/10 P07/11
#T P07/12 P07/15 P07/16 P07/17
#X 04.03.04.01


SR21. The maximum lengths of the normal and inverted filter lists returned by <inquire phigs facilities> must be at least 1.
#F 205
#D 2.8 2.9
#S 4.14/114/2 6.3/309/1
#T P07/13 P07/14

SR22. The lengths of the normal and inverted filter lists specified for ISS may be any value up to the maxima returned by <inquire phigs facilities>.
#F 205 311 312
#D 2.8 2.9
#S 4.14/114/2 6.3/309/1
#T P07/14

LOCAL DICTIONARY:

  Functions ---
  009: ppl3    <polyline 3>
  010: ppl     <polyline>
  011: ppm3    <polymarker 3>
  012: ppm     <polymarker>
  013: ptx3    <text 3>
  014: ptx     <text>
  015: patr3   <annotation text relative 3>
  016: patr    <annotation text relative>
  017: pfa3    <fill area 3>
  018: pfa     <fill area>
  019: pfas3   <fill area set 3>
  020: pfas    <fill area set>
  021: pca3    <cell array 3>
  022: pca     <cell array>
  023: pgdp3   <generalized drawing primitive 3>
  024: pgdp    <generalized drawing primitive>
  060: pads    <add names to set>
  061: pres    <remove names from set>
  075: pslmt3  <set local transformation 3>
  076: pslmt   <set local transformation>
  077: psgmt3  <set global transformation 3>
  078: psgmt   <set global transformation>
  079: psmcv3  <set modelling clipping volume 3>
  080: psmcv   <set modelling clipping volume>
  082: prmcv   <restore modelling clipping volume>
  113: pexst   <execute structure>
  205: pqphf   <inquire phigs facilities>
  311: piss3   <incremental spatial search 3>
  312: piss    <incremental spatial search>
 
  Data Structures ---
  2  ...  phigs_description_table
  2.8  ...  maximum_length_of_normal_filter_list_for_iss
  2.9  ...  maximum_length_of_inverted_filter_list_for_iss
  3  ...  phigs_traversal_state_list
  3.3  ...  current_text_attributes
  3.3.12 ...  current_character_height
  3.3.13 ...  current_character_up_vector
  3.3.14 ...  current_character_width
  3.3.15 ...  current_character_base_vector
  3.3.16 ...  current_text_path
  3.3.17 ...  current_text_alignment_horizontal
  3.3.18 ...  current_text_alignment_vertical
  3.11 ...  current_name_set
  3.12 ...  current_modelling_attributes
  3.12.1  ...  current_global_modelling_transformation
  3.12.2  ...  current_local_modelling_transformation
  3.12.3  ...  current_modelling_clipping_volume
  7  ...  structure_state_list
  7.1  ...  structure_identifier
  7.3  ...  list_of_structure_elements
  7.3.1  ...  graphical_primitives
  7.3.1.1  ...  polyline_3
  7.3.1.2  ...  polyline
  7.3.1.3  ...  polymarker_3
  7.3.1.4  ...  polymarker
  7.3.1.5  ...  text_3
  7.3.1.6  ...  text
  7.3.1.7  ...  annotation_text_relative_3
  7.3.1.8  ...  annotation_text_relative
  7.3.1.9  ...  fill_area_3
  7.3.1.10 ...  fill_area
  7.3.1.11 ...  fill_area_set_3
  7.3.1.12 ...  fill_area_set
  7.3.1.13 ...  cell_array_3
  7.3.1.14 ...  cell_array
  7.3.2  ...  primitive_attributes
  7.3.2.4  ...  text_attributes
  7.3.2.4.6  ...  character_height
  7.3.2.4.7  ...  character_up_vector
  7.3.2.4.8  ...  text_path
  7.3.2.4.9  ...  text_alignment
  7.3.2.7  ...  nameset_attributes
  7.3.2.7.1  ...  add_names_to_set
  7.3.2.7.2  ...  remove_names_from_set
  7.3.3  ...  modelling_transformation_elements
  7.3.3.1  ...  local_transformation_3
  7.3.3.2  ...  local_transformation
  7.3.3.3  ...  global_transformation_3
  7.3.3.4  ...  global_transformation
  7.3.3.5  ...  modelling_clipping_volume_3
  7.3.3.6  ...  modelling_clipping_volume
  7.3.3.8  ...  restore_modelling_clipping_volume
  7.3.4  ...  execute_structure
 
LOCAL SUBROUTINES:

SUBROUTINE ISSPF invokes the specified spatial search routine and
issues pass or fail, depending on its agreement with the expected
result.  Always: structure #101 is searched, search ceiling is 1,
modelling clip off, filter lists empty.

SUBROUTINE ISSDIS invokes the 3D spatial search routine with the
search distance set just below and above the theoretically
correct distance.  The only primitive to be searched is in
structure #101.  Thus, the search should first be unsuccessful,
and then successful.  ISSDIS issues pass or fail as a result of
these two searches.

SUBROUTINE ISSAB invokes the 3D spatial search routine with the
search distance set just below and above the theoretically
correct distance.  Thus, the search should first be unsuccessful,
and then successful.  ISSAB issues pass or fail as a result of
these two searches.

SUBROUTINE STCEIL repeatedly invokes spatial search, using the
found path of one search as the starting path for the next, and
issues pass or fail, depending on whether the actual paths match
those expected.

SUBROUTINE ISSGEO tests whether ISS successfully detects the
corners of a text extent rectangle.

SUBROUTINE TX2DEX computes the expected lower-left and
upper-right corner of a text extent rectangle, including the
effect of text position and character-up vector, which are not
taken into account by <inquire text extent>.

REAL FUNCTION PTREGD computes the minimum distance from a 3D
point to a planar 3D region.

SUBROUTINE INVOL, given a 3D point and planar fill area,
determines whether the point is within the normal projection of
the area, and the distance of the point from the plane.

INTEGER FUNCTION INAREA, given a 2D point and fill area,
determines whether the point is within the area, on the edge, or
outside.

SUBROUTINE FLTRAN, given a set of attitude numbers for a plane,
returns a 4 X 4 transformation matrix which rotates the plane so
as to be parallel to the z=0 plane.  This is useful for
visualizing a planar 3D primitive.

SUBROUTINE ISSFLT tests the effect of various filter lists on the
behavior of ISS.  It issues pass or fail depending on whether or
not the actual result of ISS matches the expected result.  All
the parameters are encoded in character form, and thus must be
translated before invoking ISS.

SUBROUTINE SETFIL translates the character version of a filter
list into the appropriate integer arrays.



PROGRAM 1: Basic spatial search for 2-D primitives

You may inspect either the design or code for this program.


PROGRAM 2: Basic spatial search for 3-D primitives

You may inspect either the design or code for this program.


PROGRAM 3: Geometrical borderline cases for graphical primitives

You may inspect either the design or code for this program.


PROGRAM 4: Starting path and search ceiling

You may inspect either the design or code for this program.


PROGRAM 5: Inheritance of geometric attributes

You may inspect either the design or code for this program.


PROGRAM 6: Modelling transformation and clipping

You may inspect either the design or code for this program.


PROGRAM 7: ISS and filters

You may inspect either the design or code for this program.

End of documentation for 02.03.03