Top Description Methods
org.apache.commons.math3.geometry.partitioning

public Interface Hyperplane<S extends Space>

Known Direct Implementers
org.apache.commons.math3.geometry.spherical.oned.LimitAngle, org.apache.commons.math3.geometry.spherical.twod.Circle, org.apache.commons.math3.geometry.euclidean.oned.OrientedPoint, org.apache.commons.math3.geometry.euclidean.threed.Plane, org.apache.commons.math3.geometry.euclidean.twod.Line
Type Parameters
<S>
Type of the space.
Imports
org.apache.commons.math3.geometry.Point, .Space

This interface represents an hyperplane of a space.

The most prominent place where hyperplane appears in space partitioning is as cutters. Each partitioning node in a BSP tree has a cut sub-hyperplane which is either an hyperplane or a part of an hyperplane. In an n-dimensions euclidean space, an hyperplane is an (n-1)-dimensions hyperplane (for example a traditional plane in the 3D euclidean space). They can be more exotic objects in specific fields, for example a circle on the surface of the unit sphere.

Note that this interface is not intended to be implemented by Apache Commons Math users, it is only intended to be implemented within the library itself. New methods may be added even for minor versions, which breaks compatibility for external implementations.

Since
3.0

Method Summary

Modifier and TypeMethod and Description
public Hyperplane<S>

Returns:

a new hyperplane, copy of the instance
copySelf
()

Copy the instance.

public double

Returns:

offset of the point
getOffset
(Point<S>
point to check
point
)

Get the offset (oriented distance) of a point.

public double

Returns:

tolerance below which points are considered to belong to the hyperplane
getTolerance
()

Get the tolerance below which points are considered to belong to the hyperplane.

public Point<S>

Returns:

projected point
project
(Point<S>
point to project
point
)

Project a point to the hyperplane.

public boolean

Returns:

true if the instance and the other hyperplane have the same orientation
sameOrientationAs
(Hyperplane<S>
other hyperplane to check against the instance
other
)

Check if the instance has the same orientation as another hyperplane.

public SubHyperplane<S>

Returns:

a sub-hyperplane covering the whole hyperplane
wholeHyperplane
()

Build a sub-hyperplane covering the whole hyperplane.

public Region<S>

Returns:

a region containing the instance
wholeSpace
()

Build a region covering the whole space.

Method Detail

copySelfback to summary
public Hyperplane<S> copySelf()

Copy the instance.

The instance created is completely independant of the original one. A deep copy is used, none of the underlying objects are shared (except for immutable objects).

Returns:Hyperplane<S>

a new hyperplane, copy of the instance

getOffsetback to summary
public double getOffset(Point<S> point)

Get the offset (oriented distance) of a point.

The offset is 0 if the point is on the underlying hyperplane, it is positive if the point is on one particular side of the hyperplane, and it is negative if the point is on the other side, according to the hyperplane natural orientation.

Parameters
point:Point<S>

point to check

Returns:double

offset of the point

getToleranceback to summary
public double getTolerance()

Get the tolerance below which points are considered to belong to the hyperplane.

Returns:double

tolerance below which points are considered to belong to the hyperplane

Since
3.3
projectback to summary
public Point<S> project(Point<S> point)

Project a point to the hyperplane.

Parameters
point:Point<S>

point to project

Returns:Point<S>

projected point

Since
3.3
sameOrientationAsback to summary
public boolean sameOrientationAs(Hyperplane<S> other)

Check if the instance has the same orientation as another hyperplane.

This method is expected to be called on parallel hyperplanes. The method should not re-check for parallelism, only for orientation, typically by testing something like the sign of the dot-products of normals.

Parameters
other:Hyperplane<S>

other hyperplane to check against the instance

Returns:boolean

true if the instance and the other hyperplane have the same orientation

wholeHyperplaneback to summary
public SubHyperplane<S> wholeHyperplane()

Build a sub-hyperplane covering the whole hyperplane.

Returns:SubHyperplane<S>

a sub-hyperplane covering the whole hyperplane

wholeSpaceback to summary
public Region<S> wholeSpace()

Build a region covering the whole space.

Returns:Region<S>

a region containing the instance