Skip to contents

Simple class for handling bounding box information

Usage

fm_bbox(...)

# S3 method for list
fm_bbox(x, ...)

## S3 method for class 'NULL'
fm_bbox(...)

# S3 method for matrix
fm_bbox(x, ...)

# S3 method for fm_bbox
fm_bbox(x, ...)

# S3 method for fm_mesh_2d
fm_bbox(x, ...)

# S3 method for fm_segm
fm_bbox(x, ...)

# S3 method for fm_lattice_2d
fm_bbox(x, ...)

# S3 method for sf
fm_bbox(x, ...)

# S3 method for sfg
fm_bbox(x, ...)

# S3 method for sfc
fm_bbox(x, ...)

# S3 method for bbox
fm_bbox(x, ...)

# S3 method for inla.mesh
fm_bbox(x, ...)

# S3 method for inla.mesh.segment
fm_bbox(x, ...)

fm_as_bbox(x, ...)

# S3 method for fm_bbox
[(x, i)

# S3 method for fm_bbox
c(...)

Arguments

...

Passed on to sub-methods

x

fm_bbox object from which to extract element(s)

i

indices specifying elements to extract

Value

A fm_bbox_list object

Methods (by class)

  • fm_bbox(list): Construct a bounding box from precomputed interval information, stored as a list of 2-vector ranges, list(xlim, ylim, ...).

Methods (by generic)

  • [: Extract sub-list

  • c(fm_bbox): The ... arguments should be fm_bbox objects, or coercible with fm_as_bbox(list(...)).

Examples

fm_bbox(matrix(1:6, 3, 2))
#> Bounding box: (1,3) x (4,6)
m <- c(A = fm_bbox(cbind(1, 2), B = fm_bbox(cbind(3, 4))))
str(m)
#> List of 1
#>  $ A:List of 2
#>   ..$ : num [1:2] 1 1
#>   ..$ : num [1:2] 2 2
#>   ..- attr(*, "class")= chr "fm_bbox"
#>  - attr(*, "class")= chr [1:3] "fm_bbox_list" "fm_list" "list"
str(m[2])
#> List of 1
#>  $ NA: NULL
#>  - attr(*, "class")= chr [1:3] "fm_bbox_list" "fm_list" "list"