Top Description Fields Constructors Methods
org.apache.commons.math3.geometry.spherical.twod

pack-priv Class PropertiesComputer

extends Object
implements BSPTreeVisitor<Sphere2D>
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor
Imports
java.util.ArrayList, .List, org.apache.commons.math3.exception.MathInternalError, org.apache.commons.math3.geometry.euclidean.threed.Vector3D, org.apache.commons.math3.geometry.partitioning.BSPTree, .BSPTreeVisitor, org.apache.commons.math3.util.FastMath, .MathUtils

Visitor computing geometrical properties.
Since
3.3

Field Summary

Modifier and TypeField and Description
private final List<Vector3D>
convexCellsInsidePoints

List of points strictly inside convex cells.

private double
summedArea

Summed area.

private Vector3D
summedBarycenter

Summed barycenter.

private final double
tolerance

Tolerance below which points are consider to be identical.

Constructor Summary

AccessConstructor and Description
pack-priv
PropertiesComputer(final double
below which points are consider to be identical
tolerance
)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
private double

Returns:

area
convexCellArea
(final Vertex
start vertex of the convex cell boundary
start
)

Compute convex cell area.

private Vector3D

Returns:

barycenter
convexCellBarycenter
(final Vertex
start vertex of the convex cell boundary
start
)

Compute convex cell barycenter.

public double

Returns:

area
getArea
()

Get the area.

public S2Point

Returns:

barycenter
getBarycenter
()

Get the barycenter.

public List<Vector3D>

Returns:

points strictly inside convex cells
getConvexCellsInsidePoints
()

Get the points strictly inside convex cells.

public void
visitInternalNode(final BSPTree<Sphere2D>
BSP node guaranteed to have a non null cut sub-hyperplane
node
)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitInternalNode.

Visit a BSP tree node node having a non-null sub-hyperplane.

public void
visitLeafNode(final BSPTree<Sphere2D>
leaf BSP node having a null sub-hyperplane
node
)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitLeafNode.

Visit a leaf BSP tree node node having a null sub-hyperplane.

public BSPTreeVisitor.Order
visitOrder(final BSPTree<Sphere2D>
BSP node guaranteed to have a non null cut sub-hyperplane
node
)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitOrder.

Determine the visit order for this node.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

convexCellsInsidePointsback to summary
private final List<Vector3D> convexCellsInsidePoints

List of points strictly inside convex cells.

summedAreaback to summary
private double summedArea

Summed area.

summedBarycenterback to summary
private Vector3D summedBarycenter

Summed barycenter.

toleranceback to summary
private final double tolerance

Tolerance below which points are consider to be identical.

Constructor Detail

PropertiesComputerback to summary
pack-priv PropertiesComputer(final double tolerance)

Simple constructor.

Parameters
tolerance:double

below which points are consider to be identical

Method Detail

convexCellAreaback to summary
private double convexCellArea(final Vertex start)

Compute convex cell area.

Parameters
start:Vertex

start vertex of the convex cell boundary

Returns:double

area

convexCellBarycenterback to summary
private Vector3D convexCellBarycenter(final Vertex start)

Compute convex cell barycenter.

Parameters
start:Vertex

start vertex of the convex cell boundary

Returns:Vector3D

barycenter

getAreaback to summary
public double getArea()

Get the area.

Returns:double

area

getBarycenterback to summary
public S2Point getBarycenter()

Get the barycenter.

Returns:S2Point

barycenter

getConvexCellsInsidePointsback to summary
public List<Vector3D> getConvexCellsInsidePoints()

Get the points strictly inside convex cells.

Returns:List<Vector3D>

points strictly inside convex cells

visitInternalNodeback to summary
public void visitInternalNode(final BSPTree<Sphere2D> node)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitInternalNode.

Doc from org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitInternalNode.

Visit a BSP tree node node having a non-null sub-hyperplane.

It is guaranteed that this method will be called after visitOrder has been called for a given node, it wil be called exactly once for each internal node.

Parameters
node:BSPTree<Sphere2D>

BSP node guaranteed to have a non null cut sub-hyperplane

visitLeafNodeback to summary
public void visitLeafNode(final BSPTree<Sphere2D> node)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitLeafNode.

Doc from org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitLeafNode.

Visit a leaf BSP tree node node having a null sub-hyperplane.

Parameters
node:BSPTree<Sphere2D>

leaf BSP node having a null sub-hyperplane

visitOrderback to summary
public BSPTreeVisitor.Order visitOrder(final BSPTree<Sphere2D> node)

Implements org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitOrder.

Doc from org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor.visitOrder.

Determine the visit order for this node.

Before attempting to visit an internal node, this method is called to determine the desired ordering of the visit. It is guaranteed that this method will be called before visitInternalNode for a given node, it will be called exactly once for each internal node.

Parameters
node:BSPTree<Sphere2D>

BSP node guaranteed to have a non null cut sub-hyperplane

Returns:BSPTreeVisitor.Order

desired visit order, must be one of Order#PLUS_MINUS_SUB, Order#PLUS_SUB_MINUS, Order#MINUS_PLUS_SUB, Order#MINUS_SUB_PLUS, Order#SUB_PLUS_MINUS, Order#SUB_MINUS_PLUS