LSST Applications g0b6bd0c080+a72a5dd7e6,g1182afd7b4+2a019aa3bb,g17e5ecfddb+2b8207f7de,g1d67935e3f+06cf436103,g38293774b4+ac198e9f13,g396055baef+6a2097e274,g3b44f30a73+6611e0205b,g480783c3b1+98f8679e14,g48ccf36440+89c08d0516,g4b93dc025c+98f8679e14,g5c4744a4d9+a302e8c7f0,g613e996a0d+e1c447f2e0,g6c8d09e9e7+25247a063c,g7271f0639c+98f8679e14,g7a9cd813b8+124095ede6,g9d27549199+a302e8c7f0,ga1cf026fa3+ac198e9f13,ga32aa97882+7403ac30ac,ga786bb30fb+7a139211af,gaa63f70f4e+9994eb9896,gabf319e997+ade567573c,gba47b54d5d+94dc90c3ea,gbec6a3398f+06cf436103,gc6308e37c7+07dd123edb,gc655b1545f+ade567573c,gcc9029db3c+ab229f5caf,gd01420fc67+06cf436103,gd877ba84e5+06cf436103,gdb4cecd868+6f279b5b48,ge2d134c3d5+cc4dbb2e3f,ge448b5faa6+86d1ceac1d,gecc7e12556+98f8679e14,gf3ee170dca+25247a063c,gf4ac96e456+ade567573c,gf9f5ea5b4d+ac198e9f13,gff490e6085+8c2580be5c,w.2022.27
LSST Data Management Base Package
|
IntersectionRegion is a lazy point-set inersection of its operands. More...
#include <CompoundRegion.h>
Public Member Functions | |
std::unique_ptr< Region > | clone () const override |
clone returns a deep copy of this region. More... | |
Box | getBoundingBox () const override |
getBoundingBox returns a bounding-box for this region. More... | |
Box3d | getBoundingBox3d () const override |
getBoundingBox3d returns a 3-dimensional bounding-box for this region. More... | |
Circle | getBoundingCircle () const override |
getBoundingCircle returns a bounding-circle for this region. More... | |
bool | contains (UnitVector3d const &v) const override |
contains tests whether the given unit vector is inside this region. More... | |
Relationship | relate (Region const &r) const override |
std::vector< uint8_t > | encode () const override |
encode serializes this region into an opaque byte string. More... | |
CompoundRegion (Region const &first, Region const &second) | |
Construct by copying or taking ownership of operands. More... | |
CompoundRegion (std::array< std::unique_ptr< Region >, 2 > operands) noexcept | |
CompoundRegion (CompoundRegion const &) | |
CompoundRegion (CompoundRegion &&) noexcept=default | |
virtual bool | contains (UnitVector3d const &) const=0 |
contains tests whether the given unit vector is inside this region. More... | |
bool | contains (double x, double y, double z) const |
contains tests whether the unit vector defined by the given (not necessarily normalized) coordinates is inside this region. More... | |
bool | contains (double lon, double lat) const |
contains tests whether the unit vector defined by the given longitude and latitude coordinates (in radians) is inside this region. More... | |
Region const & | getOperand (std::size_t n) const |
Relationship | relate (Box const &b) const override |
Relationship | relate (Circle const &c) const override |
Relationship | relate (ConvexPolygon const &p) const override |
Relationship | relate (Ellipse const &e) const override |
Static Public Member Functions | |
static std::unique_ptr< IntersectionRegion > | decode (std::vector< uint8_t > const &s) |
static std::unique_ptr< IntersectionRegion > | decode (uint8_t const *buffer, size_t n) |
Static Public Attributes | |
static constexpr uint8_t | TYPE_CODE = 'i' |
Protected Member Functions | |
std::vector< std::uint8_t > | _encode (std::uint8_t tc) const |
Static Protected Member Functions | |
static std::array< std::unique_ptr< Region >, 2 > | _decode (std::uint8_t tc, std::uint8_t const *buffer, std::size_t nBytes) |
IntersectionRegion is a lazy point-set inersection of its operands.
All operations on a IntersectionRegion are implementing by delegating to its nested operand regions and combining the results.
Definition at line 134 of file CompoundRegion.h.
|
staticprotectedinherited |
Definition at line 97 of file CompoundRegion.cc.
|
protectedinherited |
Definition at line 85 of file CompoundRegion.cc.
|
inlineoverridevirtual |
clone
returns a deep copy of this region.
Implements lsst::sphgeom::Region.
Definition at line 141 of file CompoundRegion.h.
|
defaultnoexcept |
lsst::sphgeom::CompoundRegion::CompoundRegion | ( | CompoundRegion const & | other | ) |
Definition at line 55 of file CompoundRegion.cc.
Construct by copying or taking ownership of operands.
Definition at line 51 of file CompoundRegion.cc.
|
explicitnoexcept |
Definition at line 52 of file CompoundRegion.cc.
bool lsst::sphgeom::Region::contains | ( | double | lon, |
double | lat | ||
) | const |
contains
tests whether the unit vector defined by the given longitude and latitude coordinates (in radians) is inside this region.
Definition at line 104 of file Region.cc.
bool lsst::sphgeom::Region::contains | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
|
virtual |
contains
tests whether the given unit vector is inside this region.
Implements lsst::sphgeom::Region.
|
overridevirtual |
contains
tests whether the given unit vector is inside this region.
Implements lsst::sphgeom::Region.
Definition at line 176 of file CompoundRegion.cc.
|
inlinestatic |
decode
deserializes a IntersetionRegion from a byte string produced by encode.
Definition at line 153 of file CompoundRegion.h.
|
inlinestatic |
decode
deserializes a IntersetionRegion from a byte string produced by encode.
Definition at line 156 of file CompoundRegion.h.
|
inlineoverridevirtual |
encode
serializes this region into an opaque byte string.
Byte strings emitted by encode can be deserialized with decode.
Implements lsst::sphgeom::Region.
Definition at line 148 of file CompoundRegion.h.
|
overridevirtual |
getBoundingBox
returns a bounding-box for this region.
Implements lsst::sphgeom::Region.
Definition at line 164 of file CompoundRegion.cc.
|
overridevirtual |
getBoundingBox3d
returns a 3-dimensional bounding-box for this region.
Implements lsst::sphgeom::Region.
Definition at line 168 of file CompoundRegion.cc.
|
overridevirtual |
getBoundingCircle
returns a bounding-circle for this region.
Implements lsst::sphgeom::Region.
Definition at line 172 of file CompoundRegion.cc.
|
inlineinherited |
Definition at line 64 of file CompoundRegion.h.
|
overridevirtualinherited |
relate
computes the spatial relationships between this region A and another region B. The return value S is a bitset with the following properties:
S & DISJOINT
is set only if A and B do not have any points in common.S & CONTAINS
is set only if A contains all points in B.S & WITHIN
is set only if B contains all points in A.Said another way: if the CONTAINS, WITHIN or DISJOINT bit is set, then the corresponding spatial relationship between the two regions holds conclusively. If it is not set, the relationship may or may not hold.
These semantics allow for conservative relationship computations. In particular, a Region may choose to implement relate
by replacing itself and/or the argument with a simplified bounding region.
Implements lsst::sphgeom::Region.
Definition at line 80 of file CompoundRegion.cc.
|
overridevirtualinherited |
relate
computes the spatial relationships between this region A and another region B. The return value S is a bitset with the following properties:
S & DISJOINT
is set only if A and B do not have any points in common.S & CONTAINS
is set only if A contains all points in B.S & WITHIN
is set only if B contains all points in A.Said another way: if the CONTAINS, WITHIN or DISJOINT bit is set, then the corresponding spatial relationship between the two regions holds conclusively. If it is not set, the relationship may or may not hold.
These semantics allow for conservative relationship computations. In particular, a Region may choose to implement relate
by replacing itself and/or the argument with a simplified bounding region.
Implements lsst::sphgeom::Region.
Definition at line 81 of file CompoundRegion.cc.
|
overridevirtualinherited |
relate
computes the spatial relationships between this region A and another region B. The return value S is a bitset with the following properties:
S & DISJOINT
is set only if A and B do not have any points in common.S & CONTAINS
is set only if A contains all points in B.S & WITHIN
is set only if B contains all points in A.Said another way: if the CONTAINS, WITHIN or DISJOINT bit is set, then the corresponding spatial relationship between the two regions holds conclusively. If it is not set, the relationship may or may not hold.
These semantics allow for conservative relationship computations. In particular, a Region may choose to implement relate
by replacing itself and/or the argument with a simplified bounding region.
Implements lsst::sphgeom::Region.
Definition at line 82 of file CompoundRegion.cc.
|
overridevirtualinherited |
relate
computes the spatial relationships between this region A and another region B. The return value S is a bitset with the following properties:
S & DISJOINT
is set only if A and B do not have any points in common.S & CONTAINS
is set only if A contains all points in B.S & WITHIN
is set only if B contains all points in A.Said another way: if the CONTAINS, WITHIN or DISJOINT bit is set, then the corresponding spatial relationship between the two regions holds conclusively. If it is not set, the relationship may or may not hold.
These semantics allow for conservative relationship computations. In particular, a Region may choose to implement relate
by replacing itself and/or the argument with a simplified bounding region.
Implements lsst::sphgeom::Region.
Definition at line 83 of file CompoundRegion.cc.
|
overridevirtual |
relate
computes the spatial relationships between this region A and another region B. The return value S is a bitset with the following properties:
S & DISJOINT
is set only if A and B do not have any points in common.S & CONTAINS
is set only if A contains all points in B.S & WITHIN
is set only if B contains all points in A.Said another way: if the CONTAINS, WITHIN or DISJOINT bit is set, then the corresponding spatial relationship between the two regions holds conclusively. If it is not set, the relationship may or may not hold.
These semantics allow for conservative relationship computations. In particular, a Region may choose to implement relate
by replacing itself and/or the argument with a simplified bounding region.
Implements lsst::sphgeom::CompoundRegion.
Definition at line 180 of file CompoundRegion.cc.
|
staticconstexpr |
Definition at line 136 of file CompoundRegion.h.