Class AtlasChart::Halfspace

Nested Relationships

This class is a nested type of Class AtlasChart.

Class Documentation

class Halfspace

Halfspace equation on a chart.

Note

Use AtlasChart::generateHalfspace to create new halfspace objects. Since each halfspace is associated to exactly one chart, we let the chart be responsible for deleting it.

Public Functions

Halfspace(const Halfspace&) = delete
Halfspace &operator=(const Halfspace&) = delete
Halfspace(const AtlasChart *owner, const AtlasChart *neighbor)

Create a halfspace equitably separating charts owner and neighbor. This halfspace will coincide with chart owner.

bool contains(const Eigen::Ref<const Eigen::VectorXd> &v) const

Return whether point v on the owning chart lies within the halfspace.

void checkNear(const Eigen::Ref<const Eigen::VectorXd> &v) const

If point v on the owning chart is very close to the halfspace boundary, the “complementary” halfspace will extend its boundary so that it also contains v when v is projected onto the neighboring chart.

bool circleIntersect(double r, Eigen::Ref<Eigen::VectorXd> v1, Eigen::Ref<Eigen::VectorXd> v2) const

Compute up to two vertices of intersection with a circle of radius r. If one vertex is found, it is stored to both v1 and v2; if two are found, they are stored to v1 and v2. If no vertex is found, returns false; otherwise returns true.

inline void setComplement(Halfspace *complement)

Inform this halfspace about the “complementary” halfspace which coincides with the neighboring chart.

inline Halfspace *getComplement() const

Get the complementary halfspace.

inline const AtlasChart *getOwner() const

Get the chart to which this halfspace belongs.

Public Static Functions

static void intersect(const Halfspace &l1, const Halfspace &l2, Eigen::Ref<Eigen::VectorXd> out)

Compute the vertex of intersection of two 1-dimensional inequalities l1 and l2. Result stored in out, which should be allocated to a size of 2.