This topic describes the logical AND operator (&&). This operator determines the spatial location of the sfmesh, meshgeom, or box3d object by using bounding boxes.

Syntax

boolean &&(sfmesh A, sfmesh B);
boolean &&(meshgeom A, meshgeom B);
boolean &&(sfmesh A, box3d B);
boolean &&(box3d A, sfmesh B);

Parameters

Parameter Description
A The sfmesh object A, meshgeom object A, or box3d object A.
B The sfmesh object B, meshgeom object B, or box3d object B.

Description

The operator determines the 3D spatial location of the sfmesh, meshgeom, or box3d object by using bounding boxes. If the bounding box of Object A intersect the bounding box of Object B, true is returned. If the bounding box of Object A does not intersect the bounding box of Object B, false is returned.

Examples

  • Example 1
    --&&(sfmesh, sfmesh)
    select count(*) from mesh_gist_test where '{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(307248.723802283 296449.440306073 6500.00004882812,307248.723802283 296449.440306073 100,307258.460240141 296449.440306073 6500.00004882812,307258.460240141 296449.440306073 100,307258.460240141 296474.440306263 6500.00004882812,307258.460240141 296474.440306263 100,307248.723802283 296474.440306263 6500.00004882812,307248.723802283 296474.440306263 100),INDEX((0,1,2),(3,2,1),(4,5,6),(7,6,5),(3,1,7),(7,5,3),(2,3,4),(5,4,3),(0,2,4),(4,6,0),(1,0,7),(6,7,0)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}'::mesh && the_mesh;
    -------------------------------------
    6
  • Example 2
    --&&(sfmesh, box3d)
    select count(*) from mesh_gist_test where the_mesh && st_3dmakebox('POINT(206126.22379756 290161.940316926 5249.99990997314)'::geometry,'POINT(226126.22379756 300161.940316926 7249.99990997314)'::geometry);
    -------------------------------------
    19
  • Example 3
    --&&(box3d, sfmesh)
    select count(*) from mesh_gist_test where st_3dmakebox('POINT(206126.22379756 290161.940316926 5249.99990997314)'::geometry,'POINT(226126.22379756 300161.940316926 7249.99990997314)'::geometry) && the_mesh;
    -------------------------------------
    19