lsst.sphgeom g0261d94427+c9b10be330
|
#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 |
CompoundRegion (Region const &first, Region const &second) | |
Construct by copying or taking ownership of operands. | |
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 |
bool | contains (double lon, double lat) const |
![]() | |
CompoundRegion (Region const &first, Region const &second) | |
Construct by copying or taking ownership of operands. | |
CompoundRegion (std::array< std::unique_ptr< Region >, 2 > operands) noexcept | |
CompoundRegion (CompoundRegion const &) | |
CompoundRegion (CompoundRegion &&) noexcept=default | |
CompoundRegion & | operator= (CompoundRegion const &)=delete |
CompoundRegion & | operator= (CompoundRegion &&)=delete |
Region const & | getOperand (std::size_t n) const |
virtual Relationship | relate (Region const &r) const =0 |
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 |
![]() | |
virtual std::unique_ptr< Region > | clone () const =0 |
clone returns a deep copy of this region. More... | |
virtual Box | getBoundingBox () const =0 |
getBoundingBox returns a bounding-box for this region. More... | |
virtual Box3d | getBoundingBox3d () const =0 |
getBoundingBox3d returns a 3-dimensional bounding-box for this region. More... | |
virtual Circle | getBoundingCircle () const =0 |
getBoundingCircle returns a bounding-circle for this region. More... | |
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 |
bool | contains (double lon, double lat) const |
virtual std::vector< uint8_t > | encode () const =0 |
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 std::unique_ptr< CompoundRegion > | decode (std::vector< uint8_t > const &s) |
static std::unique_ptr< CompoundRegion > | decode (uint8_t const *buffer, size_t n) |
![]() | |
static std::unique_ptr< Region > | decode (std::vector< uint8_t > const &s) |
static std::unique_ptr< Region > | decode (uint8_t const *buffer, size_t n) |
Static Public Attributes | |
static constexpr uint8_t | TYPE_CODE = 'i' |
Additional Inherited Members | |
![]() | |
std::vector< std::uint8_t > | _encode (std::uint8_t tc) const |
![]() | |
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.
|
inlineoverridevirtual |
clone
returns a deep copy of this region.
Implements lsst::sphgeom::Region.
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.
bool lsst::sphgeom::Region::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.
|
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.
|
inlinestatic |
decode
deserializes a IntersetionRegion from a byte string produced by encode.
|
inlineoverridevirtual |
encode
serializes this region into an opaque byte string. Byte strings emitted by encode can be deserialized with decode.
Implements lsst::sphgeom::Region.
|
overridevirtual |
getBoundingBox
returns a bounding-box for this region.
Implements lsst::sphgeom::Region.
|
overridevirtual |
getBoundingBox3d
returns a 3-dimensional bounding-box for this region.
Implements lsst::sphgeom::Region.
|
overridevirtual |
getBoundingCircle
returns a bounding-circle for this region.
Implements lsst::sphgeom::Region.
|
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.